Troubleshooting Docker local-only discovery

I’m trying to troubleshoot why local-only discovery doesn’t seem to work from within Docker containers. I normally set the node URL for the server, which works fine. This is purely for ‘dynamic’ local-only discovery.

Setup (both machines on the same local network) Server node - Global discovery disabled, laptop node set to ‘dynamic’, local discovery and Upnp enabled Laptop node - Global discovery disabled, server node set to ‘dynamic’, local discovery and Upnp enabled

Both machines are running Syncthing inside a Docker container with ports 22000, 21025/udp and 8080 all forwarded to the container from the host. Both machines are using UFW with 22000/tcp and 21025/udp allowed.

Here are the laptop logs with STTRACE=net,upnp,discover,beacon and the networking information from inside the container (ip r and ip a). https://gist.github.com/1ce1bbea9f8e82ac71b7

Is there anything else I can do to troubleshoot? Networking is not my strong suit!

Thanks! Scott

1 Like

So, local discovery uses broadcasts and ipv6 multicasts to find other syncers on the same LAN. In Docker, unless I’m mistaken, each container get their own interface towards the host. In that setup there’s no shared network on which announcements from one container could be seen by the others.

True, but with the discovery port (21025/udp) open between the container and the host, why wouldn’t that signal be visible (I’m sure my terminology is a little off here) on the ‘real’ network that connects the two Docker hosts (laptop and server) ? I know UpNp doesn’t work because there are other ports involved (that aren’t open), but I thought that the discovery happened on the 21025/udp port.

I have a Plex container running on the server, and in order for the network discovery to happen (for the Roku to be able to see the Plex container), I have to have ports 5353, 32400, 32410/udp, 32412/udp, 32412/udp, 32413/udp, 32414/udp, 32443/udp, and 32463/udp all opened. I’m not sure exactly what network discovery mechanism they use, other than the Avahi-daemon is also running inside the Plex container.

Thanks! Scott

Verified. I am also experiencing this issue.

I had this exact issue with synching in a docker on unRaid.The fix was to tell the docker to be configured as ‘Host’ and not ‘Bridge’. The docker maintainer has it set to ‘bridge’ by default. After I made this change, everything worked as expected. You still do have to keep the ports between the container and host set exactly as is mentioned in the first post.

Thanks! That seems to work. On a host with multiple different services running inside containers there may be some issues with sorting out ports, but for most people I don’t think that will be a major problem.

Scott