Unable to add the worker nodes to existing swarm?

Hello team,

Unable to add worker node to existing swarm, getting below error.

Error response from daemon: rpc error: code = Unavailable desc = connection error: desc = “transport: Error while dialing dial tcp 192.168.x.x:2377: connect: connection refused”

I’ve tried running this commands from manager node as directed in the docker documentation. Please help understand what is wrong with it.


Have you tried to search for the issue on the forum?

Yeah! I searched but didn’t get the exact what I was looking for it hence put separately. Thanks for reply, let me go through the link you provided.

Getting already in use from both destination to source. I’ve referred one of the Redhat article to use this command in centos as OS is centos7. But again I’m getting same error if run the docker swarm command to join as worker node. Please correct if anything wrong here.

[@co~]# socat TCP4-LISTEN:2377 TCP4:192.168.0.x.2377
2024/01/28 18:21:55 socat[9897] E bind(5, {AF=2}, 16): Address already in use


@worker_node01 ~]# socat TCP4-LISTEN:2377 TCP4:192.168.0.x:2377
2024/01/28 18:22:12 socat[1539] E bind(5, {AF=2}, 16): Address already in use

Since that port wouldn’t be used on the host by Docker Desktop, it is either you don’t use Docker Desktop or that port is used by something else.

Telnet and nc was already connecting but still it was not allowing me to add the worker nodes, but now I’m able to connect after creating the overlay network on the manager machine.

While I was doing the setup, I think I had missed this. Still please correct or add if I’m missing something here.

Thank you so much, this was very insightful in troubleshooting my docker swarm issue.