-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Cannot connect to the Docker daemon. Is 'docker -d' running on this host? #1010
Comments
@snakezzl When you run # Run this command to configure your shell:
# eval "$(docker-machine env default)" Do that and you should then be able to run the |
does clicking on Docker CLI from Kitematic work? Please reopen at reply. Thanks! |
FYI, the Docker CLI does not work on my Mac (Mavericks, 10.9). I have to run the eval listed above in order to get output from "docker info". |
Had to manually run the |
@sabat @costimuraru Can you click on Docker CLI and scroll up the terminal, then paste the output here? (or as a gist) |
Here is my issue, running with docker CLI:
|
Hello Everyone!
Any help on this issue will be highly appreciated, Thanks. |
Same problem here. Quite new to this so really need some help. imac:docker Brad$ eval "$(docker-machine env default)" Server: imac:docker Brad$ docker info imac:docker Brad$ docker-machine env default Run this command to configure your shell:eval "$(docker-machine env default)" |
$ docker run hello-world If you are getting the above error, first go and check the docker demon is running or not, then try again. |
@varunnani407 I have started the daemon,
But still getting the same error, when I tried to run the following command on another terminal. $ docker run hello-world |
hope you gone through the installation procedure as per the: http://docs.docker.com/linux/step_one/ i also tried with what you are trying I am able to run properly, if the issue still exists try to reinstall it |
Works great @bradjcox , thanks |
If you'd prefer not to have to run the eval statement mentioned by @FrenchBen and @costimuraru on every terminal session, you could update you bash_profile with the following: #Docker Be sure to restart the terminal session or run source for the changes to take effect. |
@dayelostraco Works! |
@dayelostraco Thanks for the suggestion! Hopefully this isn't a problem that's affecting every single Docker user. If that's the case, why is it happening for us? |
on ubuntu 15.10 , i have to run docker as root, adding myself in docker group does not allow me to create docker container:
service status
|
@ranjib You need to logout then log back in for this to work. |
@FrenchBen ah. thats did it. thank you :-) |
So I have that problem too, but none of the fixes suggested so far work for me. I'm on Ubuntu 15.10:
My user is in the
The
My environment variables look like that
I've already rebooted a few times out of desperation, still no luck. Logging as root, launching the docker deamon manually and running Any ideas? |
A little look at
But somehow, it does seem to be configured correctly:
But somehow, the launched instance doesn't use those parameters:
|
Well apparently, the issue is that the For other people that have the same problem, a solution for that can be found at: http://nknu.net/how-to-configure-docker-on-ubuntu-15-04/ |
@npiguet thanks for the feedback and thorough debug of this. Perhaps you missed the similar comment of the Docker documentation, you'll see that a mention is made about ubuntu 15.04+ and systemd: |
I'm on OSX El Capitan, with last version of docker (1.9.1), installed via homebrew (I previously tried with the official download too, same problem). After run the I'm also running last version of docker-machine (0.5.4) and virtualbox (5.0.10). Running zsh + iTerm. That happened with both docker quick start terminal and also starting the commands by hand in a pre-existing terminal window. |
@lfilho When you say it disconnects after a while are you referring to the same Terminal session? You'll have to run the |
Yes, in the same session! I'm issue docker commands normally and out of the blue it stops responding and gives that message... Not sure why. I maybe have opened a different tab on my iTerm to work in something else and then come back to the tab I was working with docker but I don't believe that would be the issue, would it? I also check for "sudo docker" alias (saw in another thread) but I have no such alias in my system. |
@lfilho Do you have any pre-set Additionally don't use brew to do your updates. use the proper Docker Toolbox installer, to get the tools that work together and have been QA'd as such. |
Ref: moby/moby#17645 run
show
So, if the docker user doesn't belong to the same group as login user, it is not able to access to docker daemon service. Solution,
IMPORTANT log out and back in to take effect |
@plusmancn you're assuming with the above that they started with a new distro and installed docker on it. |
Are you using the Docker Quickstart Terminal App? I had the same message but when after I restarted my mac and run this app, it opens a terminal and runs docker, and after this docker is working fine. |
@npiguet you are right. your workaround also works for me. I am using Ubuntu 15.04. |
@Fakhruddin-Kararawala as mentioned above, this was also in the DOCS: |
Works great on mac @bradjcox , thanks |
Make sure your user is assigned to the docker group:
|
In addition to what TheNotary mentioned, you can just sudo to fix this error if you don't intend to use docker as a non-root user. |
I had similar issues using Ubuntu. Instructions at https://docs.docker.com/engine/installation/ubuntulinux/ solved the problem. |
@click2tman Thanks for point to the docs 👍 |
I just upgraded on OSX 10.10.5 Yosemite. I upgrade to VB5 and upgraded Docker from the latest available Docker Toolbox download. After the upgrade I have the same error as above:
When I run the eval code I get:
I tried regenerating the certs but that doesn't fix it. Any ideas? Update: |
My os is Ubuntu 14.04 |
I was having this issue but restarting the docker-machine vm at virtualbox (named default) solved it |
I see that the resolution to the docker issue has been targeted to OSX and Ubuntu 15.0> I have the deamon running on another terminal (sudo docker -d) and this is the outcome of this command API listen on /var/run/docker.sock Loading containers: done. |
@TamimiGitHub Did you read the docs about having your user added to the proper docker group? |
@FrenchBen Yea this worked after tying to add it, thanks. |
Had the same problem on Ubuntu 14.04 , it was solved by running the make using sudo |
Solved the problem by binding the docker demon to local host add Below lineDOCKER_OPTS="--ip 127.0.0.1" $sudo service docker restart |
@charanrajtc I could imagine that breaking lots of other things that assume localhost to actually be the localhost. |
You have to start docker service first: |
The eval statement does not work for me. It returns: ~ And OSX does not have a 'service' command: ~ $ sudo service docker start Completely out of ideas. |
@seantcanavan when you setup your docker machine you likely named it something other than |
Same problem on Ubuntu 14.04:
|
My problem solved using |
Locking this as the docs explain specifically what needs to be done. |
When i run
docker ps
on Mac OS X, it shows "Cannot connect to the Docker daemon. Is 'docker -d' running on this host?".Here is my docker version when i run
docker version
:And here is my shell env when i run
docker-machine env default
Could someone tell me why i can not exec
docker ps
?The text was updated successfully, but these errors were encountered: