Skip to content
This repository was archived by the owner on Sep 26, 2021. It is now read-only.

Daemon not responding yet: dial tcp : operation timed out #76

Closed
kevinSuttle opened this issue Aug 13, 2015 · 21 comments
Closed

Daemon not responding yet: dial tcp : operation timed out #76

kevinSuttle opened this issue Aug 13, 2015 · 21 comments

Comments

@kevinSuttle
Copy link

This happens after running the Docker Quickstart Terminal app, post 1.8.1 package install. All VMs have been deleted prior to this also.

screen shot 2015-08-13 at 11 17 06 am

I have the full output in a gist if needed.

I hit CTRL-C, I get this:
screen shot 2015-08-13 at 11 24 36 am

@kevinSuttle kevinSuttle changed the title Daemon not responding yet: dial tcp 192.168.99.100:2376: operation timed out Daemon not responding yet: dial tcp : operation timed out Aug 13, 2015
@warrenv
Copy link

warrenv commented Aug 13, 2015

I'm getting something similar on mac osx 10.10.4. This worked fine last night on a different mac.

it-mbp-wvosper:~ wvosper$ docker-machine create -d virtualbox --virtualbox-import-boot2docker-vm boot2docker-vm dev
No default boot2docker iso found locally, downloading the latest release...
Error creating machine: Get https://api.github.com/repos/boot2docker/boot2docker/releases: dial tcp: i/o timeout
You will want to check the provider to make sure the machine and associated resources were properly removed.

@jmorganca jmorganca added the bug label Aug 13, 2015
@jdevora
Copy link

jdevora commented Aug 13, 2015

Same problem here, I was working fine and after I closed the terminal and started it again I'm getting this error.

This time on Windows

@nexapps
Copy link

nexapps commented Aug 19, 2015

Same problem on osx 10.10.4 for me. During the setup I did see several ssh 255 exit status messages:

&{/usr/bin/ssh [/usr/bin/ssh -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -i /Users/{UserNameRemoved}/.docker/machine/machines/default/id_rsa -p 49721 docker@localhost exit 0] [] <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>} SSH cmd err, output: exit status 255: Error getting ssh command 'exit 0' : exit status 255 Getting to WaitForSSH function... Testing TCP connection to: localhost:49721 Using SSH client type: external About to run SSH command:

@kevinSuttle
Copy link
Author

@nexapps Did you have the same issue as I did in #66 ?

@nexapps
Copy link

nexapps commented Aug 20, 2015

@kevinSuttle Looks like it, I was getting password prompts with the quickstart terminal as well. The old boot2docker works fine.

@kevinSuttle
Copy link
Author

Hm. Ok. Thanks @nexapps.

@almostimplemented
Copy link

Same problem here, also on Mac OS X 10.10.4. Lot's of error messages...

STDERR: 
Using SSH client type: external
About to run SSH command:
ip addr show dev eth1
&{/usr/bin/ssh [/usr/bin/ssh -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -i /Users/andrew/.docker/machine/machines/default/id_rsa -p 56994 docker@localhost ip addr show dev eth1] []  <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}
SSH cmd err, output: <nil>: 4: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:f9:59:96 brd ff:ff:ff:ff:ff:ff
    inet 192.168.99.100/24 brd 192.168.99.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fef9:5996/64 scope link 
       valid_lft forever preferred_lft forever

SSH returned: 4: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:f9:59:96 brd ff:ff:ff:ff:ff:ff
    inet 192.168.99.100/24 brd 192.168.99.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fef9:5996/64 scope link 
       valid_lft forever preferred_lft forever

END SSH

Daemon not responding yet: dial tcp 192.168.99.100:2376: operation timed out
Daemon not responding yet: dial tcp 192.168.99.100:2376: operation timed out
Daemon not responding yet: dial tcp 192.168.99.100:2376: operation timed out
Daemon not responding yet: dial tcp 192.168.99.100:2376: operation timed out
Daemon not responding yet: dial tcp 192.168.99.100:2376: operation timed out
Daemon not responding yet: dial tcp 192.168.99.100:2376: operation timed out

UPDATE:
Turns out my problem was VPN related. After exiting my VPN, uninstalling, and retrying, it worked properly.

