-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
ERROR #6677
Comments
Agreed. I am seeing errors reported in the daemon that are not being reported back to the CLI. "Couldn't connect" is clearly erroneous in many cases. |
I had that error and it stopped when I ran every command as sudo. |
@ajbazz No. Clearly no. just add your user in the docker group, fixed. You shouldn't run that kind of command using sudo. What I mean here is that many types of errors, syntax errors, connectivity errors, not having the right to connect, etc... are all leading to the same message. Your issue for example should say "OK, the daemon seem to run but I don't have rights to connect, are you in the docker group?" or something of the kind. See the links I pointed to and you'll start to see the diversity of errors reporting the same message. This is clearly a usability issue. |
Hello @aminancelot Thank you for reporting this issue. We are going to evaluate this enhancement but note that any Pull Request improving the error reporting would also be greatly appreciated. |
@jcsirot Just FYI, if your E.g. if you build this Compose spec with services:
app:
build: .
image: some-repo:myTagWithUppercaseChars
version: 3.5 You'll get this wrong and confusing error message: $ docker-compose build
Building app
Couldn't connect to Docker daemon at http+docker://localhost - is it running?
If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable. By contrast, a traditional $ docker build -t some-repo:myTagWithUppercaseChars .
invalid argument "some-repo:myTagWithUppercaseChars" for "-t, --tag" flag: invalid reference format: repository name must be lowercase
See 'docker build --help'. There's a bit more discussion of this general problem on Medium. The tl;dr is that |
Thank you Pierre.
Definitely some good information there.
Much appreciated
Aaron
…On Thu, May 2, 2019 at 10:48 PM Pierre Ancelot ***@***.***> wrote:
@ajbazz <https://github.com/ajbazz> No. Clearly no. just add your user in
the docker group, fixed. You shouldn't run that kind of command using sudo.
What I mean here is that many types of errors, syntax errors, connectivity
errors, not having the right to connect, etc... are all leading to the same
message.
Your issue for example should say "OK, the daemon seem to run but I don't
have rights to connect, are you in the docker group?" or something of the
kind. See the links I pointed to and you'll start to see the diversity of
errors reporting the same message. This is clearly a usability issue.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6677 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABE2J7Q53ZBRGFR3KSUNLRDPTPG4DANCNFSM4HJCMNTQ>
.
|
What I'm seeing in one of my use-cases is that Docker daemon drops connection in the middle of processing of a build command, without providing any error. I'd attempt to fix by extending |
I got the very same error when building an image. I have changed the location of my docker to a different location (via systemd) by using the "-g" parameter When I delete the whole docker folder and restart docker it will work temporarily.
|
This worked for me on Ubuntu 18.04:
|
Same as Menda. The problem appeared after an aborted build. One of my images used a directory that was suddenly belonging to 999 instead of me. chmod fixed it. |
running the command with sudo fixed the issue |
People reporting issue here don't give more details on the condition this error is reported. Running with Closing as not a well described issue we could investigate. If you get such an error please open a new issue and provide a complete description of your environment @danschmidt5189 I tried to reproduce the more detailed issue you reported and can't reproduce with 1.24.1. I get expected error when running
|
@ndeloof Oh come on! There is no more detail because any error reports the same message and developers couldn't be bothered to do proper error reporting. Please reopen this issue and fix the problem instead of denying it's existence. Seems to me it's getting closed out of laziness. Please reopen it and let someone willing do it. |
@aminancelot I can understand your frustration, but you didn't even provided compose/docker version you're using, command being ran, or anything that could help us understand what's going wrong. I'd be happy to assist you if you still encounter this issue, but then please use the issue template so we gather enough information to offer adequate assistance and diagnostic |
Alright, fair enough, I was expecting that the "all routes lead to rome" behaviour could be corrected instead of doing a case by case. At least I know now, if I meet this issue virtually anything can be the error, a syntax error in the compose file can be it. To anyone coming here finding this issue, if you consider compose, avoid the frustration and wasted time. Look for something else. |
No need to be rude. |
I don't think I'm being rude, I'm simply being realistic. It's unfortunate writing doesn't convey tone. Sorry if it seemed so. I have met this error message for multiple different syntax errors. The link mentioned at the opening of the issue clearly shows different reproducible scenarios in which this is happening. |
The first scenarios reported in the blog post would just be confirmed by trying to run The last "different ownership" scenario sounds pretty exotic to me. Could investigate further. Anyway writting a blog post is clearly not the best way to report issues to a project :P |
@ndeloof I'm still seeing this in our CI system when testing a build for (essentially)
It's not a huge deal for us to workaround, but it's weird that I'm still seeing this error and you aren't. (I wonder if the bug was re-introduced in 1.25.0?) |
Tried on another computer (OSX):
I'll investigate further and add a test case to enforce we handle this scenario |
The error message I get is actually sent from docker engine (19.03.5) @danschmidt5189 which version of docker engine are you running (just run |
https://docs.docker.com/install/linux/linux-postinstall/
this helped in my case. |
Thanks @pawaroti! That helped! |
It works for my ubuntu 18 |
Only solution work for my ubuntu 18.4 |
Only this works for me: You don't have a docker daemon, check it out: |
Guys a magic for this problem!
|
Really the problem is with permission like @wireshocks said run sudo docker-compose up -d and booom |
I never had to use sudo docker-compose before. why do I have to start now? Ubuntu 20.04 |
I struggled with the problem for a while, turns out the issue was that my |
Worked on Fedora OS 31. Thanks! |
This thread nicely shows that people don't read and search from the bottom for a potential solution to copy/paste. The original concern was that that message appearing as a catch all exception but then it turned to be a defence for the most common root cause. Grotesque. |
Thanks, @wireshocks, worked for me. |
I ran into the same problem and this article assisted me to solve the issue. |
bro... you just saved my day |
thank you alot |
In my case, the issue was as reported @jmleroy . Some directories within my build tree had become owned by root, which I guess was diverting docker daemon somehow while it was indexing the directory structure. I simply chown'd everything back to my user and it works now (no reboot needed):
|
Yes, you saved my day. It works on CentOS 17 |
Wow, you are absolutely RIGHT. sudo solves all the problems. |
I'm staggered by all those comments. This ticket is about about every issue compose meets ends up reported with that same message. In other words, this ticket is a mess and a shame. I regret having wasted time reporting it. |
worked like a charm for Ubuntu 20.04 |
I was getting Running I was using the following dynamic value which I forgot to set in my shell before running ...
image: image-name:${TAG}
... To avoid getting docker-compose's generic error, you can do this instead so that you are warned when a dynamic value is not found: ...
image: image-name:${TAG?TAG value is required}
... |
No description provided.
The text was updated successfully, but these errors were encountered: