Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot connect anymore to Synology DSM #110848

Open
archipita opened this issue Feb 18, 2024 · 18 comments
Open

Cannot connect anymore to Synology DSM #110848

archipita opened this issue Feb 18, 2024 · 18 comments

Comments

@archipita
Copy link

archipita commented Feb 18, 2024

The problem

Since some time, HA cannot connect anymore to the Synology DSM.
I have tried with a dedicated user with 2FA enabled and another user with 2FA disabled, but the connection is not established in either cases.
In the first case HA says that the 2FA is not successful (although when inserting the code it says OK), in the second case it says that the 2FA is missing, with the result that I am blocked.
I am using a DS1821+ with DSM 7.2.1-69057 Update 1.

What version of Home Assistant Core has the issue?

core-2024.2.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Synology DSM

Link to integration documentation on our website

https://www.home-assistant.io/integrations/synology_dsm/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

home-assistant - 20240218.log

Additional information

No response

@home-assistant
Copy link

Hey there @hacf-fr, @Quentame, @mib1185, mind taking a look at this issue as it has been labeled with an integration (synology_dsm) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of synology_dsm can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign synology_dsm Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


synology_dsm documentation
synology_dsm source
(message by IssueLinks)

@fcollonval
Copy link

I was having the same issue. But restarting the server fixed it. So I did not get the chance to see if the error was exactly the same.

@archipita
Copy link
Author

Thank you for the suggestion. Actually I did that already, but did not help.

I made many more tests with the 2FA enabled and I cannot find a way to make it working again. Something must have changed in the SW.

In the meantime I have found a possible workaround that is not good (for security reasons!), but it is the only one working right now: I have created a completely new user, with admin rights, but without any access to any app nor directory and I am connecting with this user from the HA to the DS using the external IP address of the DS.
I tried as well the direct connection within the intranet, but it did not work.

I would prefer to have no admin users without a 2FA enabled on my DS, but this is the only way working right now.
Any suggestion/help on solving the issue with the 2FA activated is very appreciated.

@davmc123
Copy link

davmc123 commented Mar 3, 2024

I am having a similar issue to the others here. I was having issues with the my Synology integration as it kept disconnecting and wasn't reconnecting without a home assistant restart. I deleted it and I am not able to add it again and I get the error message "Failed to connect" after a few seconds. It get the same error whether or not 2FA is on and it has persisted through a restart.

2024-03-03 22:18:48.080 ERROR (MainThread) [homeassistant.components.synology_dsm.config_flow] {'api': None, 'code': -1, 'reason': 'Unknown', 'details': 'TimeoutError'}

The NAS I am having issues with is a DS1520+ running DSM 7.2.1-69057 Update 4

I have another Synology DS918+ NAS that the integration seems to be working fine with running a slightly older DSM 7.1.1-42962 Update 6.

Anyone have any suggestions on additional log info I could provide that might help diagnose this issue?

@zuerom
Copy link

zuerom commented Mar 5, 2024

I am having a similar issue to the others here. I was having issues with the my Synology integration as it kept disconnecting and wasn't reconnecting without a home assistant restart. I deleted it and I am not able to add it again and I get the error message "Failed to connect" after a few seconds. It get the same error whether or not 2FA is on and it has persisted through a restart.

2024-03-03 22:18:48.080 ERROR (MainThread) [homeassistant.components.synology_dsm.config_flow] {'api': None, 'code': -1, 'reason': 'Unknown', 'details': 'TimeoutError'}

The NAS I am having issues with is a DS1520+ running DSM 7.2.1-69057 Update 4

I have another Synology DS918+ NAS that the integration seems to be working fine with running a slightly older DSM 7.1.1-42962 Update 6.

Anyone have any suggestions on additional log info I could provide that might help diagnose this issue?