@harishkashyap
Copy link

same here.

@AlanJui
Copy link

AlanJui commented Aug 27, 2015

I had same problem.

  1. Run '"Docker Quickstart Terminal app", and it get stuck.

  2. Press keys [Ctrl] + [C]. Got output like this:
    dockerquickstartterminal-001

  3. New a "Terminal Window" and run command to restart default

    MAC2012:~ AlanJui$ docker-machine restart default
    Starting VM...
    Restarted machines may have new IP addresses. You may need to re-run the `docker-machine env`       command.
    
  4. Run command: docker-machine env default . It tell me can not find ca.pem file,

    MAC2012:~ AlanJui$ docker-machine env default
    open /Users/AlanJui/.docker/machine/machines/default/ca.pem: no such file or directory
    
  5. Do some checks where I can find .pem file. Then copy ca.pem to ~/.docker/machine/machines/default/ .

    MAC2012:~ AlanJui$ ls .docker/machine/
    cache    certs    machines
    
    MAC2012:~ AlanJui$ ls .docker/machine/certs
    ca-key.pem ca.pem     cert.pem   key.pem
    
    MAC2012:~ AlanJui$ cp .docker/machine/certs/ca.pem .docker/machine/machines/default/
    
  6. Run command again: docker-machine env default. It tell me can not find server.pem file, this time.

    MAC2012:~ AlanJui$ docker-machine env default
    open /Users/AlanJui/.docker/machine/machines/default/server.pem: no such file or directory
    
    

My environment:

  • OS X: V10.10.4
  • Docker Toolbox: V1.8.1 build d12ea79

@kmcgill88
Copy link

Same exact problem as AlanJui for me too.

My enviroment:
OS X: 10.10.5
Docker Toolbox: 1.8.1b

@datmark
Copy link

datmark commented Aug 28, 2015

I am having the same issues that @AlanJui ran into. I copied the certs that were in .docker/machine/certs to the folders where the script is failing (with some renaming) and was not able to progress further.

@kalebwalton
Copy link

Same issue here. Also trying docker-machine regenerate-certs default with no action.

@tiangolo
Copy link
Contributor

tiangolo commented Sep 2, 2015

I had the same problem in two Windows 7 machines. It is working for me now.


Here's how:

I had Docker Toolbox: 1.8.1c, but it gave also the problems commented in issue #12469 of Docker. (Because 1.8.1c uses Git bash 2.5 instead of Git bash 1.9.x or something similar).

  • I uninstalled Docker Toolbox.
  • uninstalled git 2.5
  • removed all the files in: C:\Users\user.docker (your user name might be different)
  • installed Docker Toolbox: 1.8.1b.
  • restarted my computer.

That worked for one of my computers. But the other still had problems.

To solve the problems in the other computer I created another VM / environment like this:

After starting the "Docker Quickstart Terminal" I ran:

docker-machine create --driver virtualbox dev

In this case, "dev" is the name of the new machine, instead of the default machine, named "default".

That created a new Virtual Machine to use with Docker. And that created the ca.pem, cert.pem, key.pem, server.pem and server-key.pem files in the directory for that machine in:

C:\Users\user\.docker\machine\machines\dev

that were missing in the directory for the "default" machine in:

C:\Users\user\.docker\machine\machines\default

Then I ran:

eval "$(docker-machine env dev)"

That did set up the environment to execute the docker commands in that new VM.

And then I was able to execute the normal commands without errors, like:

docker ps

and

docker pull ubuntu

@danielsack
Copy link

It's not a great fix, but I've been able to get around this by:

  1. Opening up VirtualBox and shutting down + deleting the Default VM. I have to do this every time before the machine sleeps.
  2. Setting the VirtualBox Host-Only Network Images on website are not retina #2 IPv6 and v4 protocol to automatic

@felixgonschorek
Copy link

had the same issue - problem was multiple (two, to be precise) "Virtual Box Host Only Networks". Completely removed Virtual Box and re-installed: now i only have 1 "Virtual Box Host Only" adapter on my windows 10 machine and after deleting ~/.docker, removing all VMs and re-starting docker-machine things are working now for me.

@kmcgill88
Copy link

