3

I setup native swarm cluster in docker with 3 managers and 3 nodes. Below are the results:

docker node ls (dev-manager1)

ID                           HOSTNAME           STATUS  AVAILABILITY  MANAGER STATUS
2ms0ibflqj3jlsgcv8y1flmrn    dev-node1     Ready   Active
68p6nhjlrl5x05msgsannhzxt *  dev-manager1  Ready   Active        Leader
avqmsub8zbqhrc0p55wgq1vtg    dev-node2     Ready   Active
bicmmx2gxiq57ydycm65vca0u    dev-node3     Ready   Active
bszstgcdzhhnnu4xz86dqso3m    dev-manager2  Ready   Active        Reachable
dnp4yy7661fa3ob6mal9090v5    dev-manager3  Ready   Active        Reachable

docker ps (dev-manager1)

CONTAINER ID        IMAGE                           COMMAND                  CREATED             STATUS              PORTS                                                                                                                                               NAMES
e5b87a9af9cd        gliderlabs/registrator:latest   "/bin/registrator con"   23 hours ago        Up 23 hours                                                                                                                                                             registrator
40867e62acfc        swarm                           "/swarm manage --repl"   23 hours ago        Up 23 hours         0.0.0.0:3375->2375/tcp                                                                                                                              mgr1
28e77b7ebcdf        progrium/consul                 "/bin/start -server -"   24 hours ago        Up 24 hours         1.0.1.4:8300-8302->8300-8302/tcp, 1.0.1.4:8400->8400/tcp, 53/tcp, 172.17.0.1:53->53/udp, 1.0.1.4:8500->8500/tcp, 1.0.1.4:8301-8302->8301-8302/udp   consul1

From client side:

export DOCKER_HOST=dev-manager1:3375
docker info

Nodes: 3
(unknown): 1.0.1.7:2375
└ ID:
└ Status: Pending
└ Containers: 0
└ Reserved CPUs: 0 / 0
└ Reserved Memory: 0 B / 0 B
└ Labels:
└ Error: Cannot connect to the Docker daemon at tcp://1.0.1.7:2375. Is the docker daemon running?
└ UpdatedAt: 2017-04-07T18:14:21Z
└ ServerVersion:

Error

Cannot connect to the Docker daemon at tcp://1.0.1.7:2375. Is the docker daemon running?

Please let me know if you need more info.

RNK
  • 5,582
  • 11
  • 65
  • 133
  • Check that there are no spaces between the '=' character in `export DOCKER_HOST=dev-manager1:2375` – Ricardo Branco Apr 07 '17 at 20:04
  • @RicardoBranco: No there is no space.. And it's port `3375`. Also tried with this: `docker -H tcp://1.0.1.4:3375` info .. but, no luck – RNK Apr 07 '17 at 20:19
  • Can you telnet to the port and verify it's open? – Ricardo Branco Apr 07 '17 at 20:53
  • @RicardoBranco: So, from client machine I ran this command `telnet 1.0.1.4 3375` and got response: `Trying 1.0.1.4... Connected to 1.0.1.4. Escape character is '^]'.` – RNK Apr 07 '17 at 21:07
  • Run `telnet 1.0.1.4 3375` without the ':' – Ricardo Branco Apr 07 '17 at 21:08
  • Yeah.. Updated it.. thanks.. response is: `Trying 1.0.1.4... Connected to 1.0.1.4. Escape character is '^]'.` – RNK Apr 07 '17 at 21:09
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/140200/discussion-between-ricardo-branco-and-ronak-patel). – Ricardo Branco Apr 07 '17 at 21:17
  • You appear to have setup both swarm mode and classic swarm (running as a container). Do you intend to use both? Please update your question with the steps you took to make the demon listen on the port. – BMitch Apr 08 '17 at 00:43

0 Answers0