Docker.github.io: Cannot access 192.168.99.100 following this tutorial

Created on 6 Nov 2018  路  1Comment  路  Source: docker/docker.github.io

File: get-started/part4.md

In part 3, the ports was "4000:80". So if you following the tutorial using docker-compose.yml in part 3, you should access 192.168.99.100:4000 to find the result on the webpage.

Or, you should change the docker-compose.yml, make ports to "80:80", then follow the part 4 tutorial~

This issue makes me (a docker newbie) spend a lot time to debug whether the connection is down between nodes, since there are tips to open port 7946 and 4789. Finally I found that these ports are automatically on if you use virtualbox vm. 馃榿

Most helpful comment

Can't even access with port 4000.
Example from part2 alone works fine when inside docker-machine myvm1

$ docker stack ps getstartedlab
ID                  NAME                  IMAGE                        NODE                DESIRED STATE       CURRENT STATE            ERROR               PORTS
up0kv1zd04h2        getstartedlab_web.1   roivanov/get-started:part2   myvm1               Running             Running 6 seconds ago
nmv6nmy9ezig        getstartedlab_web.2   roivanov/get-started:part2   myvm2               Running             Running 23 seconds ago
cdjb0fvjgybl        getstartedlab_web.3   roivanov/get-started:part2   myvm1               Running             Running 6 seconds ago
bij1mdn72fy4        getstartedlab_web.4   roivanov/get-started:part2   myvm1               Running             Running 6 seconds ago
u76hknxyywjq        getstartedlab_web.5   roivanov/get-started:part2   myvm2               Running             Running 23 seconds ago

$ docker-machine ssh myvm1 "netstat -an" | grep 4000
tcp        0      0 :::4000                 :::*                    LISTEN

$ docker-machine ssh myvm1 "netstat -an" | grep -w LISTEN
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
tcp        0      0 :::22                   :::*                    LISTEN
tcp        0      0 :::4000                 :::*                    LISTEN
tcp        0      0 :::2376                 :::*                    LISTEN
tcp        0      0 :::2377                 :::*                    LISTEN
tcp        0      0 :::7946                 :::*                    LISTEN

$ docker-machine ls
NAME    ACTIVE   DRIVER       STATE     URL                         SWARM   DOCKER     ERRORS
myvm1   *        virtualbox   Running   tcp://192.168.99.106:2376           v18.09.0
myvm2   -        virtualbox   Running   tcp://192.168.99.107:2376           v18.09.0

$ curl http://192.168.99.106:4000
curl: (7) Failed to connect to 192.168.99.106 port 4000: Connection refused

$ curl http://192.168.99.107:4000
curl: (7) Failed to connect to 192.168.99.107 port 4000: Connection refused

>All comments

Can't even access with port 4000.
Example from part2 alone works fine when inside docker-machine myvm1

$ docker stack ps getstartedlab
ID                  NAME                  IMAGE                        NODE                DESIRED STATE       CURRENT STATE            ERROR               PORTS
up0kv1zd04h2        getstartedlab_web.1   roivanov/get-started:part2   myvm1               Running             Running 6 seconds ago
nmv6nmy9ezig        getstartedlab_web.2   roivanov/get-started:part2   myvm2               Running             Running 23 seconds ago
cdjb0fvjgybl        getstartedlab_web.3   roivanov/get-started:part2   myvm1               Running             Running 6 seconds ago
bij1mdn72fy4        getstartedlab_web.4   roivanov/get-started:part2   myvm1               Running             Running 6 seconds ago
u76hknxyywjq        getstartedlab_web.5   roivanov/get-started:part2   myvm2               Running             Running 23 seconds ago

$ docker-machine ssh myvm1 "netstat -an" | grep 4000
tcp        0      0 :::4000                 :::*                    LISTEN

$ docker-machine ssh myvm1 "netstat -an" | grep -w LISTEN
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
tcp        0      0 :::22                   :::*                    LISTEN
tcp        0      0 :::4000                 :::*                    LISTEN
tcp        0      0 :::2376                 :::*                    LISTEN
tcp        0      0 :::2377                 :::*                    LISTEN
tcp        0      0 :::7946                 :::*                    LISTEN

$ docker-machine ls
NAME    ACTIVE   DRIVER       STATE     URL                         SWARM   DOCKER     ERRORS
myvm1   *        virtualbox   Running   tcp://192.168.99.106:2376           v18.09.0
myvm2   -        virtualbox   Running   tcp://192.168.99.107:2376           v18.09.0

$ curl http://192.168.99.106:4000
curl: (7) Failed to connect to 192.168.99.106 port 4000: Connection refused

$ curl http://192.168.99.107:4000
curl: (7) Failed to connect to 192.168.99.107 port 4000: Connection refused
Was this page helpful?
0 / 5 - 0 ratings

Related issues

vinilneves picture vinilneves  路  3Comments

londoncalling picture londoncalling  路  5Comments

Bharathkumarraju picture Bharathkumarraju  路  3Comments

MicheleMannino picture MicheleMannino  路  4Comments

Mararesliu picture Mararesliu  路  4Comments