Connecting to myself...and other console messages

Hello,

I have been using Syncthing for about 18 months now and I have to congratulate you, it is a brilliant piece of software. But now I am finding little issues that compelled me to sign up here and write to you.

I am a non-technical user, I have very little knowledge of how it all works, and I use Synctrazor on Win-10. I have noticed some messages recently in the console, and I was hoping for some more information, or instructions if I need to configure things in a better way.

The messages are:

  1. Connected to myself (“device ID”) at “LAN IP:22000”-“Public IP:Port/tcp-server” - should not happen (This message is coming up on the console every few minutes)

  2. Failed to exchange Hello messages with (partner ID) at “LAN IP:22000”-“partner IP:port”/tcp-server: EOF (I get this message from time to time, but I don’t seem to have any problem exchanging data with the other PC. The sync works fine, so this might not be a problem)

  3. A message about my router. My router is the standard ISP router from British Telecom in the UK. I know that it’s a terrible router - I just don’t know which one to buy to replace it yet.

The message says: INFO: Removing NAT port mapping: external TCP address 86.135.49.203:48782, NAT DSLF_BTHomeHub5.0 (MAC address)/External WAN Device/urn:upnp-org:serviceId:WANPPPConn1/urn:schemas-upnp-org:service:WANPPPConnection:1/http://192.168.1.254:2555/upnp/DSLF_BTHomeHub5.0 (MAC address)_ptm0/WANPPPConn1.ctl is no longer available.

I have port forwarding set up (I forward 22000-22027 to my main PC that has a fixed IP in the DCHP table) and I have also created rules in my ESET firewall to allow traffic on those ports. Again, everything seems to work fine, but I can’t help but wonder if these messages might be slowing down performance or transfer rates etc etc…

I’d appreciate any insights please and I’ll try to understand your responses as best I can.

Thank you!

P.S. If you’d like to recommend a router that works particularly well with Syncthing, that’d be great too!

Do you have multiple devices behind the same router? Do you have port forwarding for any other device setup?

Hello,

Yes, I have my PC, a laptop, a tablet and phones connected to the router. My laptop is behind the same router, and set up for Syncthing, but I don’t tend to use it when at home with the main PC. The same is true for my mobile phone. Syncthing is mainly used when out of the house, to sync back to the main PC to ensure I have a copy of important data.

A quick check of my router port forwarding settings shows that I have opened 22000-22020 to the main PC only, and I don’t know why I configured it like that. Should I change it to 22000-22027, and/or configure a specific port for the PC? I realize too that I have no specific port forwarded to the laptop, for when it is at home and I decide that I might want to connect it to Syncthing. What could I do in this case?

Besides Syncthing, I have 2 more services that forward to my main PC, on totally different ports - if you need this info, just let me know…

So I am pretty sure it’s caused by having to devices listening on the same port within the same LAN.

Device A listens on 22000, and has port forwarding setup on port 22000 on the router. Now as A announces itself to discovery server, one of the addresses it announces is :22000, which means take the external address you see, and add 22000 as the port, this way devices don’t need to know their external addresses. Now if you have device B in the same network, the same thing will happen, which means you’ll have two devices announcing the same externalip:22000 address, yet forwarding is only done for A. When A goes looking for B, it sees the externalip:22000 as one of the addresses for B and tries to connect to it. Given router is wired to direct that to A, A ends up connecting to itself.

You can fix this by changing the listen port on B from 22000 to some other port so that the announcements don’t clash.

This means replacing default sync protocol listen address with manually expanded addresses which I think you can find somewhere in the docs.

Technically you can just ignore this, as at some point the devices should find each other using local discovery at which point local addressses will be prefered.

If they geniunely are not able to connect directly (only via relay) then it could be that you LAN has multicasts/broadcasts disabled, and you might have to configure addresses manually.

I thank you again for responding quickly.

I understand (I think) what you’re saying, but at the time I am receiving these console messages, I only have one device with syncthing open on my LAN, so I’m not sure how two devices can be listening on the same LAN if rarely on at the same time.

You are right though that when I do connect a second device on the LAN, I don’t have problems connecting and Syncthing does detect they are local (and so doesn’t connect through a relay)

I could perhaps change the listening address on my main PC and I will look into that right away. I will also check if I am connected by relay, although I’m fairly sure I’m not.

I do believe, as you say, that the devices find each other using local discovery, and I could just ignore it.

I don’t know if my router has multicasts or broadcasts disabled…

Do you think that port forwarding 22000 to device A and 22001 to device B for example, and then changing listening addresses, could help?

Yes, but B also needs to listen on 22001, not 22000 for this to work correctly.

1 Like

Yes, that’s what I meant - port forward 22000 to A, 22001 to B and change their listening addresses accordingly. The only thing I need to work out is how to do that properly. I know I can’t just change the word default to the por number - there’s a code to put in…

It’s explained in the docs

I think you can find it here: https://docs.syncthing.net/users/config.html#listen-addresses

Thank you!

OK, so to carry on this thread. I did indeed go into the settings, and I set my main computer as tcp://0.0.0.0:22000 and my laptop as tcp://0.0.0.0:22001 and I no longer received “listening to myself” messages. So thanks for that solution!

So, it worked…at least for a while…each device showed a connection to the other corresponding to its LAN IP, and the correct port. It even sometimes switched to an IPv6 address, which I only imagined would be good at making large files sync faster…

Then, last week I had a massive computer crash. The PCB board on my main hard drive just fried. So I’ve had to rebuild, including the index databases for syncthing. To get to the point, I had to set up my firewall rules again, and I am not sure what I’m doing wrong, but I can’t get the two devices to connect showing the correct port, or even the LAN. They see each other, but show the public IP address and a random port.

I require some clarification please on the firewall rules. What I set was:

Main computer:

  1. TCP port 22000, both in and out, both local and remote - all marked as trusted zone. I specified the application as syncthing.exe rather than synctrazor, which is what I also understand to be correct.

  2. Also, UDP port in only, port 21027 (I did this because my Firewall kept blocking requests on this port, so I figured I needed it) Again I set this as local and remote and specified the application.

Laptop:

  1. Same as (1) above, just with port 22001.
  2. Same as (2) above.

FYI, my firewall is ESET Internet Security, but I think I’ll soon go back to Norton Security.

Thanks again for all your help so far and I hope I’m not missing something really obvious that’s in the manual!

The random port stuff means its an outgoing connection. Outgoing connections get a random port assigned by the OS.

You can check what addresses are discovered for the remote device in the web ui and see if those are connectable to.

OK, I’ll check that, thank you.

Paying lots of attention to the console yesterday, I noticed 2 “new” messages, and not sure if everything is related…they are:

  • something about “inappropriate TLS fallback”
  • failing to exchange hello messages with the device ID xxxx

Having said all of that, I’ve indexed and sync’d all my folders and data now, so the program is actually working and doing what it’s supposed to do! I just want to iron out any port/firewall issues, and these random messages…to make sure that the program is performing 100%.

Thank you!

These are just broken connections half way through the handshake

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