FS#54867 - [docker] Service doesn't start up with systemctl

Attached to Project: Community Packages
Opened by Musikolo (Musikolo) - Wednesday, 19 July 2017, 02:18 GMT
Last edited by Eli Schwartz (eschwartz) - Wednesday, 19 July 2017, 04:09 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To No-one
Architecture x86_64
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: Docker service doesn't start up with systemctl. My system is 100% up-to-date.

- The following steps DO WORK with docker-1:17.05.0-1
- The following steps DO NOT WORK with docker-1:17.06.0-1


Steps to reproduce:

[musikolo@MyPC ~]$ sudo systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/docker.service.d
└─imagelocation.conf
Active: inactive (dead)
Docs: https://docs.docker.com

[musikolo@MyPC ~]$ sudo systemctl start docker
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
[musikolo@MyPC ~]$ sudo journalctl -xe
-- Unit docker.socket has begun starting up.
jul 18 21:04:55 MyPC systemd[1]: Listening on Docker Socket for the API.
-- Subject: Unit docker.socket has finished start-up
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.socket has finished starting up.
--
-- The start-up result is done.
jul 18 21:04:55 MyPC systemd[1]: Starting Docker Application Container Engine...
-- Subject: Unit docker.service has begun start-up
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.service has begun starting up.
jul 18 21:04:56 MyPC docker[5559]: `docker daemon` is not supported on Linux. Please run `dockerd` directly
jul 18 21:04:56 MyPC systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
jul 18 21:04:56 MyPC systemd[1]: Failed to start Docker Application Container Engine.
-- Subject: Unit docker.service has failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.service has failed.
--
-- The result is failed.
jul 18 21:04:56 MyPC systemd[1]: docker.service: Unit entered failed state.
jul 18 21:04:56 MyPC systemd[1]: docker.service: Failed with result 'exit-code'.
jul 18 21:04:56 MyPC systemd[1]: docker.service: Service hold-off time over, scheduling restart.
jul 18 21:04:56 MyPC systemd[1]: Stopped Docker Application Container Engine.
-- Subject: Unit docker.service has finished shutting down
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.service has finished shutting down.
jul 18 21:04:56 MyPC systemd[1]: Closed Docker Socket for the API.
-- Subject: Unit docker.socket has finished shutting down
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.socket has finished shutting down.
jul 18 21:04:56 MyPC systemd[1]: Stopping Docker Socket for the API.
-- Subject: Unit docker.socket has begun shutting down
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.socket has begun shutting down.
jul 18 21:04:56 MyPC systemd[1]: Starting Docker Socket for the API.
-- Subject: Unit docker.socket has begun start-up
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.socket has begun starting up.
jul 18 21:04:56 MyPC systemd[1]: Listening on Docker Socket for the API.
-- Subject: Unit docker.socket has finished start-up
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.socket has finished starting up.
--
-- The start-up result is done.
jul 18 21:04:56 MyPC systemd[1]: docker.service: Start request repeated too quickly.
jul 18 21:04:56 MyPC systemd[1]: Failed to start Docker Application Container Engine.
-- Subject: Unit docker.service has failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.service has failed.
--
-- The result is failed.
jul 18 21:04:56 MyPC systemd[1]: docker.socket: Unit entered failed state.
jul 18 21:04:56 MyPC systemd[1]: docker.service: Unit entered failed state.
jul 18 21:04:56 MyPC systemd[1]: docker.service: Failed with result 'exit-code'.
jul 18 21:04:59 MyPC sudo[5565]: musikolo : TTY=pts/1 ; PWD=/home/musikolo ; USER=root ; COMMAND=/usr/bin/journalctl -xe
jul 18 21:04:59 MyPC sudo[5565]: pam_unix(sudo:session): session opened for user root by musikolo(uid=0)




Please, let me know if you need me to do any test to further understand the root cause of the above issue.

Thank you!
This task depends upon

Closed by  Eli Schwartz (eschwartz)
Wednesday, 19 July 2017, 04:09 GMT
Reason for closing:  Not a bug
Additional comments about closing:  stale user dropin
Comment by Eli Schwartz (eschwartz) - Wednesday, 19 July 2017, 02:22 GMT
jul 18 21:04:56 MyPC docker[5559]: `docker daemon` is not supported on Linux. Please run `dockerd` directly
jul 18 21:04:56 MyPC systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE

Seems fairly obvious to me. Why does that service file use the wrong ExecStart line, I wonder?
Comment by Musikolo (Musikolo) - Wednesday, 19 July 2017, 02:47 GMT
I've compared the service file of both packages (docker-1:17.05.0-1 and docker-1:17.06.0-1) and they are identical. I've also compared the list of files of both packages, and the new one only has a few new additional man files. See attachments for further details.

Comment by Eli Schwartz (eschwartz) - Wednesday, 19 July 2017, 03:03 GMT
Looking at the files in the old and new packages which you just attached, it uses the correct ExecStart:
ExecStart=/usr/bin/dockerd -H fd://

Have you edited that file? I see a drop-in:
Drop-In: /etc/systemd/system/docker.service.d
└─imagelocation.conf
Comment by Musikolo (Musikolo) - Wednesday, 19 July 2017, 04:05 GMT
Yes, you are absolutely right!!

I completely forgot I had this file (created a year and half ago):

[root@MyPC ~]# cat /etc/systemd/system/docker.service.d/imagelocation.conf
[Service]
ExecStart=
EExecStart=/usr/bin/docker daemon -g /home/shared/apps/docker -H fd://
[root@MyPC ~]#

Apparently, docker command no longer supports daemon. So, after looking at https://wiki.archlinux.org/index.php/Docker#Images_location, I've been able to upgrade my configuration to the new format:
[root@MyPC ~]# cat /etc/systemd/system/docker.service.d/imagelocation.conf
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd --data-root=/home/shared/apps/docker -H fd://
[root@MyPC ~]#

Now, everything works like charm again!

My apologies for the time spent, and thanks a lot for your help to troubleshoot it.

Regards.