Skip to content
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

Cannot connect to the Docker daemon #1041

Closed
AbdealiLoKo opened this issue Mar 5, 2016 · 27 comments
Closed

Cannot connect to the Docker daemon #1041

AbdealiLoKo opened this issue Mar 5, 2016 · 27 comments
Labels

Comments

@AbdealiLoKo
Copy link

AbdealiLoKo commented Mar 5, 2016

I'm trying to run rultor on a new repo I created. I was using it fine a while back some bare bones settings. I then added a custom docker container (The one we use for coala) and I keep getting an error.

I seem to be getting the following error continuously:

+ use_image=coala/rultor-python
+ docker pull coala/rultor-python
Using default tag: latest
Warning: failed to get default registry endpoint from daemon (Cannot connect to the Docker daemon. Is the docker daemon running on this host?). Using system default: https://index.docker.io/v1/
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
'cid' file is absent, container wasn't started correctly

You can see the full log at http://www.rultor.com/t/7510-192608320
The PR with the issue AbdealiLoKo/pycolorname#15

We're using nearly the same configs for coala. I'm unable to figure out the issue.


@AbdealiLoKo
Copy link
Author

Seems to be happening in coala too coala/coala-bears#152 (comment)

@original-brownbear
Copy link
Contributor

@AbdealiJK it looks like this has nothing to do with the use of a custom image. The Docker daemon on Rultor seems to be down, I'm on it.

@original-brownbear
Copy link
Contributor

@yegor256 Docker is down on the Rultor server, please restart the daemon as soon as you can.

@yegor256
Copy link
Owner

yegor256 commented Mar 5, 2016

@original-brownbear restarted. would be great to create a mechanism of automatic restarting...

@original-brownbear
Copy link
Contributor

@yegor256 agreed, I'm on it.

@original-brownbear
Copy link
Contributor

@alex-palevsky this is a bug.

@original-brownbear
Copy link
Contributor

@alex-palevsky assign me please.

original-brownbear added a commit to original-brownbear/rultor that referenced this issue Mar 5, 2016
@original-brownbear
Copy link
Contributor

@yegor256 made a restarter, but on second thought, maybe we can do this in a significantly more stable way ...
As far as I can see the current EC2 instance runs Docker via Systemd, so can't we just do this?
............
Put the line:

Restart=on-failure

inside of [service] section of /etc/systemd/system/docker.service.
............
=> if this is possible, I think it's a lot more stable and easier to maintain than adding logic for this to Rultor.
=> if not I'll write a proper integration test for my solution in Rultor and can go ahead with that :)

@alex-palevsky
Copy link
Contributor

@alex-palevsky this is a bug.

@original-brownbear tag "bug" added

@alex-palevsky alex-palevsky added this to the 2.0 milestone Mar 6, 2016
@alex-palevsky
Copy link
Contributor

@abdealijk since there is no milestone yet I set it to "2.0"

@alex-palevsky
Copy link
Contributor

@alex-palevsky assign me please.

@original-brownbear the task is yours, please proceed

@yegor256
Copy link
Owner

yegor256 commented Mar 6, 2016

@original-brownbear yes, we can add that line there. but imagine a situation where a new EC2 instance is created. it won't have that line. and we will have this issue again. we need some check to be built-in into rultor, which will, for example, fail the build if that line is absent. in that case, we will discover the problem right after we start a new EC2 machine.

@original-brownbear
Copy link
Contributor

@yegor256 I agree that Rultor should handle setting up and checking the health of the EC2 instance,
but one issue with the current is that it requires a very stable EC2 instance environment.
What if the next EC2 instance you set up for Rultor has a slight change to the systemd setup and we'll end up in the same spot regardless?

I think talking about the next EC2 instance we actually have two better options:
1.Trivial one: We just fix this setting in systemd now and create an AMI from the current instance.
2. We simply provision it via Docker-Machine?
Then we have a clearly defined Docker host environment and can simply add a 3 line bash script to Rultor that ensures that the daemon is set up correctly. In this case we could even add a stable test for the issue.

Even if you find an issue with option two, isn't option one a far superior approach compared with having Rultor check, if the manual setup of that EC2 went correctly?

@original-brownbear
Copy link
Contributor

@yegor256 any input on the above ? Otherwise I'd just go with a workaround that checks if the process is running properly and then runs sudo service docker restart if it isn't for the time being :)

@yegor256
Copy link
Owner

@original-brownbear rultor must not assume anything about the EC2 (or any other) host it's running on. rultor must simply check whether Docker daemon is up and running or not. if not, it must crash with an exception. that's enough. I think we should run that check every few minutes, by connecting to the server and checking Docker status. we need a "super agent" for that.

@original-brownbear
Copy link
Contributor

@yegor256 ok perfect thanks :)

@original-brownbear
Copy link
Contributor

@alex-palevsky PR here #1051 :)

original-brownbear added a commit to original-brownbear/rultor that referenced this issue Mar 12, 2016
original-brownbear added a commit to original-brownbear/rultor that referenced this issue Mar 12, 2016
@original-brownbear
Copy link
Contributor

@AbdealiJK fixed evidently and measures to stabilize this overall are in the making :)
Can you please close here ?

@original-brownbear
Copy link
Contributor

@alex-palevsky more time please.
Merged already just in case this isn't closed by the author in time :) thanks!

@alex-palevsky
Copy link
Contributor

@abdealijk once 1041-7f83dd26 puzzle is resolved (later, in another ticket), this ticket will be fully complete

@alex-palevsky
Copy link
Contributor

@alex-palevsky PR here #1051 :)

@original-brownbear OK

@alex-palevsky
Copy link
Contributor

@alex-palevsky more time please.
Merged already just in case this isn't closed by the author in time :) thanks!

@original-brownbear no problem, thanks for letting me know

@original-brownbear
Copy link
Contributor

@alex-palevsky this got closed in time afterall, please close it in my agenda too :)

@alex-palevsky
Copy link
Contributor

@alex-palevsky this got closed in time afterall, please close it in my agenda too :)

@original-brownbear it is closed already as far as I can see

@alex-palevsky
Copy link
Contributor

@original-brownbear 30 mins added to your account (payment number AP-2EB61086L35715701), many thanks for your contribution! 163 hours and 55 mins spent here.. +30 added to your rating, at the moment it is: +1206

@alex-palevsky
Copy link
Contributor

@abdealijk the last puzzle 1041-7f83dd26/#1057 originated from here solved

@0pdd
Copy link
Collaborator

0pdd commented Jul 11, 2022

@AbdealiJK the puzzle #1375 is still not solved.

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

No branches or pull requests

5 participants