docker-archive / toolbox

The Docker Toolbox
https://docker.com/toolbox
3.21k stars 1.23k forks source link

Docker quick start terminal stops at 'Waiting for an IP..." #457

Open raoonip opened 8 years ago

raoonip commented 8 years ago

Tried removing the default VM and creating new VM continuously waits for IP as shown in the following log


Microsoft Windows Version 10.0.10586 2015 Microsoft Corporation. All rights reserved.

C:\Users\Ram>docker-machine rm default About to remove default Are you sure? (y/n): y Successfully removed default

C:\Users\Ram>docker-machine create -driver virtualbox default Usage: docker-machine create [OPTIONS] [arg...]

Create a machine

Description: Run 'docker-machine create --driver name' to include the create flags for that driver in the help text.

Options:

--driver, -d "none" Driver to create machine with. --engine-install-url "https://get.docker.com" Custom URL to use for engine installation [$MACHINE_DOCKER_INSTALL_URL] --engine-opt [--engine-opt option --engine-opt option] Specify arbitrary flags to include with the created engine in the form flag=value --engine-insecure-registry [--engine-insecure-registry option --engine-insecure-registry option] Specify insecure registries to allow with the created engine --engine-registry-mirror [--engine-registry-mirror option --engine-registry-mirror option] Specify registry mirrors to use --engine-label [--engine-label option --engine-label option] Specify labels for the created engine --engine-storage-driver Specify a storage driver to use with the engine --engine-env [--engine-env option --engine-env option] Specify environment variables to set in the engine --swarm Configure Machine with Swarm --swarm-image "swarm:latest" Specify Docker image to use for Swarm [$MACHINE_SWARM_IMAGE] --swarm-master Configure Machine to be a Swarm master --swarm-discovery Discovery service to use with Swarm --swarm-strategy "spread" Define a default scheduling strategy for Swarm --swarm-opt [--swarm-opt option --swarm-opt option] Define arbitrary flags for swarm --swarm-host "tcp://0.0.0.0:3376" ip/socket to listen on for Swarm master --swarm-addr addr to advertise for Swarm (default: detect and use the machine IP) --tls-san [--tls-san option --tls-san option] Support extra SANs for TLS certs

C:\Users\Ram>docker-machine create --driver virtualbox default Running pre-create checks... Creating machine... (default) Copying C:\Users\Ram.docker\machine\cache\boot2docker.iso to C:\Users\Ram.docker\machine\machines\default\boot2docker.iso... (default) Creating VirtualBox VM... (default) Creating SSH key... (default) Starting the VM... (default) Check network to re-create if needed...

(default) Waiting for an IP...

Can someone Please help me in resolving the problem.

mchiang0610 commented 8 years ago

@raoonip it looks like virtualbox is causing a lot of problems for you. Are you running windows 10 pro?

AndreKR commented 8 years ago

How long did you wait? I got this too, but several minutes later, while I was googling the problem, it continued successfully.

scott-wood-vgh commented 8 years ago

I am running Windows 10 Pro, and seem to be having an identical issue. It's been about 10 minutes.

iver3on commented 8 years ago

windows 10 insider preview 。similar .

iver3on commented 8 years ago

(default) Waiting for an IP... Error creating machine: Error in driver during machine creation: Too many retries waiting for SSH to be available. Last error: Maximum number of retries (60) exceeded Looks like something went wrong in step ´Checking if machine default exists´... Press any key to continue...

hoihoihoihoihoi commented 8 years ago

I also have the same problem here. im using virtualbox 5.0.12 r104815 along with DockerToolbox-1.12.0-rc2 on my windowsn10(pro)

just keep waiting for ip over 10 mins then the maximum retries errors come. what to do next? pls help

glight2000 commented 8 years ago

Same problem Win10 DockerToolbox-1.11.2.exe I tyied change visual box networking config. But no helps...

hoihoihoihoihoi commented 8 years ago

hey glight2000 i solved this problem by adding the rule to my windows10 firewall rules.

i wrote how it solves on my blog http://acchi-muite-hoi.hatenablog.com/entry/2016/06/23/020317 im sorry its written in japanese lang,though i think you can figure it out by looking into the pictures

hoihoihoihoihoi commented 8 years ago

but then im gonna write down the steps here

  1. uninstall your virtualbox and remove all registrys of it
  2. reboot then install it again on youre cmd with VirtualBox-5.0.XXXX-Win.exe -msiparams NETWORKTYPE=NDIS5
  3. go to control panels > security > then on firewalls > advance settings ( i dont know what its written on english)
  4. and on Inbound Rules, create a new one
  5. selecting the Custom mode. write the local IP there justlike what i wrote on my blog `

    192.168.99.1 then 192.168.99.0 192.168.99.100 `

  6. choose public as youre profile
  7. after that, make sure that the IP(192.168.99.1) configuration is same with the one on youre virtualbox hostonly adapters and in the one your network adapters(virtualbox hostonly adapter)
  8. reboot, make docker-machine by the terminal docker-machine -d virtualbox default

i hope it helps !

iver3on commented 8 years ago

@hoihoihoihoihoi @glight2000 hi guys. any tips can not solve it. I solve it by reinstall my os and every thing goes well.

iver3on commented 8 years ago

hi guys. any tips can not solve it. I solve it by reinstall my os and every thing goes well.

glight2000 commented 8 years ago

@hoihoihoihoihoi Thank you very much for the steps. It doesn't work for me. The debug log shows that it can not get ip, because the host refused when create the default VM. And can not ping out size network. I tried to close the Firewall too and doesn't work either. Maybe I missed something. But still thanks.

@iver3on Yes, me too. Almost give up on win10...

iver3on commented 8 years ago

@glight2000 win10 can do it.but need reinstall win10.

pedrobisp commented 7 years ago

I had the same problem in windows 10 and the following worked for me: "docker-machine rm default" in the command line, and then I run the docker quickstart terminal

Ezekiel-DA commented 7 years ago

Just ran into this; pretty sure my problem started after resetting the Windows Firewall to its default settings for unrelated reasons, which appears to have messed with Virtualbox's networks.

Uninstalling and re-installing VBox completely did the trick for me, hopefully this can help someone else !

timdonovanuk commented 7 years ago

I'm getting this. Fresh install of latest Docker Toolkit on Win7 home. I've looked at the default VM in VirtualBox and it has an IP fine..I can even ping everything on my network from within the vm. So I don't know why Docker Quickstart is stuck on "Waiting for IP"..

srosset81 commented 7 years ago

I had the same problem. Solved it by opening Oracle VM Virtualbox, deleting the 'default' machine and launching again Docker Quickstart Terminal. This resulted in the 'default' machine being reinstalled.

NeuronQ commented 7 years ago

If you're encountering this issue while using Hyper-V (on Windows 10) and Docker 17.03 (17.03.1-ce, build c6d412e on my machine) it's also worth checking that:

  1. you have started and stopped Docker at least once after first start after install -- no idea why, but this appears to help with lots of other issues, maybe this one too
  2. the virtual switch you use has the "right" network adapter selected (test a few or all in Hyper-V Manager if you really have no idea which...) -- this was actually the issue for me when I encountered this issue
  3. you stopped (at least temporarily) any 3rd party firewall (or firewall-including-antivirus) - the default Windows one should not create any issues, but some others do so you might have to figure out how to tweak their settings
  4. don't expect Docker on Windows to be "smooth sailing"... even VirtualBox's networking stack 💩s all over the place if you try to configure anything resembling a cluster with it on Win 10, and never the same way on any two machines... so let's be thankful that at least works as well as it does 😸
Softwaremaker commented 7 years ago

RE: https://github.com/docker/toolbox/issues/448

Sorry to be a bother here– but I am at my wits end trying to set up Docker Toolbox on a Windows Server 2012R2 VM on Azure.

Running: docker-machine create --driver virtualbox --virtualbox-no-vtx-check default gives me the below

C:\Users\wt>docker-machine create --driver virtualbox --virtualbox-no-vtx-check default Running pre-create checks... Creating machine... (default) Copying C:\Users\wt.docker\machine\cache\boot2docker.iso to C:\Users\ wt.docker\machine\machines\default\boot2docker.iso... (default) Creating VirtualBox VM... (default) Creating SSH key... (default) Starting the VM... (default) Check network to re-create if needed... (default) Windows might ask for the permission to configure a dhcp server. Somet imes, such confirmation window is minimized in the taskbar. (default) Waiting for an IP...

I am using VirtualBox version 5.1.22r115126

rainer-h commented 7 years ago

I had the same problem:

Windows 7 64bit DockerToolbox 17.06.0a-ce VirtualBox 5.1.24 r117012

I tried repeatedly with no effect

docker-machine rm default docker.machine create --driver virtualbox default

my solution:

  1. uninstall Avira Antivir
  2. uninstall DockerToolbox
  3. remove VirtualBox host only networks (see Preferences > network)
  4. uninstall VirtualBox
  5. reinstall DockerToolbox (incl. Virtualbox)
  6. Start Docker Quickstart Terminal (here there were some issues with duplicate host only virtual networks)
  7. (after reinstalling Avira Antivir docker is still working)
sarahmaas commented 7 years ago

I was able to get past it just by opening up VirtualBox.

SantiagoMatallana commented 6 years ago

When I installed it the first time "Docker quick start terminal stops at 'Waiting for an IP..." then I disabled the Antivirus (Kaspersky) and installed it again and works. It seems to be the Antivirus was blocking the port.

m4r6i0 commented 6 years ago

Hello everyone, everything good?

It's with the same problem, but I'm running docker-machine create on Linux Mint virtualized on VmWare over Windows 10.

It crashes right into the task "Waiting for an Iurei the Vmware network options for Bridged without the option of replacing the physical network

I configured the Vmware network options as NAT

And without success anyway, would anyone have an idea to solve this problem?

Thank you all

boralprophecy commented 5 years ago

Faced this issue with Docker quick start terminal. Just closed the terminal and restarted it. Got solved.