Same here with DS1512+
Firmware: DSM 6.2.4-25556 Update 7 (latest available release because it's deprecated)

@Flintr
Copy link

Flintr commented Mar 5, 2024

Same exact story here. DS1512+ running DSM 6.2.4-25556. Latest available DSM version.

@bezibaerchen
Copy link

Check the usage of your Synology, especially when it comes to disk operations. Found this thread as I was experiencing it myself, however, I was "slightly" saturating my DS918+
Once it settled, the integration came back to life.

@smarthomefamilyverrips
Copy link

smarthomefamilyverrips commented Mar 26, 2024

Check the usage of your Synology, especially when it comes to disk operations. Found this thread as I was experiencing it myself, however, I was "slightly" saturating my DS918+ Once it settled, the integration came back to life.

@bezibaerchen you mean your system was not in healthy state? I now have a failing disk and since then also have problems with the integration being able to setup.... most likely related to bad system state of NAS??? What you think?

This is error i get:

Unexpected error fetching 192.168.0.117 SynologyDSMCentralUpdateCoordinator data: The config entry 192.168.0.117 (synology_dsm) with entry_id 72025f29a77296ccf62cabf3d6e58746 cannot be unloaded because it is not in a recoverable state (ConfigEntryState.SETUP_IN_PROGRESS)

@briodan
Copy link

briodan commented Apr 1, 2024

running into the same/similar issue, the integration is stuck in Initializing status and the log has the "cannot be unloaded because it is not in a recoverable state" message. if I restart HA, the integration comes up correctly only to eventually break again.

The only issue I had on the system was a space available warning alert on one of the volumes.

@mib1185
Copy link
Contributor

mib1185 commented Apr 1, 2024

@archipita i've checked the code, your log and the API documentation of synology adn can't find any issues there about 2FA login procedure.

Just to avoid any quirks with old/orphaned configuration entries in HA, please

  1. remove all Synology DSM integrations
  2. enable debug logging
logger:
  default: info
  logs:
    homeassistant.components.synology_dsm: debug
  1. restart HA
  2. add the NAS again with 2FA again
  3. and provide the full home-assistant.log

Note: it is better to drag the log into the comment (which will add it as an attachment) and not copy paste as it is hard to read logs in GitHub.

@fnordson
Copy link

fnordson commented Apr 7, 2024

I had this happen to me several times in the recent days until I realized that the NAS was offline when I restarted Home Assistant.
It just didn't catch up afterward when the NAS was online again. Had to restart HA.

@archipita
Copy link
Author

archipita commented Apr 8, 2024

@archipita i've checked the code, your log and the API documentation of synology adn can't find any issues there about 2FA login procedure.

@fnordson thank you for the feedback and the effort spent!
Unfortunately, I am traveling a lot in these days and won't be able to make some proper tests soon. I will try as soon as possible.

In the meantime, as mentioned above, I am using the connection without 2FA and this is working fine since some weeks. Also after upgrading both the HA and the DS.

@DoWenzl94
Copy link

Same Issue here

@mib1185
Copy link
Contributor

mib1185 commented Apr 10, 2024

"Same Issue here" doesn't really help, please use the +1 reaction on the initial post, thx 👍
Sure, any further information, which might be helpful to identify the issue, are highly welcome.

@mib1185
Copy link
Contributor

mib1185 commented Apr 10, 2024

Unfortunately, I am traveling a lot in these days and won't be able to make some proper tests soon. I will try as soon as possible.

@archipita ok, meanwhile i'll tag this as "waiting for reply"

@mdaryabe
Copy link

mdaryabe commented May 6, 2024

I had the same problem I believe. What I ended up doing is changing the timeout period from 15 sec to 90 sec and that actually helped. seems like the older DS models are kinda slowing down and the initiation process times up before it establish a connection

@mib1185
Copy link
Contributor

mib1185 commented May 6, 2024

please re-try with HA 2024.5.2 and set the timeout to 30s, thx

@archipita
Copy link
Author

archipita commented Jun 1, 2024

@mib1185 @fnordson sorry for the very long delay of my reply, but the last period has been pretty busy.
I have made again some tests and when I try to connect with the 'homeassistant' user that has the 2FA active the RECONFIGURE process says it is OK, but then the connection fails.
Here are the logs as requested, with only the DSM debug enabled...
home-assistant_synology_dsm_2024-06-01T13-47-47.539Z.log
There is not a lot though.
For the time being I will continue to use the connection without the 2FA enabled. I have created an 'ha' user without access to anything, so the risk of having issues is reduced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests