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-83.37.232.138: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?
Thanks
It seems that two machines might have the same certificates (hence the same ID) and end up connecting to each other.
Otherwise, you config.xml might have some errors?
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.
OH, actually NAT may be to blaim, I had to define a port redirection in my router so my machines could see eachother, so I pointed port 22000 to the IP of my machine.
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.