New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Couldn't connect to Docker daemon at http+unix://var/run/docker.sock - is it running? #1214
Comments
I get the same error message when I run docker. Try to run the following command to add yourself to the group Or you can run the following command to find out what groups you belong to |
Looks like docker-compose is disregarding the |
same issue here |
I encountered same error message just now, that time my laptop WiFi is off without wired connection. I enable WiFi and connected to home wireless network then problem solved. |
You can try the 5.0.3 (prebuild) at https://www.virtualbox.org/wiki/Testbuilds ? It's fix this issue for me. |
i had that problem using docker in my mac, but it got solved one i ran the compose command without sudo, so it seems it is a user issue, |
Soleved for me too with sudo command |
@rept are you still having this issue? The docker version you reported is over a year old now, which is, well, pre-historic in docker terms :) I wonder if this issue should be kept open because it's now collecting all kind of possible reasons the daemon cannot be reached (I don't mean this in a bad way; thanks everyone for suggesting solutions, it is appreciated) |
I did a new installation on a completely different machine and it's working now. So you van close it. |
Thanks, @rept, and good to hear it was resolved! |
I get ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running? too everytime I activate Can it be related?
|
I just solved my problem running the "docker-compose run ..." command with sudo. |
I ran into this when running
|
Simple solution: sudo docker-compose up |
I ran to same issue with:
docker version:
|
That is a workaround not a solution, right? |
I still often face with this |
This is not a compose issue. If you can't connect to the docker daemon from compose there are a few likely causes:
These aren't problems that can be solved by compose. There is an issue with |
I can confirm: This is not a docker-compose issue. If it helps: I came across the same issue (Couldn't connect...) on a Ubuntu host. Running |
hi @dnephin @madflow , I think this is a docker-compose issue. Since with the same docker image and docker network, the container can be started up successfully with
but failed with "docker-compose up". The docker-compose.yml is right the equivalent of the options and arguments of "docker run":
The docker and compose version info:
|
If you can reproduce a connection issue with Compose and not with docker cli please open a new issue. Including all the information you have here is great, and also the error message, and a link to a paste with |
I get this if any of my container names have camel casing.
Change the name to "referencecombo" (all lowercase) and it's fine. The error message definitely doesn't help figure this one out :( |
@chriskessel I think your issue is covered by #2816, it's a bug in Docker Engine. |
after restart docker services , it works for me :(
|
I had the same error, after 15 min of debugging. Turns out all it needs is a |
Why needs to run with sudo? |
@fabiopaiva by default docker connects to a unix socket which is a file with root user and docker group read/write privileges:
so you either need to be root or a member of the docker group to connect to it. If docker was listening on a tcp socket the permissions would not apply. |
I delete file /var/run/docker.sock |
@pixies restart the docker service should recreate it |
Following the steps described in the documentation resolved the issue with my new Ubuntu 16.04 installation. I had to reboot the system after applying those changes though. |
Use command: |
if u met: If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable. u should check if current login user belongs to |
To solve this without
After that logout and log back in and it works link to comment #1214 (comment) ps. this is for people like me that skip the first couple comments -_- |
Just because it takes my a long time to re-dsicover this, and is the first thing I hit on google. There is nothing wrong with my user permissions on my laptop. The problem was the file permissions on one of the mounted folders. If you either fix the permissions so you don't need root to access them, or delete them (in my case it is cached assets for rails) it successfully goes through. The real problem is the error message does not tell you what the specific problem is when you build via docker-compose. |
I met the issue also. It is a user access issue. |
@zjhken that is not really a solution, but rather a workaround. |
@tbuss93 you're right. I have use you solution to solve it. It works. This might be the best solution. |
write => sudo docker info |
Just add |
So in my case the
But for some reason I'm still getting SOMETIMES (notice that this is sometimes the case): Meaning I have the feeling my daemon is crashing or is instable? This is not handy, since I would like to have a stable and reliable continuous integration by using Docker. Any thoughts how I could debug this instability any further? Thanks! |
People, firts at all my apoligize for my english. i'm have th same problem but a realize that its happen on konsole inside kde, but when i run in a terminal crt alt f1 i dont need use sudo!. Iḿ already have $USER on docker group. I hope you ca understand me.- thanks |
Just run;
|
I too faced the issue 'Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?' .Later I noticed the following. [ec2-user@ip-172-28-6-201 docker-elk]$ which docker-compose Since docker-compose binary is inside /usr/local, I was able to execute docker-compose command without 'sudo'. To execute 'docker' command, I needed sudo access. I fixed using following commands. cp /usr/local/bin/docker-compose /usr/bin/docker-compose Now verify 'docker-compose' command needs 'sudo' to execute. |
after adding user to docker group |
For me its working. My docker and docker compose version are. [ec2-user@ip-172-31-7-179 docker-elk]$ sudo docker version Server: |
after following add user procedure make sure u restart your machine. |
I can reliably produce this message with a project structured like this: ├── docker-compose.yml If 'volumes' exceeds a certain size, I get the following error, when running 'docker-compose build':
Running the command with sudo begins to build the image, but, it's nice to not have to rely on sudo for automation. It seems the cause of this issue in my instance is my volumes dir being passed into the build context. I guess some limitation on non-sudo users for build context size? or timeout? So in my instance the fix is to either move the volumes dir, or add it to a .dockerignore, resolving this particular flavour of this error message. |
cd /var/run Solved the problem :) |
solved with sudo |
If everything said here don't work, reinstall docker. It worked for me. |
No need to restart the machine in my experience which is helpful if you're in a production environment - after Failing that, @praveenbaliga 's response 3 comments up from my comment will work in a pinch if the permissions were incorrect to begin with or you're in a staging environment, but may violate security policies if you're working in a hardened production environment. You really only want |
I was having the same issue just now running |
use this link to solve the problem as it works for me. I had the same problem but now it works fine |
And then restart your computer |
This thread is helpful. |
I entered the same issue. On the contrary, I add sudo at the beginning of my command line and it solved! |
This one worked for me. Not sure why adding $USER to docker group didn't solve it. |
I tried everything in this thread: #88
Still no luck.
This is the version:
Any ideas? I also tried installing fig which works right away without any problem...
The text was updated successfully, but these errors were encountered: