-
Notifications
You must be signed in to change notification settings - Fork 18.6k
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
Docker does not start - Unit docker.socket failed to load #25098
Comments
I was able to get around this issue temporarily by copying /usr/lib/systemd/system/docker.socket from a different vm which was still running rc4. |
@kylejw1 I did the same thing and it works. |
I'm assuming the build process is similar for Fedora, since it's also missing in the package for 24. |
/cc @crosbymichael |
This should be fixed on master, and will be included in 1.12-GA; to fix this issue, change the docker unit file as is done in this PR: #25094 |
Yes, this was fixed via #25094. Thanks for the report. |
For me this heppened after updating from RC4 to RC5. Even after I commented/removed like on PR: #25094. It was necessary to do like #issuecomment-235450116, and it works. |
@adrianovieira did you run |
yes! |
Actually I only "comment" that line. Now I removed it and everything is ok. |
@adrianovieira nice, thanks for double checking |
ok! may be the update process could fix that.. instead of removing by hand. What do you think? e.g.: :D |
@adrianovieira if the file has not been modified, update should replace it automatically |
I've got the same issue after this morning's release. I've tried to uninstall docker :
I'm on Fedora 24, with selinux disabled |
@theonlydoo was this on a fresh install or an upgrade? If it was an upgrade did you have any modifications made to your docker systemd unit file? (causing the installer to skip updating that file) |
@thaJeztah First it was an upgrade, with a systemd unit file edited to enable the |
@theonlydoo is your system still messed up? Could you run something like |
I just updated from rc4 to rc5 and got the same issue. I am running Centos7 |
@shawnwhit the "socket failed to load" is resolved in 1.12.0, we're looking into the SELinux issue; appears to be an update in SELinux upstream that causes issues |
I just updated from rc4 to rc5 and got the same issue. I am running RHEL7. |
@asmialoski see #25098 (comment), also 1.12.0 has been released and contains various bug fixes since RC5 |
Fixed by just adding the Unit. /usr/lib/systemd/system/docker.socket [Unit]
Description=Docker Socket for the API
PartOf=docker.service
[Socket]
ListenStream=/var/run/docker.sock
SocketMode=0660
SocketUser=root
SocketGroup=docker
[Install]
WantedBy=sockets.target https://github.com/docker/docker/blob/master/contrib/init/systemd/docker.socket |
Had also today the same issue after upgrading from 1.10.2 to 1.12 on Redhat. Solution from @lcamilo15 fixed the issue. Edit: Also now happening on fresh server: Red Hat Enterprise Linux Server release 7.2 (Maipo) |
Upgrade to the latest this morning, the package still doesnt provides the socket that @lcamilo15 mentioned and docker still wont start. @crosbymichael the issue mentioned in journalctl is the exact same that is workaround by @lcamilo15. For me the immediate workaround was to rollback to the previous version of docker. |
@theonlydoo the socket file is no more provided in the docker package (1.12 and later) – it should look like this : https://github.com/docker/docker/blob/master/contrib/init/systemd/docker.service.rpm. You can look at #24804 for reason what it was removed.
The immediate workaround should be to remove the |
@vdemeester so there is no planned "migration" handle on package upgrade for this ? |
@theonlydoo I'm not sure how fedora/rpm-based distribution handle updates of these files (invoking @runcom here). I thought it would have update/overwrite the |
here is what I got when I restart the docker w/o the
|
Fyi, I just used the old versions after running into the issues noted above. Works fine for me. |
Running into a (Potentially?) related issue. Installing 1.12 over the top of 1.11.2 on RHEL7 (up to date) leads to the docker engine being unable to start. Removing "-H fd://" from the run line does tend to fix the issue. Sounds like there's a break in the Require/After config between 1.11 and 1.12? HOWEVER doing this leaves the daemon unable to be accessed by anyone but root and then only with DOCKER_HOST set. (Groups file doesn't work either). I'll see about rolling out all related docker files and doing a clean install from yum. NOTE: I don't THINK i've modified the systemd service file, but I'll check that also. |
Update: So the base docker systemd files work just fine, however when I drop the following systemd drop in file in place I get:
The Systemd drop in file (As per documentation here: https://docs.docker.com/engine/admin/systemd/) looks like the following:
Had to remove the "-H fd://" from the documented drop in file option or I'd get the daemon fail to start again. Help? What's wrong with the systemd drop in file that's causing the system not to be accessible from "docker ps" at the command line? The docker environment files referenced are as follows: /etc/sysconfig/docker: The final command line for dockerd comes out as follows: (NOTE: Yes I am aware this is a totally open / unsecured installation, no i'm not planning on going to production with this, yes this is on an isolated sandbox.) I've tracked the problem down to the Networking Options...is there something about 1.12's ability to use -H tcp://0.0.0.0:2375 -H unix:///docker/docker.sock? Update: So I've tracked this down: Apparently with the removal of "fd://" as an option on RHEL we're down to 3 methods to connect to docker:
The problem seems to be that turning on ANY Networking options (Such as TCP://) DISABLES whatever the local connection method is...if dockerd is loaded with -H tcp://0.0.0.0:2375, all users will get "Cannot connect to the Docker daemon. Is the docker daemon running on this host?" unless they have "DOCKER_HOST" set. This was NOT the case when docker was capable of being used with the "fd://" option to use systemd sockets, but since this has been removed, significant functionality for RHEL has been impared. Is there a solution to this other than "too bad, you should have been using Ubuntu"? |
@Illydth by default, the client look on unix socket in The breaking change here is that using |
@vdemeester the problem there is that we only removed socket activation for RPM based platforms (because it caused problems there), but not for other platforms |
Added a Redhat/Centos specific comment to #22847 (comment) so jumping over to this issue. If there is a need for documentation updates, I'd be glad to assist. |
Getting this issue after trying to install docker on Centos 7 using docker-machine generic driver. |
@EtienneK looks like there's an open issue for that; docker/machine#3632 |
Try to create /usr/lib/systemd/system/docker.socket if missing and/or rm /var/lib/docker as well as /var/run/docker. |
Top google hit on "docker systemd" gets you this page: https://docs.docker.com/engine/admin/systemd/ Which explicitly states in it's documentation to put "-H fd://" into your systemd drop in file. This is why so many RHEL users broke with the 1.12 install: Docker's own Docks state to put that in the file which was subsequently removed. To further compound the issue, because the file exists, it will NOT get overwritten/removed in the upgrade...meaning anyone who's followed those instructions in the past will have a broken docker after yum upgrade... Big old warnings about "fd://" being removed for RHEL/RPM distributions should be ALL OVER that page. Finding the documentation that this feature was removed was practically impossible as well. |
This is still an issue. Why is this bug closed? |
yes, I saw this issue in centos 7, maybe it is related old version 1.11.1 has been cleaned from
After manually create the
The exist running instance (with version docker-engine 1.11.1) has no this issue, only see this issue in new instance. |
I just saw this on a fresh and fully updated CentOS 7 image while trying to
|
@lcamilo15 solution works for FC 22
|
Hi, Thanks a lot |
@dongalex if it's on the same host, simply |
@thaJeztah , yes, i tried, it works ,thank you! |
This is still an issue?
And added the docker.socket as well:
However, it still does not allow me to start docker. Is there anyway to fix this? |
@sajfarahani it's only an issue if you made modifications to the unit file, or used drop-in files that use Some things worth mentioning based on the info you provided
|
Just for the record, I was facing the same problem & it was fixed by just touching the file /usr/lib/systemd/system/docker.socket under RHEL7.3. Weird! Thanks, |
@subodhp systemd socket activation for RPM based installs has been removed since docker 1.12 (see https://github.com/moby/moby/releases/tag/v1.12.6), so if the unit file is expecting that, it's possible you either have changes in your unit file, or there's a drop-in file overriding the default config; read the instructions at the top of the release notes, which may help; https://github.com/moby/moby/releases/tag/v1.12.6 |
@thaJeztah Thanks, that provided the explanation for the behavior, I was able to reproduce the issue and rectify via the procedure. Thanks, |
systemctl start docker.socket |
just reboot the system through terminal |
Uninstalled Docker using:
Installed again using:
The result of last command is:
Running on CentOS 7.1.
The text was updated successfully, but these errors were encountered: