machine icon indicating copy to clipboard operation
machine copied to clipboard

18.09.0 iso breaks swarm ingress

Open BretFisher opened this issue 8 years ago • 34 comments

Issue

With current ISO https://github.com/boot2docker/boot2docker/releases/download/v18.09.0/boot2docker.iso any publishing of swarm ports in virtualbox created docker-machine VM's won't respond. I tested this on macOS and Windows 10 using docker-machine version 0.15 and 0.16 and get the same result.

For example, this will work, allowing access from host browser:

docker run -d -p 4000:80 nginx

This will fail, resulting in curl/chrome unable to connect (connection refused):

docker service create -p 5000:80 nginx

Result

This makes Swarm more or less unusable with boot2docker and docker-machine with the latest boot2docker ISO.

This issue is not apparent when provisioning 18.09.0 cloud VM's using docker-machine.

Workaround

  • Use cloud VM's that don't rely on boot2docker.
  • docker run is unaffected.
  • For Swarm, simply setting VIRTUALBOX_BOOT2DOCKER_URL=https://github.com/boot2docker/boot2docker/releases/download/v18.06.1-ce/boot2docker.iso is a workaround and allows the following to work from host chrome:

docker service create -p 5000:80 nginx

BretFisher avatar Nov 13 '18 05:11 BretFisher

I'm having the same issue, I was testing a stack using Caddy server as a proxy and all I get is 502 Bad Gateway, I also tested it outside of Virtualbox with version 18.09 and everything is working just fine, I had to use the older stable version as you stated 18.06.1 by specifying the URL to docker-machine using --virtualbox-boot2docker-url.

mdawar avatar Nov 13 '18 15:11 mdawar

Same issue

ABQJuan avatar Nov 14 '18 17:11 ABQJuan

The same goes for using Hyper-V VM's aswell. The workaround is equivalent to the VirtualBox one, adding --hyperv-boot2docker-url "https://github.com/boot2docker/boot2docker/releases/download/v18.06.1-ce/boot2docker.iso" as an option in the docker-machine create command results in being able to access published ports externally.

andreasnilsen avatar Nov 15 '18 21:11 andreasnilsen

Tracking issue: https://github.com/boot2docker/boot2docker/issues/1349 Fixed in PR: https://github.com/boot2docker/boot2docker/pull/1353

Looks like we'll have to use the workaround above for docker-machine + swarm until 18.09.1 is released.

BretFisher avatar Nov 18 '18 20:11 BretFisher

Thanks for reporting this! I've been wrecking my head for hours trying to diagnose the problem. Was experiencing this on Linux as well.

dimmg avatar Nov 21 '18 12:11 dimmg

Thank you! Been banging my head for hours because of this!!

vjrngn avatar Nov 22 '18 07:11 vjrngn

Thank you! I was running mad with this issue.

jg-main avatar Nov 28 '18 15:11 jg-main

OMG, thank you, wish I had found this 2 days ago...

antonkallenberg avatar Nov 29 '18 15:11 antonkallenberg

I thought I was crazy. And incompetent. Now I know I am just crazy. Or is it the other thing? Thanks!!!

Larswa avatar Nov 30 '18 13:11 Larswa

I wasted a couple of nights sleep on this ..

pankajguptaaa avatar Dec 01 '18 14:12 pankajguptaaa

Same issue. Fixed with recommended ISO above. Created VMs with: docker-machine create myvm2 --virtualbox-boot2docker-url "https://github.com/boot2docker/boot2docker/releases/download/v18.06.1-ce/boot2docker.iso"

evanharmon1 avatar Dec 07 '18 05:12 evanharmon1

thanks a lot, two nights wasted as well, sticking to build v18.06.1-ce

rpetrenko avatar Dec 08 '18 04:12 rpetrenko

Thanks for the pointer. Spent a huge amount of time with this. Any schedule for the new release?

Japskua avatar Dec 13 '18 08:12 Japskua

Soon, we’re currently in RC status I think...

On Thu, Dec 13, 2018 at 3:17 AM Janne Parkkila [email protected] wrote:

Thanks for the pointer. Spent a huge amount of time with this. Any schedule for the new release?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/docker/machine/issues/4608#issuecomment-446880094, or mute the thread https://github.com/notifications/unsubscribe-auth/AAwW31xRnHBJ0VmsBlFuWOKMzJJmTtgSks5u4g0ogaJpZM4Ya75w .

BretFisher avatar Dec 13 '18 09:12 BretFisher

glad I found this before I wasted too much time on this. Would be nice to add a note to the tutorial for newcomers if we're stuck on the RC for a while

nosequeldeebee avatar Dec 18 '18 02:12 nosequeldeebee

@nosequeldeebee It works with the latest RC. I run this to get it working (on hyper-v) It should be easy to substitute/remove the hyperv related settings: docker-machine --native-ssh create -d hyperv --hyperv-virtual-switch "Default Switch" --hyperv-boot2docker-url "https://github.com/boot2docker/boot2docker/releases/download/v18.09.1-rc1/boot2docker.iso" m1

Larswa avatar Dec 18 '18 19:12 Larswa

After spending several days baffled by this issue, I think that a note in the tutorial that the release is flagrantly broken would indeed be nice. Also, perhaps a little regression testing before releasing. ;-)

skyloupe avatar Dec 30 '18 11:12 skyloupe

Thanks for the workaround, here is the machines (good and bad) list and the commands used with the workaround URL.

INGRESS DOES NOT WORK WITH THESE MACHINES

docker-machine create manager1 docker-machine create worker1 docker-machine create worker2

INGRESS WORKS WITH THESE MACHINES

docker-machine create m1 --virtualbox-boot2docker-url https://github.com/boot2docker/boot2docker/releases/download/v18.06.1-ce/boot2docker.iso docker-machine create w1 --virtualbox-boot2docker-url https://github.com/boot2docker/boot2docker/releases/download/v18.06.1-ce/boot2docker.iso docker-machine create w2 --virtualbox-boot2docker-url https://github.com/boot2docker/boot2docker/releases/download/v18.06.1-ce/boot2docker.iso

docker-machine ls NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS m1 - virtualbox Running tcp://192.168.99.107:2376 v18.06.1-ce
manager1 - virtualbox Running tcp://192.168.99.100:2376 v18.09.0
w1 - virtualbox Running tcp://192.168.99.108:2376 v18.06.1-ce
w2 - virtualbox Running tcp://192.168.99.109:2376 v18.06.1-ce
worker1 - virtualbox Running tcp://192.168.99.103:2376 v18.09.0
worker2 - virtualbox Running tcp://192.168.99.104:2376 v18.09.0

schogini avatar Jan 02 '19 17:01 schogini

I wasted 2 days on this. Why hasn't the release been rolled back or a patched released?

respectTheCode avatar Jan 04 '19 12:01 respectTheCode

The 18.09.1 patch is in RC status. Lots of pieces of the Docker tooling have to get updated and tested before this downstream gets updated. I'm sure we'll see that soon.

BretFisher avatar Jan 04 '19 14:01 BretFisher