Failed to discover gateway / Detected 0 NAT device

I have three instances of Syncthing 0.14.7 (also tested with previous 0.14.6), one running in a Windows 10 64bit machine, one in a RPi2 and another one in an Android tablet. Two weeks ago all instance works fine with the router UPnP/NAT, configuring all port mappings without any problem. One day, I don’t know why (Windows update?), the Windows instance reports “Failed to discover gateway no gateway found” and “Detected 0 NAT device”, all other devices does not have any problem with the router UPnP/NAT. I’ve disabled the firewall (previously works fine with this, I’ve added syncthing as exception), but still does not work. I’ve powered off all switches between the computer and the router, also the router, with same results. Here is the log:

[VH3TE] 2016/09/21 10:47:37.360346 main.go:1017: INFO: Restarting
[VH3TE] 2016/09/21 10:47:37.365353 static.go:164: INFO: Disconnected from relay relay://163.172.132.71:990
[VH3TE] 2016/09/21 10:47:37.365353 main.go:803: INFO: Exiting
[VH3TE] 2016/09/21 10:47:38.317750 main.go:568: INFO: syncthing v0.14.7 "Dysprosium Dragonfly" (go1.7.1 windows-amd64) jenkins@build.syncthing.net 2016-09-18 19:02:42 UTC
[VH3TE] 2016/09/21 10:47:38.387853 main.go:569: INFO: My ID: VH3TEBZ
[VH3TE] 2016/09/21 10:47:38.693303 main.go:856: INFO: Single thread hash performance is ~94 MB/s
[VH3TE] 2016/09/21 10:47:38.855930 model.go:186: INFO: Ready to synchronize sm-t533-photos (readwrite)
[VH3TE] 2016/09/21 10:47:38.931040 model.go:186: INFO: Ready to synchronize ahuso-2d9yg (readwrite)
[VH3TE] 2016/09/21 10:47:41.288531 model.go:186: INFO: Ready to synchronize kmjqw-6g4nb (readwrite)
[VH3TE] 2016/09/21 10:47:41.465788 model.go:186: INFO: Ready to synchronize cuy7t-z4wvn (readwrite)
[VH3TE] 2016/09/21 10:47:43.534005 model.go:186: INFO: Ready to synchronize oyzsv-m3c5p (readwrite)
[VH3TE] 2016/09/21 10:47:43.534005 main.go:710: INFO: Using discovery server https://discovery-v4-2.syncthing.net/v2/?id=DVU36WY
[VH3TE] 2016/09/21 10:47:43.534005 main.go:710: INFO: Using discovery server https://discovery-v4-3.syncthing.net/v2/?id=VK6HNJ3
[VH3TE] 2016/09/21 10:47:43.534005 main.go:710: INFO: Using discovery server https://discovery-v4-4.syncthing.net/v2/?id=LYXKCHX
[VH3TE] 2016/09/21 10:47:43.534005 main.go:710: INFO: Using discovery server https://discovery-v6-2.syncthing.net/v2/?id=DVU36WY
[VH3TE] 2016/09/21 10:47:43.534005 main.go:710: INFO: Using discovery server https://discovery-v6-3.syncthing.net/v2/?id=VK6HNJ3
[VH3TE] 2016/09/21 10:47:43.535009 main.go:710: INFO: Using discovery server https://discovery-v6-4.syncthing.net/v2/?id=LYXKCHX
[VH3TE] 2016/09/21 10:47:43.562049 rwfolder.go:302: INFO: Completed initial scan (rw) of folder sm-t533-photos
[VH3TE] 2016/09/21 10:47:43.572065 tcp_listen.go:69: INFO: TCP listener ([::]:22000) starting
[VH3TE] 2016/09/21 10:47:43.639160 main.go:755: INFO: Device CXAXYZK is "Tablet" at [dynamic]
[VH3TE] 2016/09/21 10:47:43.639160 main.go:755: INFO: Device MV62HJ4 is "RPi2" at [tcp://openelec:22000]
[VH3TE] 2016/09/21 10:47:43.640166 main.go:755: INFO: Device VH3TEBZ is "Cuartillo" at [dynamic]
[VH3TE] 2016/09/21 10:47:43.640166 main.go:755: INFO: Device YI47SVR is "Trabajo" at [dynamic]
[VH3TE] 2016/09/21 10:47:43.653183 gui.go:332: INFO: GUI and API listening on 127.0.0.1:8384
[VH3TE] 2016/09/21 10:47:43.653183 gui.go:333: INFO: Access the GUI via the following URL: https://localhost:8384/
[VH3TE] 2016/09/21 10:47:44.624610 upnp.go:150: DEBUG: Starting discovery of device type urn:schemas-upnp-org:device:InternetGatewayDevice:1 on Red local
[VH3TE] 2016/09/21 10:47:44.631620 upnp.go:150: DEBUG: Starting discovery of device type urn:schemas-upnp-org:device:InternetGatewayDevice:1 on isatap.{9B693C72-B726-4F21-971D-FEF049113102}
[VH3TE] 2016/09/21 10:47:44.641636 upnp.go:150: DEBUG: Starting discovery of device type urn:schemas-upnp-org:device:InternetGatewayDevice:2 on isatap.{9B693C72-B726-4F21-971D-FEF049113102}
[VH3TE] 2016/09/21 10:47:44.668675 upnp.go:154: DEBUG: listen udp4 239.255.255.250:0: setsockopt: no such network interface
[VH3TE] 2016/09/21 10:47:44.669677 upnp.go:150: DEBUG: Starting discovery of device type urn:schemas-upnp-org:device:InternetGatewayDevice:2 on Red local
[VH3TE] 2016/09/21 10:47:44.677688 upnp.go:150: DEBUG: Starting discovery of device type urn:schemas-upnp-org:device:InternetGatewayDevice:1 on Teredo Tunneling Pseudo-Interface
[VH3TE] 2016/09/21 10:47:44.715744 upnp.go:150: DEBUG: Starting discovery of device type urn:schemas-upnp-org:device:InternetGatewayDevice:1 on VirtualBox Host-Only Network
[VH3TE] 2016/09/21 10:47:44.730766 upnp.go:150: DEBUG: Starting discovery of device type urn:schemas-upnp-org:device:InternetGatewayDevice:2 on Teredo Tunneling Pseudo-Interface
[VH3TE] 2016/09/21 10:47:44.744787 upnp.go:154: DEBUG: listen udp4 239.255.255.250:0: setsockopt: no such network interface
[VH3TE] 2016/09/21 10:47:44.749793 upnp.go:150: DEBUG: Starting discovery of device type urn:schemas-upnp-org:device:InternetGatewayDevice:1 on isatap.Home
[VH3TE] 2016/09/21 10:47:44.758807 upnp.go:165: DEBUG: Sending search request for device type urn:schemas-upnp-org:device:InternetGatewayDevice:1 on Red local
[VH3TE] 2016/09/21 10:47:44.759809 upnp.go:150: DEBUG: Starting discovery of device type urn:schemas-upnp-org:device:InternetGatewayDevice:2 on isatap.Home
[VH3TE] 2016/09/21 10:47:44.777835 upnp.go:150: DEBUG: Starting discovery of device type urn:schemas-upnp-org:device:InternetGatewayDevice:1 on isatap.{BC3EA569-A91F-44A4-AF5E-66FCDE28B050}
[VH3TE] 2016/09/21 10:47:44.809883 upnp.go:154: DEBUG: listen udp4 239.255.255.250:0: setsockopt: no such network interface
[VH3TE] 2016/09/21 10:47:44.809883 upnp.go:173: DEBUG: Listening for UPnP response for device type urn:schemas-upnp-org:device:InternetGatewayDevice:1 on Red local
[VH3TE] 2016/09/21 10:47:44.810884 upnp.go:150: DEBUG: Starting discovery of device type urn:schemas-upnp-org:device:InternetGatewayDevice:2 on VirtualBox Host-Only Network
[VH3TE] 2016/09/21 10:47:44.836923 upnp.go:150: DEBUG: Starting discovery of device type urn:schemas-upnp-org:device:InternetGatewayDevice:2 on isatap.{BC3EA569-A91F-44A4-AF5E-66FCDE28B050}
[VH3TE] 2016/09/21 10:47:44.839927 upnp.go:154: DEBUG: listen udp4 239.255.255.250:0: setsockopt: no such network interface
[VH3TE] 2016/09/21 10:47:44.840927 upnp.go:165: DEBUG: Sending search request for device type urn:schemas-upnp-org:device:InternetGatewayDevice:1 on VirtualBox Host-Only Network
[VH3TE] 2016/09/21 10:47:44.843932 upnp.go:150: DEBUG: Starting discovery of device type urn:schemas-upnp-org:device:InternetGatewayDevice:1 on VirtualBox Host-Only Network #2
[VH3TE] 2016/09/21 10:47:44.854950 upnp.go:154: DEBUG: listen udp4 239.255.255.250:0: setsockopt: no such network interface
[VH3TE] 2016/09/21 10:47:44.867968 upnp.go:150: DEBUG: Starting discovery of device type urn:schemas-upnp-org:device:InternetGatewayDevice:2 on VirtualBox Host-Only Network #2
[VH3TE] 2016/09/21 10:47:44.870973 upnp.go:154: DEBUG: listen udp4 239.255.255.250:0: setsockopt: no such network interface
[VH3TE] 2016/09/21 10:47:44.877982 upnp.go:154: DEBUG: listen udp4 239.255.255.250:0: setsockopt: no such network interface
[VH3TE] 2016/09/21 10:47:44.886996 upnp.go:150: DEBUG: Starting discovery of device type urn:schemas-upnp-org:device:InternetGatewayDevice:1 on Loopback Pseudo-Interface 1
[VH3TE] 2016/09/21 10:47:44.898012 upnp.go:173: DEBUG: Listening for UPnP response for device type urn:schemas-upnp-org:device:InternetGatewayDevice:1 on VirtualBox Host-Only Network
[VH3TE] 2016/09/21 10:47:44.902018 upnp.go:150: DEBUG: Starting discovery of device type urn:schemas-upnp-org:device:InternetGatewayDevice:2 on Loopback Pseudo-Interface 1
[VH3TE] 2016/09/21 10:47:44.915036 upnp.go:165: DEBUG: Sending search request for device type urn:schemas-upnp-org:device:InternetGatewayDevice:2 on VirtualBox Host-Only Network
[VH3TE] 2016/09/21 10:47:44.927057 upnp.go:154: DEBUG: listen udp4 239.255.255.250:0: setsockopt: no such network interface
[VH3TE] 2016/09/21 10:47:44.929058 upnp.go:165: DEBUG: Sending search request for device type urn:schemas-upnp-org:device:InternetGatewayDevice:1 on VirtualBox Host-Only Network #2
[VH3TE] 2016/09/21 10:47:44.941076 upnp.go:165: DEBUG: Sending search request for device type urn:schemas-upnp-org:device:InternetGatewayDevice:2 on VirtualBox Host-Only Network #2
[VH3TE] 2016/09/21 10:47:44.941076 upnp.go:173: DEBUG: Listening for UPnP response for device type urn:schemas-upnp-org:device:InternetGatewayDevice:2 on VirtualBox Host-Only Network
[VH3TE] 2016/09/21 10:47:44.951089 upnp.go:173: DEBUG: Listening for UPnP response for device type urn:schemas-upnp-org:device:InternetGatewayDevice:1 on VirtualBox Host-Only Network #2
[VH3TE] 2016/09/21 10:47:44.961105 upnp.go:165: DEBUG: Sending search request for device type urn:schemas-upnp-org:device:InternetGatewayDevice:1 on Loopback Pseudo-Interface 1
[VH3TE] 2016/09/21 10:47:44.967114 upnp.go:173: DEBUG: Listening for UPnP response for device type urn:schemas-upnp-org:device:InternetGatewayDevice:2 on VirtualBox Host-Only Network #2
[VH3TE] 2016/09/21 10:47:44.990147 upnp.go:165: DEBUG: Sending search request for device type urn:schemas-upnp-org:device:InternetGatewayDevice:2 on Loopback Pseudo-Interface 1
[VH3TE] 2016/09/21 10:47:44.994154 upnp.go:173: DEBUG: Listening for UPnP response for device type urn:schemas-upnp-org:device:InternetGatewayDevice:1 on Loopback Pseudo-Interface 1
[VH3TE] 2016/09/21 10:47:45.010176 upnp.go:165: DEBUG: Sending search request for device type urn:schemas-upnp-org:device:InternetGatewayDevice:2 on Red local
[VH3TE] 2016/09/21 10:47:45.016185 upnp.go:173: DEBUG: Listening for UPnP response for device type urn:schemas-upnp-org:device:InternetGatewayDevice:2 on Red local
[VH3TE] 2016/09/21 10:47:45.016185 upnp.go:173: DEBUG: Listening for UPnP response for device type urn:schemas-upnp-org:device:InternetGatewayDevice:2 on Loopback Pseudo-Interface 1
[VH3TE] 2016/09/21 10:47:45.292593 pmp.go:27: DEBUG: Failed to discover gateway no gateway found
[VH3TE] 2016/09/21 10:47:45.437806 rwfolder.go:302: INFO: Completed initial scan (rw) of folder cuy7t-z4wvn
[VH3TE] 2016/09/21 10:47:45.491885 rwfolder.go:302: INFO: Completed initial scan (rw) of folder ahuso-2d9yg
[VH3TE] 2016/09/21 10:47:54.759500 upnp.go:192: DEBUG: Discovery for device type urn:schemas-upnp-org:device:InternetGatewayDevice:1 on Red local finished.
[VH3TE] 2016/09/21 10:47:54.841622 upnp.go:192: DEBUG: Discovery for device type urn:schemas-upnp-org:device:InternetGatewayDevice:1 on VirtualBox Host-Only Network finished.
[VH3TE] 2016/09/21 10:47:54.915733 upnp.go:192: DEBUG: Discovery for device type urn:schemas-upnp-org:device:InternetGatewayDevice:2 on VirtualBox Host-Only Network finished.
[VH3TE] 2016/09/21 10:47:54.929751 upnp.go:192: DEBUG: Discovery for device type urn:schemas-upnp-org:device:InternetGatewayDevice:1 on VirtualBox Host-Only Network #2 finished.
[VH3TE] 2016/09/21 10:47:54.941768 upnp.go:192: DEBUG: Discovery for device type urn:schemas-upnp-org:device:InternetGatewayDevice:2 on VirtualBox Host-Only Network #2 finished.
[VH3TE] 2016/09/21 10:47:54.961800 upnp.go:192: DEBUG: Discovery for device type urn:schemas-upnp-org:device:InternetGatewayDevice:1 on Loopback Pseudo-Interface 1 finished.
[VH3TE] 2016/09/21 10:47:54.990840 upnp.go:192: DEBUG: Discovery for device type urn:schemas-upnp-org:device:InternetGatewayDevice:2 on Loopback Pseudo-Interface 1 finished.
[VH3TE] 2016/09/21 10:47:55.010870 upnp.go:192: DEBUG: Discovery for device type urn:schemas-upnp-org:device:InternetGatewayDevice:2 on Red local finished.
[VH3TE] 2016/09/21 10:47:55.010870 service.go:61: INFO: Detected 0 NAT devices
[VH3TE] 2016/09/21 10:47:55.483565 static.go:92: INFO: Joined relay relay://212.47.253.154:22067
[VH3TE] 2016/09/21 10:47:57.538584 rwfolder.go:302: INFO: Completed initial scan (rw) of folder kmjqw-6g4nb
[VH3TE] 2016/09/21 10:48:00.826814 rwfolder.go:302: INFO: Completed initial scan (rw) of folder oyzsv-m3c5p
[VH3TE] 2016/09/21 10:48:01.647820 service.go:257: INFO: Established secure connection to MV62HJ4 at 192.168.1.132:62142-192.168.1.196:22000 (TCP (Client))
[VH3TE] 2016/09/21 10:48:01.648920 model.go:1259: INFO: Device MV62HJ4 client is "syncthing v0.14.7" named "RPi2"
[VH3TE] 2016/09/21 10:48:01.786250 model.go:964: INFO: Connection to MV62HJ4 closed: reading length: read tcp 192.168.1.132:62142->192.168.1.196:22000: wsarecv: Se ha forzado la interrupción de una conexión existente por el host remoto.
[VH3TE] 2016/09/21 10:48:20.285545 service.go:257: INFO: Established secure connection to MV62HJ4 at 192.168.1.132:62160-192.168.1.196:22000 (TCP (Client))
[VH3TE] 2016/09/21 10:48:20.286553 model.go:1259: INFO: Device MV62HJ4 client is "syncthing v0.14.7" named "RPi2"
[VH3TE] 2016/09/21 10:48:20.308586 model.go:811: INFO: Device MV62HJ4 folder "kmjqw-6g4nb" is delta index compatible (mlv=29896)
[VH3TE] 2016/09/21 10:48:20.308586 model.go:811: INFO: Device MV62HJ4 folder "cuy7t-z4wvn" is delta index compatible (mlv=1220)

What’s wrong?

The message doesn’t mean much, it just failed to find a nat pmp gateway which is different from upnp.

Check if windows recognizes your network as public or private. If it’s public, it prevents multicasts from leaving the machine.

Also, verify that upnp is on on the router.

It’s configured as private.

As mentioned in the original post, UPnP is enabled and working. Other instances of Syncthing running in my network setups the NAT without any problem. I’ve see all mapings in the router NAT view, except for the Windows machine.

I’ve captured the broadcast in the RPi2 (port 1900) and restarted all synthing instances in my network with the next results:

OpenELEC:~ # tcpdump -i eth0 'port 1900'
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
13:29:30.567321 IP 192.168.1.1.36862 > 239.255.255.250.ssdp: UDP, length 411
13:29:30.677251 IP 192.168.1.1.36862 > 239.255.255.250.ssdp: UDP, length 420
13:29:30.787537 IP 192.168.1.1.36862 > 239.255.255.250.ssdp: UDP, length 483
13:29:30.898205 IP 192.168.1.1.54852 > 239.255.255.250.ssdp: UDP, length 465
13:29:31.008568 IP 192.168.1.1.49357 > 239.255.255.250.ssdp: UDP, length 420
13:29:31.119020 IP 192.168.1.1.49357 > 239.255.255.250.ssdp: UDP, length 459
13:29:31.239006 IP 192.168.1.1.34285 > 239.255.255.250.ssdp: UDP, length 491
13:29:31.349423 IP 192.168.1.1.50704 > 239.255.255.250.ssdp: UDP, length 420
13:29:31.459421 IP 192.168.1.1.50704 > 239.255.255.250.ssdp: UDP, length 479
13:29:31.569942 IP 192.168.1.1.54080 > 239.255.255.250.ssdp: UDP, length 473
13:29:31.680197 IP 192.168.1.1.53794 > 239.255.255.250.ssdp: UDP, length 487
13:29:37.916521 IP openelec.home.34527 > 239.255.255.250.ssdp: UDP, length 165
13:29:37.918179 IP openelec.home.38976 > 239.255.255.250.ssdp: UDP, length 165
13:35:27.254421 IP android-ed3e8e3479d80e14.home.48624 > 239.255.255.250.ssdp: UDP, length 165
13:35:27.267273 IP android-ed3e8e3479d80e14.home.44546 > 239.255.255.250.ssdp: UDP, length 165
13:36:31.568493 IP 192.168.1.1.40729 > 239.255.255.250.ssdp: UDP, length 411
13:36:31.678476 IP 192.168.1.1.40729 > 239.255.255.250.ssdp: UDP, length 420
13:36:31.788668 IP 192.168.1.1.40729 > 239.255.255.250.ssdp: UDP, length 483
13:36:31.899306 IP 192.168.1.1.52491 > 239.255.255.250.ssdp: UDP, length 465
13:36:32.009555 IP 192.168.1.1.38781 > 239.255.255.250.ssdp: UDP, length 420
13:36:32.119804 IP 192.168.1.1.38781 > 239.255.255.250.ssdp: UDP, length 459
13:36:32.230072 IP 192.168.1.1.49986 > 239.255.255.250.ssdp: UDP, length 491
13:36:32.340414 IP 192.168.1.1.58561 > 239.255.255.250.ssdp: UDP, length 420
13:36:32.450495 IP 192.168.1.1.58561 > 239.255.255.250.ssdp: UDP, length 479
13:36:32.562679 IP 192.168.1.1.54646 > 239.255.255.250.ssdp: UDP, length 473
13:36:32.671448 IP 192.168.1.1.44317 > 239.255.255.250.ssdp: UDP, length 487

There is only traffic from the router, RPi2 and the Android tablet. Windows machine is muted.

If no more susgestions about the problem, I’ll try to capture data packets in the Windows machine to see what’s happend. It seams that packets does not leave the Windows machine…

I’ve found the problem: one of my switches between the Windows computer and router are blocking the UPnP broadcast packets generated by the computer. The solution was enable IGMP Snooping of the switch. Thanks for all…

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