STUN-nig party with paused devices


#1

SyncTrayzor has a feature to set all devices connected via metered connections to “paused”.

After KCP went live, I see a flood of “external address rsolutions” (few every minute) while on metered network: https://gist.github.com/anonymous/790a2f387eff5c5be23b6b9af50b1c16

Is this the expected behavior? Or should STUN “chill” a bit there?


(Audrius Butkevicius) #2

Does this happen only when devices are paused?


#3

I haven’t noticed that in other circumstances.

I do see an occasional flood of these though (probably unrelated):

[IDIDID] 16:47:48 INFO: Connected to already connected device (IDIDIDID2)
[IDIDID] 16:48:43 INFO: Connected to already connected device (IDIDIDID3)
[IDIDID] 16:51:29 INFO: Connected to already connected device (IDIDIDID2)
[IDIDID] 16:55:46 INFO: Connected to already connected device (IDIDIDID2)
[IDIDID] 16:59:50 INFO: Connected to already connected device (IDIDIDID2)
[IDIDID] 17:04:08 INFO: Connected to already connected device (IDIDIDID2)
[IDIDID] 17:07:46 INFO: Connected to already connected device (IDIDIDID2)
[IDIDID] 17:11:50 INFO: Connected to already connected device (IDIDIDID2)
[IDIDID] 17:15:34 INFO: Connected to already connected device (IDIDIDID2)
[IDIDID] 17:19:42 INFO: Connected to already connected device (IDIDIDID2)
[IDIDID] 17:23:12 INFO: Connected to already connected device (IDIDIDID2)
[IDIDID] 17:27:25 INFO: Connected to already connected device (IDIDIDID2)

Without any specific condition AFAIK. Those also started after KCP.


(Audrius Butkevicius) #4

Are you actually connected via KCP when devices are unpaused? The latter messages, is that the only thing you see? They seem truncated and other messages around them seem missing.


#5

KCP is enabled and occasionally connecting, mostly it’s on TCP though.

That’s the point, there are almost no messages around them, even though they’re not tightly timed. At some point a device would start printing those a lot.

Here’s another example over longer period, so there are a bit of other lines: https://gist.github.com/anonymous/5d034a96554f74106813afc94ca5c044

Edit: BTW, I’ve notices the “Connected to already connected device” thing on several devices, so it’s not too unique


(Audrius Butkevicius) #6

STTRACE=connections would be useful as this happens.


#7

Here are few logs with STTRACE=connections during the issue:

Log 1: https://gist.github.com/anonymous/e3ed65b57bd91fb9e4623ffc0a53127f

Log 2: https://gist.github.com/anonymous/776d79390d82d4b79064eb8e7767b2e4


(Audrius Butkevicius) #8

So are these log of devices that complain to each other about being already connected? Do you have multiple syncthing instances on the same device or something along those lines?


#9

Both logs are from the same device, just different timeframes. It complains about few other devices, as you can see:


[IDID_0] 19:41:21 INFO: Connected to already connected device (IDIDID_11)
[IDID_0] 19:41:24 INFO: Connected to already connected device (IDIDID_4)
[IDID_0] 19:41:49 INFO: Connected to already connected device (IDIDID_11)
[IDID_0] 19:42:05 INFO: Connected to already connected device (IDIDID_4)
[IDID_0] 19:42:34 INFO: Connected to already connected device (IDIDID_11)
[IDID_0] 19:42:46 INFO: Connected to already connected device (IDIDID_4)


(Audrius Butkevicius) #10

Logs from one of the other devices would be useful.

Is there anything unusual about the setup here, like to syncthings on the same box, or all the ones that you are already connected to behind the same lan or something like that?


#11

Nothing too peculiar that I can think of. Many of the devices are on the same LAN.

However, judging from the logs the Connected to already connected device happens with remote devices: desktops, android devices, which are not on the same LAN.

Unfortunately, for the same reason (different geo-location), I can’t provide their logs easily ATM. But the setups there are fairly “normal”. All running latest stable ST, which I set up a long while ago, and check up on every couple of months.


(Audrius Butkevicius) #12

The only thing I can suspect is that somehow all devices are using the same port on the NAT, but you can verify by the IPs the connections are going out/coming in if you look at the logs from both sides.


#13

I managed to get the logs from the remote device, so here they are, while complaining about one another:

local (device_9): https://gist.github.com/anonymous/7dee6a9d0979770d734ed8eeabc2a51a

remote (device_17): https://gist.github.com/anonymous/c266fadb8447c810b2d52f0801b5b8e9


(Audrius Butkevicius) #14

Thanks, I am pretty sure this is a race.

This talks more about it: https://github.com/syncthing/syncthing/pull/4533


(system) #15

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