After realizing the toolbox just hooks into your VirtualBox VM I just deleted the toolbox and did a port forward in VirtualBox settings, then just ssh into the Linux VM and install docker yourself. Maybe I'm missing something but I don't think the toolbox is needed.

@tiangolo
Copy link
Contributor

tiangolo commented Sep 3, 2015

@kmcgill88 One good thing I can notice with the toolbox / terminal is that you can move to your local directory with your Dockerfile (something like /C/Users/user/code/super_container/) and build it right from there, without needing to copy all the files from your Windows machine to your VirtualBox machine.

@Aimsam
Copy link

Aimsam commented Sep 9, 2015

i solve this problem .

  1. find VirtualBox-->Preferences..-->Network-->Host Only Networks .delete all of it like vboxnet0 vboxnet1.
  2. docker-machine create ~

@tiangolo
Copy link
Contributor

I just ran into the exact same issue described here but in Windows 7 (again). I think this is seeming related to #116 and #66 (although I first thought those were different issues) because the fix seemed the same.


Description:

It seems that the Quickstart Terminal (I don't know if the startup scripts or the docker-machine) is trying to create a new VirtualBox Host-Only network with IP 192.168.99.1 with subnet mask 255.255.255.0. If it doesn't exist, it tries to create one.

Then, an IP conflict is detected and the Host-Only network receives a new IP although in the settings it still shows the one with 192.168.99.1. In my case, Windows "detects the conflict" an re-assigns a new IP, I'm not sure about Mac, but the problem seems very similar.

To assert that (Windows in my case) is assigning a new IP to the virtual Host-Only network, I can run a command line (cmd.exe or powershell.exe) and type:

ipconfig /all

as described by @ameyrk in this comment #66 (comment).

I think in Linux would be something like

ip a

I'm not sure about Mac, it's probably like in Linux as both are *nix family.

After that, the Quickstart Terminal tries to connect to the VM with its configured IP (something like 192.168.99.100), using the Host-Only network. But as the Host-Only network got assigned a new IP, the terminal can't contact the VM.


Quick fix:

Having the Quickstart Terminal open (unsuccessfully trying to connect to the VM), the VM turned on (check that in VirtualBox), I applied the same fix I mentioned in issues #116 and #66.

I copy it here (updated):

  • Open VirtualBox

To check which Host-Only network is being used:

  • Right click in your Docker VM, probably named "default"
  • Go to Settings -> Network -> Adapter 2
  • Check which Host-Only network is being used in the field "Name", something like "VirtualBox Host-Only Ethernet Adapter # 4"

To update the IP of the Host-Only network:

  • In the main VirtualBox window, Go to File -> Preferences -> Network -> Host-only Networks
  • Double click the Host-Only network being used by your VM (as checked above)
  • Change the "IPv4 Address" from something like 192.168.99.1 to something like 192.168.99.2 (you will probably have to increase / decrease the IP every time). But it's important that the IP actually changes.
  • Hit OK and OK. If the IP changed (it should have changed), you will be prompted for you "Windows Administrator OK" (or however it's named).

After that, the Quickstart Terminal that was trying to connect to the VM was able to connect to it and showed the final "whale" Window.

But before being able to actually use Docker with that VM, e.g. run docker ps, I had to re-setup the environment variables, running:

eval "$(docker-machine env default)"

Note: after restarting the Quickstart Terminal, it will probably try to find a Host-Only network with IP 192.168.99.1, and after being unable to find it (we assigned it 192.168.99.2) it will probably create a new Host-Only network, with IP 192.168.99.1, creating the IP "conflicts" again, making it necessary to follow the steps above ...again.


Additional notes:

Before running into these issues I had to remove the "default" machine because I was having the issue described in #91, no ca.pem file. After the steps above the ca.pem and all the other files were there in the directory and I was able to use Docker.

To remove a machine from the Terminal you can run:

docker-machine stop default
docker-machine rm default

@nexapps
Copy link

nexapps commented Oct 13, 2015

I was able to fix this on OSX by:

This fixed it for me - the reboot seemed important as just running the latest Toolbox had the same issues.

@mchiang0610
Copy link
Contributor

Merging with #153

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests