Connection repeatedly closed

I’ve seen this issue posted about, and someone always blames some external software or network device. If that is the case, please give me some direction to narrow down the culprit, and/or test the machine/connection…

I’ve been using Syncthing on the LAN without issue for awhile. I’m starting to use it to sync a large folder on a remote macOS machine (in a data center). The folder is on the remote machine, setup as a Send Only folder. I had to manually add it to the local machine as a Receive Only folder.

Here’s a log from the local machine:

2021-02-23 13:13:10 wrote 163 bytes on the wire (2 bytes length, 2 bytes header, 4 bytes message length, 155 bytes message), err=<nil>
2021-02-23 13:13:11 close due to reading message: local error: tls: bad record MAC
2021-02-23 13:13:11 Connection to {--omitted--} at 192.168.88.23:22000-207.{--omitted--}:22000/tcp-client/TLS1.3-TLS_AES_128_GCM_SHA256 closed: reading message: local error: tls: bad record MAC

Here’s a log from the remote machine (different timezone):

2021-02-23 10:13:10 wrote 131087 bytes on the wire (2 bytes length, 2 bytes header, 4 bytes message length, 131079 bytes message), err=<nil>
2021-02-23 10:13:10 read Request message
2021-02-23 10:13:10 read Request message
2021-02-23 10:13:11 close due to reading length: remote error: tls: bad record MAC
2021-02-23 10:13:11 wrote 131087 bytes on the wire (2 bytes length, 2 bytes header, 4 bytes message length, 131079 bytes message), err=<nil>
2021-02-23 10:13:11 wrote 0 bytes on the wire (2 bytes length, 2 bytes header, 4 bytes message length, 131079 bytes message), err=tls: use of closed connection
2021-02-23 10:13:11 Connection to {--omitted--} at 207.{--omitted--}:22000-70.{--omitted--}:22000/tcp-server/TLS1.3-TLS_AES_128_GCM_SHA256 closed: reading length: remote error: tls: bad record MAC
2021-02-23 10:13:18 Connection loop
2021-02-23 10:13:18 Resolved device {--omitted--} addresses: []

The tls error is occurring every few minutes.

The remote machine is running macOS 10.13.6, and syncthing 1.13.1. It is in a data center directly on a public IP. Syncthing relaying and discovery is OFF.

The local machine is running macOS 10.14.6 and syncthing 1.13.1. It is in a LAN with port 22000 forwarded. Syncthing relaying is OFF; discovery is ON.

Both DO have a software firewall configured, but they are both currently allowing all in/out traffic to Syncthing. I think most other settings are default for Syncthing.

Just configured this today, and it has managed to sync 1% of 244GB, so the error is not occurring with all transmissions…

Something is interfering with your traffic, altering it. Possibly broken firewall / vpn / antivirus / proxy software, possibly hardware error (bad RAM, network interface, …).

On the remote/sender side I take it? It’s not possible it’s the result of a Syncthing configuration?

What can I do to narrow it down?

What can I do to test it without Syncthing?

It’s not a configuration thing, no. I don’t know the answer to the rest of the questions.

Thank you. I’m replying now just to document the resolution to my issue. I was focused on the remote machine, but the local hardware was at fault.

I noticed a small amount of packet loss, and after swapping out the USB Ethernet dongle now have solid connections via Syncthing.

2 Likes

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