Hassio-Addons
Hassio-Addons copied to clipboard
[syncthing] Local Discovery only not working
Which addon? syncthing
Describe the bug
My Windows Machine (Syncthing Trayzor installed, connected via Wifi) was not able to find my Home Assistant Syncthing Device (Connect via LAN), when I turned off all "Connection" Options, except "Local Discovery" on both machines:
Connection options on both devices were set to default (Addresses: dynamic):
From my understanding the Home Assistant Syncthing was able to find the windows machine, but was unable to connect. Logs (XXXXXX-XXXXX-... is the device id of the windows instance):
2023-01-27 18:45:35 Resolved device XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX addresses: [quic://192.168.178.80:22000 quic://192.168.56.1:22000 tcp://192.168.178.80:22000 tcp://192.168.56.1:22000]
2023-01-27 18:45:35 Resolved device YYYYYYY-YYYYYYY-YYYYYYY-YYYYYYY-YYYYYYY-YYYYYYY-YYYYYYY-YYYYYYY addresses: []
2023-01-27 18:45:35 dialing XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX tcp://192.168.56.1:22000 prio 10
2023-01-27 18:45:35 dialing XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX tcp://192.168.178.80:22000 prio 10
2023-01-27 18:45:35 dialing XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX tcp://192.168.56.1:22000 error: dial tcp 192.168.56.1:22000: connect: network is unreachable
2023-01-27 18:45:45 dialing XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX tcp://192.168.178.80:22000 error: dial tcp 192.168.178.80:22000: i/o timeout
2023-01-27 18:45:45 failed to connect to XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX 10
2023-01-27 18:45:45 dialing XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX quic://192.168.178.80:22000 prio 100
2023-01-27 18:45:45 dialing XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX quic://192.168.56.1:22000 prio 100
2023-01-27 18:45:50 dialing XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX quic://192.168.56.1:22000 error: dial: timeout: no recent network activity
2023-01-27 18:45:50 dialing XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX quic://192.168.178.80:22000 error: dial: timeout: no recent network activity
2023-01-27 18:45:50 failed to connect to XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX 100
Windows didn't even found the address, log (ZZZZZZZ-ZZZZZZ-... is the device id of the Home Assistant instance):
2023-01-27 18:35:28 Resolved device ZZZZZZZ-ZZZZZZZ-ZZZZZZZ-ZZZZZZZ-ZZZZZZZ-ZZZZZZZ-ZZZZZZZ addresses: []
2023-01-27 18:35:28 Next connection loop in 1m0s
2023-01-27 18:36:28 Connection loop
Workaround:
When setting the address to the static ip-address of home assistant on the windows machine, both devices are able to find each other with local option: (the windows device on the HA GUI still using dynamic
)
To Reproduce
- Go to Actions -> Connections
- Disable all checkboxes except "Local Discovery"
- Save & Restart
- Now formerly connected devices aren't able to connect to each other, using dynamic addresses.
Expected behavior
I would expect local discovery to work.
Maybe this has to do something with this issue:
https://superuser.com/questions/1364353/issue-with-local-discovery-of-devices-on-dockerized-syncthing
(setting --network=host
on the docker run, but i'm not familiar with docker setup of syncthing in hassio...)
Screenshots
System
- Supervisor version: 2023.01.1
- Host system version: 9.4