title: Docker Swarm Worker Error: Error response from daemon: Timeout was reached before node joined
body: <p>I have been following <a href="http://tutorial" rel="nofollow noreferrer">this tutorial</a> for setting up a multihost network on Hyperledger Fabric, but while joining PC2 as worker for the docker swarm, I am getting an error.</p>
  
  <p>I have executed the following steps. </p>
  
  <p>On PC1,</p>
  
  <pre><code>himani@himani-HP-Notebook:~$ docker swarm init
  Swarm initialized: current node (632ijg7z6mktr0w9quilvn1i2) is now a manager.
  
  To add a worker to this swarm, run the following command:
  
      docker swarm join --token SWMTKN-1-5qmka8a239apira1zmnk76lrnfdrxnb6dj8cjgrj6x2hfqmxin-anau7v6yg89lauoxsvkwp7qwm 192.168.43.78:2377
  
  To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions.
  </code></pre>
  
  <p>Followed by creating the manager, i.e., PC1</p>
  
  <pre><code>himani@himani-HP-Notebook:~$ docker swarm join-token manager
  To add a manager to this swarm, run the following command:
  
      docker swarm join --token SWMTKN-1-5qmka8a239apira1zmnk76lrnfdrxnb6dj8cjgrj6x2hfqmxin-5jkpf59ns743nvco9y7t66ncb 192.168.43.78:2377
  
  himani@himani-HP-Notebook:~$ docker swarm join --token SWMTKN-1-5qmka8a239apira1zmnk76lrnfdrxnb6dj8cjgrj6x2hfqmxin-5jkpf59ns743nvco9y7t66ncb 192.168.43.78:2377
  Error response from daemon: This node is already part of a swarm. Use "docker swarm leave" to leave this swarm and join another one.
  himani@himani-HP-Notebook:~$ docker swarm leave
  Error response from daemon: You are attempting to leave the swarm on a node that is participating as a manager. Removing the last manager erases all current state of the swarm. Use `--force` to ignore this message.
  himani@himani-HP-Notebook:~$ docker swarm leave --force
  Node left the swarm.
  himani@himani-HP-Notebook:~$ docker swarm join --token SWMTKN-1-5qmka8a239apira1zmnk76lrnfdrxnb6dj8cjgrj6x2hfqmxin-5jkpf59ns743nvco9y7t66ncb 192.168.43.78:2377
  Error response from daemon: rpc error: code = 14 desc = grpc: the connection is unavailable
  </code></pre>
  
  <p>These are the ifconfig settings of PC1</p>
  
  <pre><code>himani@himani-HP-Notebook:~$ ifconfig
  br-265f83fad915 Link encap:Ethernet  HWaddr 02:42:ac:a3:89:fa  
            inet addr:172.22.0.1  Bcast:0.0.0.0  Mask:255.255.0.0
            UP BROADCAST MULTICAST  MTU:1500  Metric:1
            RX packets:0 errors:0 dropped:0 overruns:0 frame:0
            TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:0 
            RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
  
  br-550f9551727c Link encap:Ethernet  HWaddr 02:42:e8:e6:a4:97  
            inet addr:172.18.0.1  Bcast:0.0.0.0  Mask:255.255.0.0
            UP BROADCAST MULTICAST  MTU:1500  Metric:1
            RX packets:0 errors:0 dropped:0 overruns:0 frame:0
            TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:0 
            RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
  
  br-76955e67b3d1 Link encap:Ethernet  HWaddr 02:42:8e:58:c5:c0  
            inet addr:172.21.0.1  Bcast:0.0.0.0  Mask:255.255.0.0
            UP BROADCAST MULTICAST  MTU:1500  Metric:1
            RX packets:0 errors:0 dropped:0 overruns:0 frame:0
            TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:0 
            RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
  
  br-966ad10fdc06 Link encap:Ethernet  HWaddr 02:42:a2:f4:bc:a5  
            inet addr:172.19.0.1  Bcast:0.0.0.0  Mask:255.255.0.0
            inet6 addr: fe80::42:a2ff:fef4:bca5/64 Scope:Link
            UP BROADCAST MULTICAST  MTU:1500  Metric:1
            RX packets:516 errors:0 dropped:0 overruns:0 frame:0
            TX packets:21754 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:0 
            RX bytes:18096 (18.0 KB)  TX bytes:935049 (935.0 KB)
  
  br-e6ebf3138263 Link encap:Ethernet  HWaddr 02:42:56:09:e4:e3  
            inet addr:172.20.0.1  Bcast:0.0.0.0  Mask:255.255.0.0
            UP BROADCAST MULTICAST  MTU:1500  Metric:1
            RX packets:0 errors:0 dropped:0 overruns:0 frame:0
            TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:0 
            RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
  
  docker0   Link encap:Ethernet  HWaddr 02:42:f9:bd:e0:ba  
            inet addr:172.17.0.1  Bcast:0.0.0.0  Mask:255.255.0.0
            inet6 addr: fe80::42:f9ff:febd:e0ba/64 Scope:Link
            UP BROADCAST MULTICAST  MTU:1500  Metric:1
            RX packets:0 errors:0 dropped:0 overruns:0 frame:0
            TX packets:26 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:0 
            RX bytes:0 (0.0 B)  TX bytes:2849 (2.8 KB)
  
  docker_gwbridge Link encap:Ethernet  HWaddr 02:42:fd:7c:f5:19  
            inet addr:172.23.0.1  Bcast:0.0.0.0  Mask:255.255.0.0
            inet6 addr: fe80::42:fdff:fe7c:f519/64 Scope:Link
            UP BROADCAST MULTICAST  MTU:1500  Metric:1
            RX packets:0 errors:0 dropped:0 overruns:0 frame:0
            TX packets:66 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:0 
            RX bytes:0 (0.0 B)  TX bytes:9970 (9.9 KB)
  
  enp7s0    Link encap:Ethernet  HWaddr a0:8c:fd:75:f5:c6  
            UP BROADCAST MULTICAST  MTU:1500  Metric:1
            RX packets:0 errors:0 dropped:0 overruns:0 frame:0
            TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000 
            RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
  
  lo        Link encap:Local Loopback  
            inet addr:127.0.0.1  Mask:255.0.0.0
            inet6 addr: ::1/128 Scope:Host
            UP LOOPBACK RUNNING  MTU:65536  Metric:1
            RX packets:154580 errors:0 dropped:0 overruns:0 frame:0
            TX packets:154580 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000 
            RX bytes:14853461 (14.8 MB)  TX bytes:14853461 (14.8 MB)
  
  wlp19s0   Link encap:Ethernet  HWaddr 68:14:01:8d:a8:fd  
            inet addr:192.168.43.78  Bcast:192.168.43.255  Mask:255.255.255.0
            inet6 addr: fe80::1e12:3ebd:1415:dfc9/64 Scope:Link
            UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
            RX packets:4332918 errors:0 dropped:0 overruns:0 frame:0
            TX packets:3582621 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000 
            RX bytes:1241011858 (1.2 GB)  TX bytes:585873205 (585.8 MB)
  </code></pre>
  
  <p>Not sure if the correct IP address is used in the commands. The port, however, is correct.</p>
  
  <p><a href="https://i.stack.imgur.com/gR53T.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gR53T.png" alt="enter image description here"></a></p>