Connection problems (Context deadline exceeded / i/o timeout)

Running syncthing between a Windows PC and an Android phone, on a home wifi network. Syncthing has worked before, but only works 5% of the time. I don’t know what makes it work when it does. Almost always, I get an error like this:

image

On both the PC and the phone, I have:
local discovery: on
global discovery: off
NAT traversal: on

Syncthing version 1.3.0 on both ends. I’ve tried turning my Windows firewall off, it seems to not have an effect.

How can I debug this? Thank you.

[YABFW] 09:08:14 INFO: Completed initial scan of sendreceive folder "aaa" (yejvq-swwww)
[YABFW] 09:08:14 INFO: Completed initial scan of sendonly folder "bbb" (lqb71-8ng9m)
[YABFW] 09:08:15 INFO: GUI and API listening on 127.0.0.1:8384
[YABFW] 09:08:15 INFO: Access the GUI via the following URL: https://localhost:8384/
[YABFW] 09:08:15 INFO: My name is "WINDOWS-0N1UF2U"
[YABFW] 09:08:15 INFO: Device X3Q52J7 is "ANDROID" at [dynamic]
[YABFW] 09:08:25 INFO: Detected 0 NAT services
[YABFW] 09:08:33 INFO: quic://0.0.0.0:22000 detected NAT type: Port restricted NAT
[YABFW] 09:08:33 INFO: quic://0.0.0.0:22000 resolved external address quic://76.102.150.9:22000 (via stun.syncthing.net:3478)
[YABFW] 09:08:55 INFO: Pausing X3Q52J7

It seems one of the devices is paused based on the logs?

I paused and unpaused to see if that would make a difference. The pause got included in the log, please ignore this. Thanks.

Timeouts mean the other side couldn’t be reached. In 99% of cases this is the firewall, host-local or actual, not being disabled. I know you say you disabled it, though.

(The remaining 1% being networking issues of various kinds I expect.)

Good to know, thanks you!

I’ve turned off the Windows firewall (is it normally necessary to do this for syncthing?). I believe my router doesn’t have a firewall for inter-client traffic, but I’ll check again (I use dd-wrt with stock settings. Any recommendations here?). My phone is stock android, nothing special there.

Does my screenshot show that my hosts (Windows + android) are connecting to each other initially, but then timing out?

How can I test or debug to see if I have firewall issues, or if I’m having a rarer, 1% networking issue? Can I perhaps telnet to the other host? How would I do this? I’m happy to debug in any other way you might recommend.

Thanks again!

I think I have it working! I had to setup port forwarding on my router as mentioned in https://docs.syncthing.net/users/firewall.html

I thought I had UPnP enabled, but I never saw the log line indicated in that page, so perhaps I didn’t. This still doesn’t explain why Syncthing worked occasionally. But it seems to be working reliably now.

Thank you for pointing me in the right direction, much appreciated. And thanks for writing and maintaining Syncthing, it’s wonderful and highly useful, and being open source, is the only transfer program I’d trust!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.