Docker Swarm - service not serving requests assigned to VirtualBox peers
I am currently trying to achieve the "get-started" Docker tutorial, part 4 (https://docs.docker.com/get-started/part4/). I deploy a service to a 2-machine swarm (one manager - local server, one worker - virtualbox machine created with "docker-machine" command), with 5 replicas, as follows:
docker service create --mode=replicated --publish published=4000,target=80 --replicas=5 --name=pyserv dcormar/get-started:part2
The service is deployed among the two machines:
docker service ps pyserv
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
m3txdzj96t6z pyserv.1 dcormar/get-started:part2 machine1 Running Running 15 minutes ago
dtxozv8m7yfa pyserv.2 dcormar/get-started:part2 dcormar-1 Running Running 15 minutes ago
1m38f2hef4wf pyserv.3 dcormar/get-started:part2 machine1 Running Running 15 minutes ago
dcnimcrlh1pb pyserv.4 dcormar/get-started:part2 dcormar-1 Running Running 15 minutes ago
4t78torxwlns pyserv.5 dcormar/get-started:part2 machine1 Running Running 15 minutes ago
And the requests, no matter from which server I send them, are only served when they are redirected to a container hosted by the manager (local server):
user@dcormar-1:~$ curl http://192.168.99.1:4000
<h3>Hello World!</h3><b>Hostname:</b> b57821504adb<br/><b>Visits:</b> <i>cannot connect to Redis, counter disabled</i>user@dcormar-1:~$ curl http://192.168.99.1:4000
<h3>Hello World!</h3><b>Hostname:</b> b7654fd27e39<br/><b>Visits:</b> <i>cannot connect to Redis, counter disabled</i>user@dcormar-1:~$ curl http://192.168.99.1:4000
curl: (7) Failed to connect to 192.168.99.1 port 4000: Connection refused
user@dcormar-1:~$ curl http://192.168.99.1:4000
curl: (7) Failed to connect to 192.168.99.1 port 4000: Connection refused
user@dcormar-1:~$ curl http://192.168.99.1:4000
curl: (7) Failed to connect to 192.168.99.1 port 4000: Connection refused
user@dcormar-1:~$ curl http://192.168.99.1:4000
<h3>Hello World!</h3><b>Hostname:</b> b57821504adb<br/><b>Visits:</b> <i>cannot connect to Redis, counter disabled</i>user@dcormar-1:~$ curl http://192.168.99.1:4000
<h3>Hello World!</h3><b>Hostname:</b> b7654fd27e39<br/><b>Visits:</b> <i>cannot connect to Redis, counter disabled</i>user@dcormar-1:~$ curl http://192.168.99.1:4000
curl: (7) Failed to connect to 192.168.99.1 port 4000: Connection refused
When performing "curl" command to 192.168.99.100, all requestes are not served.
Ports seem to be open in both machines, so I'm running out of ideas to sort out this problem.
user@dcormar-1:~$ sudo nmap -sU -p 7946,4789 192.168.99.100
Starting Nmap 7.60 ( https://nmap.org ) at 2018-11-26 13:49 CET
Nmap scan report for 192.168.99.100
Host is up (0.00017s latency).
PORT STATE SERVICE
4789/udp open|filtered unknown
7946/udp open|filtered unknown
MAC Address: 08:00:27:0A:0C:D9 (Oracle VirtualBox virtual NIC)
Nmap done: 1 IP address (1 host up) scanned in 14.58 seconds
user@dcormar-1:~$ sudo nmap -sU -p 7946,4789 192.168.99.1
Starting Nmap 7.60 ( https://nmap.org ) at 2018-11-26 13:49 CET
Nmap scan report for dcormar-1 (192.168.99.1)
Host is up.
PORT STATE SERVICE
4789/udp open|filtered unknown
7946/udp open|filtered unknown
Nmap done: 1 IP address (1 host up) scanned in 3.35 seconds
user@dcormar-1:~$ sudo nmap -sT -p 2376,7946,80,2377,4000 192.168.99.100
Starting Nmap 7.60 ( https://nmap.org ) at 2018-11-26 13:50 CET
Nmap scan report for 192.168.99.100
Host is up (0.00058s latency).
PORT STATE SERVICE
80/tcp closed http
2376/tcp open docker
2377/tcp closed swarm
4000/tcp closed remoteanything
7946/tcp open unknown
MAC Address: 08:00:27:0A:0C:D9 (Oracle VirtualBox virtual NIC)
Nmap done: 1 IP address (1 host up) scanned in 13.31 seconds
user@dcormar-1:~$ sudo nmap -sT -p 2376,7946,80,2377,4000 192.168.99.1
Starting Nmap 7.60 ( https://nmap.org ) at 2018-11-26 13:50 CET
Nmap scan report for dcormar-1 (192.168.99.1)
Host is up (0.00045s latency).
PORT STATE SERVICE
80/tcp closed http
2376/tcp closed docker
2377/tcp open swarm
4000/tcp closed remoteanything
7946/tcp open unknown
Nmap done: 1 IP address (1 host up) scanned in 0.22 seconds
Docker version: 18.09
Note: if I try, like in the tutorial, to create a swarm with 2 machines, both of them "virtualbox machines", then none of the requests are served.
docker virtualbox docker-swarm docker-machine
add a comment |
I am currently trying to achieve the "get-started" Docker tutorial, part 4 (https://docs.docker.com/get-started/part4/). I deploy a service to a 2-machine swarm (one manager - local server, one worker - virtualbox machine created with "docker-machine" command), with 5 replicas, as follows:
docker service create --mode=replicated --publish published=4000,target=80 --replicas=5 --name=pyserv dcormar/get-started:part2
The service is deployed among the two machines:
docker service ps pyserv
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
m3txdzj96t6z pyserv.1 dcormar/get-started:part2 machine1 Running Running 15 minutes ago
dtxozv8m7yfa pyserv.2 dcormar/get-started:part2 dcormar-1 Running Running 15 minutes ago
1m38f2hef4wf pyserv.3 dcormar/get-started:part2 machine1 Running Running 15 minutes ago
dcnimcrlh1pb pyserv.4 dcormar/get-started:part2 dcormar-1 Running Running 15 minutes ago
4t78torxwlns pyserv.5 dcormar/get-started:part2 machine1 Running Running 15 minutes ago
And the requests, no matter from which server I send them, are only served when they are redirected to a container hosted by the manager (local server):
user@dcormar-1:~$ curl http://192.168.99.1:4000
<h3>Hello World!</h3><b>Hostname:</b> b57821504adb<br/><b>Visits:</b> <i>cannot connect to Redis, counter disabled</i>user@dcormar-1:~$ curl http://192.168.99.1:4000
<h3>Hello World!</h3><b>Hostname:</b> b7654fd27e39<br/><b>Visits:</b> <i>cannot connect to Redis, counter disabled</i>user@dcormar-1:~$ curl http://192.168.99.1:4000
curl: (7) Failed to connect to 192.168.99.1 port 4000: Connection refused
user@dcormar-1:~$ curl http://192.168.99.1:4000
curl: (7) Failed to connect to 192.168.99.1 port 4000: Connection refused
user@dcormar-1:~$ curl http://192.168.99.1:4000
curl: (7) Failed to connect to 192.168.99.1 port 4000: Connection refused
user@dcormar-1:~$ curl http://192.168.99.1:4000
<h3>Hello World!</h3><b>Hostname:</b> b57821504adb<br/><b>Visits:</b> <i>cannot connect to Redis, counter disabled</i>user@dcormar-1:~$ curl http://192.168.99.1:4000
<h3>Hello World!</h3><b>Hostname:</b> b7654fd27e39<br/><b>Visits:</b> <i>cannot connect to Redis, counter disabled</i>user@dcormar-1:~$ curl http://192.168.99.1:4000
curl: (7) Failed to connect to 192.168.99.1 port 4000: Connection refused
When performing "curl" command to 192.168.99.100, all requestes are not served.
Ports seem to be open in both machines, so I'm running out of ideas to sort out this problem.
user@dcormar-1:~$ sudo nmap -sU -p 7946,4789 192.168.99.100
Starting Nmap 7.60 ( https://nmap.org ) at 2018-11-26 13:49 CET
Nmap scan report for 192.168.99.100
Host is up (0.00017s latency).
PORT STATE SERVICE
4789/udp open|filtered unknown
7946/udp open|filtered unknown
MAC Address: 08:00:27:0A:0C:D9 (Oracle VirtualBox virtual NIC)
Nmap done: 1 IP address (1 host up) scanned in 14.58 seconds
user@dcormar-1:~$ sudo nmap -sU -p 7946,4789 192.168.99.1
Starting Nmap 7.60 ( https://nmap.org ) at 2018-11-26 13:49 CET
Nmap scan report for dcormar-1 (192.168.99.1)
Host is up.
PORT STATE SERVICE
4789/udp open|filtered unknown
7946/udp open|filtered unknown
Nmap done: 1 IP address (1 host up) scanned in 3.35 seconds
user@dcormar-1:~$ sudo nmap -sT -p 2376,7946,80,2377,4000 192.168.99.100
Starting Nmap 7.60 ( https://nmap.org ) at 2018-11-26 13:50 CET
Nmap scan report for 192.168.99.100
Host is up (0.00058s latency).
PORT STATE SERVICE
80/tcp closed http
2376/tcp open docker
2377/tcp closed swarm
4000/tcp closed remoteanything
7946/tcp open unknown
MAC Address: 08:00:27:0A:0C:D9 (Oracle VirtualBox virtual NIC)
Nmap done: 1 IP address (1 host up) scanned in 13.31 seconds
user@dcormar-1:~$ sudo nmap -sT -p 2376,7946,80,2377,4000 192.168.99.1
Starting Nmap 7.60 ( https://nmap.org ) at 2018-11-26 13:50 CET
Nmap scan report for dcormar-1 (192.168.99.1)
Host is up (0.00045s latency).
PORT STATE SERVICE
80/tcp closed http
2376/tcp closed docker
2377/tcp open swarm
4000/tcp closed remoteanything
7946/tcp open unknown
Nmap done: 1 IP address (1 host up) scanned in 0.22 seconds
Docker version: 18.09
Note: if I try, like in the tutorial, to create a swarm with 2 machines, both of them "virtualbox machines", then none of the requests are served.
docker virtualbox docker-swarm docker-machine
add a comment |
I am currently trying to achieve the "get-started" Docker tutorial, part 4 (https://docs.docker.com/get-started/part4/). I deploy a service to a 2-machine swarm (one manager - local server, one worker - virtualbox machine created with "docker-machine" command), with 5 replicas, as follows:
docker service create --mode=replicated --publish published=4000,target=80 --replicas=5 --name=pyserv dcormar/get-started:part2
The service is deployed among the two machines:
docker service ps pyserv
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
m3txdzj96t6z pyserv.1 dcormar/get-started:part2 machine1 Running Running 15 minutes ago
dtxozv8m7yfa pyserv.2 dcormar/get-started:part2 dcormar-1 Running Running 15 minutes ago
1m38f2hef4wf pyserv.3 dcormar/get-started:part2 machine1 Running Running 15 minutes ago
dcnimcrlh1pb pyserv.4 dcormar/get-started:part2 dcormar-1 Running Running 15 minutes ago
4t78torxwlns pyserv.5 dcormar/get-started:part2 machine1 Running Running 15 minutes ago
And the requests, no matter from which server I send them, are only served when they are redirected to a container hosted by the manager (local server):
user@dcormar-1:~$ curl http://192.168.99.1:4000
<h3>Hello World!</h3><b>Hostname:</b> b57821504adb<br/><b>Visits:</b> <i>cannot connect to Redis, counter disabled</i>user@dcormar-1:~$ curl http://192.168.99.1:4000
<h3>Hello World!</h3><b>Hostname:</b> b7654fd27e39<br/><b>Visits:</b> <i>cannot connect to Redis, counter disabled</i>user@dcormar-1:~$ curl http://192.168.99.1:4000
curl: (7) Failed to connect to 192.168.99.1 port 4000: Connection refused
user@dcormar-1:~$ curl http://192.168.99.1:4000
curl: (7) Failed to connect to 192.168.99.1 port 4000: Connection refused
user@dcormar-1:~$ curl http://192.168.99.1:4000
curl: (7) Failed to connect to 192.168.99.1 port 4000: Connection refused
user@dcormar-1:~$ curl http://192.168.99.1:4000
<h3>Hello World!</h3><b>Hostname:</b> b57821504adb<br/><b>Visits:</b> <i>cannot connect to Redis, counter disabled</i>user@dcormar-1:~$ curl http://192.168.99.1:4000
<h3>Hello World!</h3><b>Hostname:</b> b7654fd27e39<br/><b>Visits:</b> <i>cannot connect to Redis, counter disabled</i>user@dcormar-1:~$ curl http://192.168.99.1:4000
curl: (7) Failed to connect to 192.168.99.1 port 4000: Connection refused
When performing "curl" command to 192.168.99.100, all requestes are not served.
Ports seem to be open in both machines, so I'm running out of ideas to sort out this problem.
user@dcormar-1:~$ sudo nmap -sU -p 7946,4789 192.168.99.100
Starting Nmap 7.60 ( https://nmap.org ) at 2018-11-26 13:49 CET
Nmap scan report for 192.168.99.100
Host is up (0.00017s latency).
PORT STATE SERVICE
4789/udp open|filtered unknown
7946/udp open|filtered unknown
MAC Address: 08:00:27:0A:0C:D9 (Oracle VirtualBox virtual NIC)
Nmap done: 1 IP address (1 host up) scanned in 14.58 seconds
user@dcormar-1:~$ sudo nmap -sU -p 7946,4789 192.168.99.1
Starting Nmap 7.60 ( https://nmap.org ) at 2018-11-26 13:49 CET
Nmap scan report for dcormar-1 (192.168.99.1)
Host is up.
PORT STATE SERVICE
4789/udp open|filtered unknown
7946/udp open|filtered unknown
Nmap done: 1 IP address (1 host up) scanned in 3.35 seconds
user@dcormar-1:~$ sudo nmap -sT -p 2376,7946,80,2377,4000 192.168.99.100
Starting Nmap 7.60 ( https://nmap.org ) at 2018-11-26 13:50 CET
Nmap scan report for 192.168.99.100
Host is up (0.00058s latency).
PORT STATE SERVICE
80/tcp closed http
2376/tcp open docker
2377/tcp closed swarm
4000/tcp closed remoteanything
7946/tcp open unknown
MAC Address: 08:00:27:0A:0C:D9 (Oracle VirtualBox virtual NIC)
Nmap done: 1 IP address (1 host up) scanned in 13.31 seconds
user@dcormar-1:~$ sudo nmap -sT -p 2376,7946,80,2377,4000 192.168.99.1
Starting Nmap 7.60 ( https://nmap.org ) at 2018-11-26 13:50 CET
Nmap scan report for dcormar-1 (192.168.99.1)
Host is up (0.00045s latency).
PORT STATE SERVICE
80/tcp closed http
2376/tcp closed docker
2377/tcp open swarm
4000/tcp closed remoteanything
7946/tcp open unknown
Nmap done: 1 IP address (1 host up) scanned in 0.22 seconds
Docker version: 18.09
Note: if I try, like in the tutorial, to create a swarm with 2 machines, both of them "virtualbox machines", then none of the requests are served.
docker virtualbox docker-swarm docker-machine
I am currently trying to achieve the "get-started" Docker tutorial, part 4 (https://docs.docker.com/get-started/part4/). I deploy a service to a 2-machine swarm (one manager - local server, one worker - virtualbox machine created with "docker-machine" command), with 5 replicas, as follows:
docker service create --mode=replicated --publish published=4000,target=80 --replicas=5 --name=pyserv dcormar/get-started:part2
The service is deployed among the two machines:
docker service ps pyserv
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
m3txdzj96t6z pyserv.1 dcormar/get-started:part2 machine1 Running Running 15 minutes ago
dtxozv8m7yfa pyserv.2 dcormar/get-started:part2 dcormar-1 Running Running 15 minutes ago
1m38f2hef4wf pyserv.3 dcormar/get-started:part2 machine1 Running Running 15 minutes ago
dcnimcrlh1pb pyserv.4 dcormar/get-started:part2 dcormar-1 Running Running 15 minutes ago
4t78torxwlns pyserv.5 dcormar/get-started:part2 machine1 Running Running 15 minutes ago
And the requests, no matter from which server I send them, are only served when they are redirected to a container hosted by the manager (local server):
user@dcormar-1:~$ curl http://192.168.99.1:4000
<h3>Hello World!</h3><b>Hostname:</b> b57821504adb<br/><b>Visits:</b> <i>cannot connect to Redis, counter disabled</i>user@dcormar-1:~$ curl http://192.168.99.1:4000
<h3>Hello World!</h3><b>Hostname:</b> b7654fd27e39<br/><b>Visits:</b> <i>cannot connect to Redis, counter disabled</i>user@dcormar-1:~$ curl http://192.168.99.1:4000
curl: (7) Failed to connect to 192.168.99.1 port 4000: Connection refused
user@dcormar-1:~$ curl http://192.168.99.1:4000
curl: (7) Failed to connect to 192.168.99.1 port 4000: Connection refused
user@dcormar-1:~$ curl http://192.168.99.1:4000
curl: (7) Failed to connect to 192.168.99.1 port 4000: Connection refused
user@dcormar-1:~$ curl http://192.168.99.1:4000
<h3>Hello World!</h3><b>Hostname:</b> b57821504adb<br/><b>Visits:</b> <i>cannot connect to Redis, counter disabled</i>user@dcormar-1:~$ curl http://192.168.99.1:4000
<h3>Hello World!</h3><b>Hostname:</b> b7654fd27e39<br/><b>Visits:</b> <i>cannot connect to Redis, counter disabled</i>user@dcormar-1:~$ curl http://192.168.99.1:4000
curl: (7) Failed to connect to 192.168.99.1 port 4000: Connection refused
When performing "curl" command to 192.168.99.100, all requestes are not served.
Ports seem to be open in both machines, so I'm running out of ideas to sort out this problem.
user@dcormar-1:~$ sudo nmap -sU -p 7946,4789 192.168.99.100
Starting Nmap 7.60 ( https://nmap.org ) at 2018-11-26 13:49 CET
Nmap scan report for 192.168.99.100
Host is up (0.00017s latency).
PORT STATE SERVICE
4789/udp open|filtered unknown
7946/udp open|filtered unknown
MAC Address: 08:00:27:0A:0C:D9 (Oracle VirtualBox virtual NIC)
Nmap done: 1 IP address (1 host up) scanned in 14.58 seconds
user@dcormar-1:~$ sudo nmap -sU -p 7946,4789 192.168.99.1
Starting Nmap 7.60 ( https://nmap.org ) at 2018-11-26 13:49 CET
Nmap scan report for dcormar-1 (192.168.99.1)
Host is up.
PORT STATE SERVICE
4789/udp open|filtered unknown
7946/udp open|filtered unknown
Nmap done: 1 IP address (1 host up) scanned in 3.35 seconds
user@dcormar-1:~$ sudo nmap -sT -p 2376,7946,80,2377,4000 192.168.99.100
Starting Nmap 7.60 ( https://nmap.org ) at 2018-11-26 13:50 CET
Nmap scan report for 192.168.99.100
Host is up (0.00058s latency).
PORT STATE SERVICE
80/tcp closed http
2376/tcp open docker
2377/tcp closed swarm
4000/tcp closed remoteanything
7946/tcp open unknown
MAC Address: 08:00:27:0A:0C:D9 (Oracle VirtualBox virtual NIC)
Nmap done: 1 IP address (1 host up) scanned in 13.31 seconds
user@dcormar-1:~$ sudo nmap -sT -p 2376,7946,80,2377,4000 192.168.99.1
Starting Nmap 7.60 ( https://nmap.org ) at 2018-11-26 13:50 CET
Nmap scan report for dcormar-1 (192.168.99.1)
Host is up (0.00045s latency).
PORT STATE SERVICE
80/tcp closed http
2376/tcp closed docker
2377/tcp open swarm
4000/tcp closed remoteanything
7946/tcp open unknown
Nmap done: 1 IP address (1 host up) scanned in 0.22 seconds
Docker version: 18.09
Note: if I try, like in the tutorial, to create a swarm with 2 machines, both of them "virtualbox machines", then none of the requests are served.
docker virtualbox docker-swarm docker-machine
docker virtualbox docker-swarm docker-machine
asked Nov 26 '18 at 12:54
dcormardcormar
11
11
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Solved! the issue was with the Boot2Docker version 18.09. Once I removed those VMs, and recreated with Boot2Docker 18.06 (command below), it started to work as expected.
docker-machine create --driver=virtualbox --virtualbox-boot2docker-url=boot2docker.iso vboxm2
The output, below:
docker-machine ssh vboxm1
docker-machine ssh vboxm2
(docker swarm join on both VMs, vbox1: manager, vbox2: worker)
docker service create --publish published=4025,target=80 --replicas 4 --name nginx1 nginx
se9qjuwbumpergh7nvg92vvcm
overall progress: 4 out of 4 tasks
1/4: running
2/4: running
3/4: running
4/4: running
verify: Service converged
curl 192.168.99.100:4025
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
body {
width: 35em;
margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif;
}
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
(...)
add a comment |
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53481584%2fdocker-swarm-service-not-serving-requests-assigned-to-virtualbox-peers%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Solved! the issue was with the Boot2Docker version 18.09. Once I removed those VMs, and recreated with Boot2Docker 18.06 (command below), it started to work as expected.
docker-machine create --driver=virtualbox --virtualbox-boot2docker-url=boot2docker.iso vboxm2
The output, below:
docker-machine ssh vboxm1
docker-machine ssh vboxm2
(docker swarm join on both VMs, vbox1: manager, vbox2: worker)
docker service create --publish published=4025,target=80 --replicas 4 --name nginx1 nginx
se9qjuwbumpergh7nvg92vvcm
overall progress: 4 out of 4 tasks
1/4: running
2/4: running
3/4: running
4/4: running
verify: Service converged
curl 192.168.99.100:4025
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
body {
width: 35em;
margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif;
}
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
(...)
add a comment |
Solved! the issue was with the Boot2Docker version 18.09. Once I removed those VMs, and recreated with Boot2Docker 18.06 (command below), it started to work as expected.
docker-machine create --driver=virtualbox --virtualbox-boot2docker-url=boot2docker.iso vboxm2
The output, below:
docker-machine ssh vboxm1
docker-machine ssh vboxm2
(docker swarm join on both VMs, vbox1: manager, vbox2: worker)
docker service create --publish published=4025,target=80 --replicas 4 --name nginx1 nginx
se9qjuwbumpergh7nvg92vvcm
overall progress: 4 out of 4 tasks
1/4: running
2/4: running
3/4: running
4/4: running
verify: Service converged
curl 192.168.99.100:4025
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
body {
width: 35em;
margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif;
}
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
(...)
add a comment |
Solved! the issue was with the Boot2Docker version 18.09. Once I removed those VMs, and recreated with Boot2Docker 18.06 (command below), it started to work as expected.
docker-machine create --driver=virtualbox --virtualbox-boot2docker-url=boot2docker.iso vboxm2
The output, below:
docker-machine ssh vboxm1
docker-machine ssh vboxm2
(docker swarm join on both VMs, vbox1: manager, vbox2: worker)
docker service create --publish published=4025,target=80 --replicas 4 --name nginx1 nginx
se9qjuwbumpergh7nvg92vvcm
overall progress: 4 out of 4 tasks
1/4: running
2/4: running
3/4: running
4/4: running
verify: Service converged
curl 192.168.99.100:4025
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
body {
width: 35em;
margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif;
}
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
(...)
Solved! the issue was with the Boot2Docker version 18.09. Once I removed those VMs, and recreated with Boot2Docker 18.06 (command below), it started to work as expected.
docker-machine create --driver=virtualbox --virtualbox-boot2docker-url=boot2docker.iso vboxm2
The output, below:
docker-machine ssh vboxm1
docker-machine ssh vboxm2
(docker swarm join on both VMs, vbox1: manager, vbox2: worker)
docker service create --publish published=4025,target=80 --replicas 4 --name nginx1 nginx
se9qjuwbumpergh7nvg92vvcm
overall progress: 4 out of 4 tasks
1/4: running
2/4: running
3/4: running
4/4: running
verify: Service converged
curl 192.168.99.100:4025
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
body {
width: 35em;
margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif;
}
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
(...)
answered Nov 27 '18 at 22:58
dcormardcormar
11
11
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53481584%2fdocker-swarm-service-not-serving-requests-assigned-to-virtualbox-peers%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
