The When starting syncthing I get the following code:
[MGG2A] 13:46:40 INFO: Connected to myself (MGG2AF4-AR5Y7BD-VHRJGDW-5JVLX6R-5BNNFAT-TVJ7C5U-VX5VQS6-D4YGZAV) - should not happen
[MGG2A] 13:46:40 INFO: TLS handshake: WSARecv tcp 192.168.1.33:50046: An existing connection was forcibly closed by the remote host.
[MGG2A] 13:46:57 INFO: Established secure connection to OVSOI6W-TAYZFMX-GENVPTO-EKEFVQ4-JMDAK3R-B7JVEPL-FJE4WWV-SWI2LAZ at 192.168.1.33:22000-126.96.36.199:49606
Right after this executes my system detects all my other computers and syncs perfectly. But I’m not really sure about the “connected to myself” thing.
Is this a misconfiguration on my side?
I checked and all my systems have different ID’s is there any way to list all ID’s a computer has registered as ‘nodes’ and manually delete an entry?
Every now and then my machine connects to itself and halts all syncing.
I mean I am looking at the code, and this seems to be impossible, as we always check before connecting to someone that that someone is not ourself:
So even two nodes having the same set of certificates shouldn’t be able to cause this.
Perhaps you share the same certificate with some other service which then by accident connects to syncthings port?!
I don’t know, you have to provide steps how to reproduce it, as it seems impossible to me.
I had this happen a lot, and indeed port forwarding is the problem.
If the two nodes are on the same network and then find each other through the global discovery server both will be forwarded to the same IP when connecting back. For some reason local discovery dosen’t seem to happen that often.
I’m trying out setting a local IP adress as an explicit first adress for all nodes i.e. in my case the IP of the node is set to 10.0.1.5:22000,dynamic, which seems to lead to a succesfull local connection most of the time.
I have the same setup: portforwarding for all nodes to be reachable from the outside (via dynDNS), but global and local discovery disabled. All nodes on same lan only have internalname:port as address - but this “error” still happens sometimes.
This “error” is weird, because it “should not happen” but it happens and the user cannot change anything…
I had the same error and it stopped after I enabled UPnP on my router.
Its may be causes because in syncthing I enabled the option for UPnP without enabling UPnP on my router but I used a manual mapping instead
Two boxes behind the same NAT will cause this as well, if local discovery isn’t working for whatever reason.
(Global discovery returns the external IP for both devices, and one of them will be be port mapped at 22000, which when it tries to connect to the other gets forwarded to itself and closes the connection with this message.)
I honestly doubt that. We are not talking about accessible devices behind the NAT / port forward, but syncthing devices in general.
If you have 2 devices at home, one with a port forward and both have global discovery enabled, the discovery server has both devices with the same IP and port in the list. As soon as the device without the forward isn’t reachable locally any more, the device with the port forward will try to connect through global discovery, gets your internet IP and his own listening port and tries to connect to itself.
You will have to either disable global discovery or assign a unique listening port to every device. (I did the latter, and the messages about “conected to myself” stopped)
Yes, and UPnP deals with this by mapping a pseudo-random port.
If you do not have UPnP and you want both devices to be accessible from the outside, you need to move one of them on a different port (22001 for example), and make sure the port you map on the gateway matches the the listen port.