Connected to already connected device

I was long puzzled by messages such as these:

[SUHPL] 05:09:09 INFO: Connected to already connected device 7ASDDJG-W4YEKEY-OTAORH7-REYEKSP-4MIBIHS-IQYEQI4-CLRJARE-DBJDLQ4 (existing: 127.0.0.1:43470-127.0.0.1:22001/tcp-client/TLS1.2-TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 new: 127.0.0.1:22000-127.0.0.1:55082/tcp-server/TLS1.2-TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384)

The solution is not obvious. I have a simple configuration between two devices, although I’m doing this through an ssh tunnel with manual configuration (not discovery). Maybe this is why the unusual condition happened to me.

In the config.xml on each device, there was a device entry for both devices, which seemed somehow logical to me but is actually incorrect. There should be device entries only for the remote device(s).

To fix it, you must stop syncthing and remove the local device - both in the section and the entire section. I did this on both sides, and then the mysterious messages stopped coming.

The local device gets added on startup regardless, so your fix is a red herring. This is just a race condition between two devices connecting to each other and one of them winning the race, the other one becoming an info message.

Yep, I confirm. Each time I “fixed” it, the errors were only pushed to the other device and the device entries in config.xml regenerate too.

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