Search code examples
dockerdocker-swarm

Docker Swarm installation. Connect: no route to host error


Need to setup a 3 node (D1, D2 & D3) docker cluster using swarm and install ElasticSearch & Kibana with each node on respective Oracle virtual Linux ( 7.4). D1 is Master node and D2, D3 worker nodes

Once docker engine is installed. Followed this document to create a swarm. However , while executing the command on D2 or D3 gets below error:

Command: sudo docker swarm join --token <Token-ID> <IP>:2377

Error: Error response from daemon: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp <IP>:2377: connect: no route to host"

All theses node servers are on the same network and no firewall restrictions. sudo netstat -tulpn | grep LISTEN shows ports 2377, 7946 are listening but don’t see port 4789 as mentioned here.

Please assist.


Solution

  • I resolved it by running below on master node:

    sudo systemctl stop firewalld.service

    firewalld is a zone-based(host) customizable firewall and the above command disables the service until reboot