fozog commented 5 years ago

I also had dockermachine stuck on Waiting for IP. I used docker-machine -D create ... to debug I used the ssh command to connect to the VM: OpenSSH .... Then I discovered my problem was the permissions on the private key. OpenSSH refused to use it because permissions were deemed too permissive (I allowed another user to read my home directory). Remove the permissions, then machine create works perfectly.

niujin commented 5 years ago

The 18.09 version of boot2docker is broken (at least on my computer). I switched to a different version (18.06) and it started to work.

yanzhen74 commented 5 years ago

The 18.09 version wasted my several days. Switched to 17.12.0-ce then everything is ok.

catalsdevelop commented 5 years ago

Same issue on my mac when I upgrade my machine with docker-machine upgrade machine-name.

Error occurs when "Waiting for an ip" and can't do a upgrade again. So I download an old boot2docker.iso(version 18.06),and replace it to ~/.docker/machine/machines/your-machine-name/boot2docker.iso, then docker-machine restart machine-name, my docker come back!

saalmaan commented 5 years ago

@fozog looks like I am having similar issue to you

I am trying to create a docker machine with following command

docker-machine -D create nfsbox --virtualbox-no-vtx-check

This is where docker machine creation gets stuck

(nfsbox) DBG | Getting to WaitForSSH function...
(nfsbox) DBG | Using SSH client type: external
(nfsbox) DBG | Using SSH private key: /root/.docker/machine/machines/nfsbox/id_rsa (-rw-------)
(nfsbox) DBG | &{[-F /dev/null -o ConnectionAttempts=3 -o ConnectTimeout=10 -o ControlMaster=no -o ControlPath=none -o LogLevel=quiet -o PasswordAuthentication=no -o ServerAliveInterval=60 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null docker@127.0.0.1 -o IdentitiesOnly=yes -i /root/.docker/machine/machines/nfsbox/id_rsa -p 40819] /usr/bin/ssh <nil>}
(nfsbox) DBG | About to run SSH command:
(nfsbox) DBG | exit 0

Any suggestions to what I could be missing?

My Setup Ubuntu 18.04 LTS Linode VM

yeecai commented 5 years ago

At first, I was doing : docker-machine create --driver myvm1 Got error as: Error creating machine: Error in driver during machine creation: This computer doesn't have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory

Then I tried: docker-machine create default --virtualbox-no-vtx-check Got waiting for an ip... for more 5 minutes

Can't wait so I docker-machine rm myvm1 and changed BIOS

img_20190226_215738

Try docker-machine create --driver myvm1 again, wait less than 1 minute and It works now.

Turns out the error prompt message was right, it is indeed mandatory to change BIOS:)

PS:Ubuntu 18.04

NicTanghe commented 5 years ago

this issue was resolved for me by raising the ram available to the vm.

solesensei commented 5 years ago

My Setup Ubuntu 18.04 LTS Linode VM

@saalmaan can you use docker-ce instead? It's more stable. Guide: DigitalOcean: Use Docker on Ubuntu 18.04

iki789 commented 5 years ago

I just pressed Ctrl+C(tried to exit) and it continued and is now working fine😕

Ronkiro commented 4 years ago

This was occuring with me, i just waited a bit and it worked lol

nickdul commented 4 years ago
(default) Waiting for an IP...

in my case similar issue has been fixed by switching to proper ssh implementation: docker/machine#4625

SaeedEY commented 4 years ago

Whats the problem ?

i did some works in a Virtual Box image files and while i had tried to take the actions back to previous state then i faced with this error.

What helped me to repair it ?

If your VM start normally and the docker terminal has been accessible from your Virtual Box as like as what happened to me and if we consider that the conditions had been same as mine , then you have to regenerate your ssh keys : run docker-machine regenerate-certs in your console and copy the "id_rsa.pub" file from your docker directory -- e.g. in Windows : C:\Users\<account_user>\.docker\machine\machines\default\id_rsa.pub -- to your VM ssh path -- e.g. in VM Docker Linux /home/docker/.ssh/ -- inside both "authorized_keys" and "authorized_keys2" files , then run docker-machine ip command in your console. if it show you an IP address , then all goes done as like as me.

eklavya-git commented 4 years ago

I had the same problem. Solved it by opening Oracle VM Virtualbox, deleting the 'default' machine and launching again Docker Quickstart Terminal. This resulted in the 'default' machine being reinstalled.

Saved my day, worked for me like a charm. Thanks much!!

BigPackie commented 4 years ago

Hello guys. I had the same issue. This is how I solved it:

  1. Stop the Docker Quickstart Terminal
  2. Open Oracle VM VirtualBox
  3. Right click on the default running VM instance, choose Close > Power Off
  4. Right click on the default VM instance, choose Remove, on the propmp choose to delete all files
  5. Keep the Oracle VM VirtualBox open
  6. Run the Docker Quickstart Terminal again
  7. You will see It will create a new default running VM instance for you, and the Quickstart Terminal will go pass the (default) Waiting for an IP... successfully very quickly (a few seconds)

Hope it helps.

Cheers.