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

Docker Cant't Start On CentOS Linux release 7.4.1708 (Core)?Help me resove it,Please #36039

Closed
Yeading opened this issue Jan 17, 2018 · 13 comments

Comments

@Yeading
Copy link

Yeading commented Jan 17, 2018

OSVersion: CentOS Linux release 7.4.1708 (Core)
1、sudo yum install -y yum-utils
device-mapper-persistent-data
lvm2

2、sudo yum-config-manager
--add-repo
https://download.docker.com/linux/centos/docker-ce.repo

3、 sudo yum-config-manager --enable docker-ce-edge

4、sudo yum-config-manager --enable docker-ce-test

5、 yum install docker-ce-17.12.0.ce-1.el7.centos

6、[root@10-6-27-221-zssslj docker]# rpm -ivh docker-common-1.12.6-68.gitec8512b.el7.centos.x86_64.rpm
error: Failed dependencies:
container-selinux >= 2:2.21-2 is needed by docker-common-2:1.12.6-68.gitec8512b.el7.centos.x86_64
container-storage-setup >= 0.7.0-1 is needed by docker-common-2:1.12.6-68.gitec8512b.el7.centos.x86_64
oci-umount >= 2:2.0.0-1 is needed by docker-common-2:1.12.6-68.gitec8512b.el7.centos.x86_64
skopeo-containers >= 0.1.24-3 is needed by docker-common-2:1.12.6-68.gitec8512b.el7.centos.x86_64

7、rpm -ivh docker-common-1.12.6-68.gitec8512b.el7.centos.x86_64.rpm --nodeps
file /usr/bin/docker from install of docker-common-2:1.12.6-68.gitec8512b.el7.centos.x86_64 conflicts with file from package docker-ce-17.12.0.ce-1.el7.centos.x86_64
file /usr/bin/docker-containerd from install of docker-common-2:1.12.6-68.gitec8512b.el7.centos.x86_64 conflicts with file from package docker-ce-17.12.0.ce-1.el7.centos.x86_64
file /usr/bin/docker-containerd-shim from install of docker-common-2:1.12.6-68.gitec8512b.el7.centos.x86_64 conflicts with file from package docker-ce-17.12.0.ce-1.el7.centos.x86_64
file /usr/bin/dockerd from install of docker-common-2:1.12.6-68.gitec8512b.el7.centos.x86_64 conflicts with file from package docker-ce-17.12.0.ce-1.el7.centos.x86_64
[root@10-6-27-221-zssslj docker]# rpm -ivh docker-common-1.12.6-68.gitec8512b.el7.centos.x86_64.rpm --nodeps

#service docker start
Jan 17 18:29:31 10-6-27-221-zssslj systemd: Cannot add dependency job for unit docker-storage-setup.service, ignoring: Unit not found.
Jan 17 18:29:31 10-6-27-221-zssslj systemd: Starting Docker Application Container Engine...
Jan 17 18:29:31 10-6-27-221-zssslj systemd: Failed at step EXEC spawning /usr/bin/docker-current: No such file or directory
Jan 17 18:29:31 10-6-27-221-zssslj systemd: docker.service: main process exited, code=exited, status=203/EXEC
Jan 17 18:29:31 10-6-27-221-zssslj systemd: Failed to start Docker Application Container Engine.
Jan 17 18:29:31 10-6-27-221-zssslj systemd: Unit docker.service entered failed state.
Jan 17 18:29:31 10-6-27-221-zssslj systemd: docker.service failed.

@cpuguy83
Copy link
Member

You can't install "docker-common".
You must only install the "docker-ce" package and its deps.

"docker-ce" is not an official package of Docker, but one maintained by RedHat... Also very old.

@Yeading
Copy link
Author

Yeading commented Jan 17, 2018

yes,I have installed the "docker-ce" and its deps.
Howerver,I don't know why its can't start;
Error Like this:
Jan 17 17:51:17 10-6-27-221-zssslj.jhydesn.youzu.idc systemd[1]: Starting Docker Application Container Engine...
Jan 17 17:51:17 10-6-27-221-zssslj.jhydesn.youzu.idc systemd[20800]: Failed at step EXEC spawning /usr/bin/docker-current: No such file or directory
Jan 17 17:51:17 10-6-27-221-zssslj.jhydesn.youzu.idc systemd[1]: docker.service: main process exited, code=exited, status=203/EXEC
Jan 17 17:51:17 10-6-27-221-zssslj.jhydesn.youzu.idc systemd[1]: Failed to start Docker Application Container Engine.
Jan 17 17:51:17 10-6-27-221-zssslj.jhydesn.youzu.idc systemd[1]: Unit docker.service entered failed state.
Jan 17 17:51:17 10-6-27-221-zssslj.jhydesn.youzu.idc systemd[1]: docker.service failed.

@cpuguy83
Copy link
Member

This is because you've installed other, non-official packages by force and it has overwritten the systemd service file.

"docker-current" is not from the official package.
Please remove all the rpms you installed, then re-install the "docker-ce" package.

@Yeading
Copy link
Author

Yeading commented Jan 17, 2018

Thanks u so much,I have a try.

@Yeading
Copy link
Author

Yeading commented Jan 17, 2018

[root@10-6-27-221-zssslj yum.repos.d]#
[root@10-6-27-221-zssslj yum.repos.d]# rpm -qa|grep docker
[root@10-6-27-221-zssslj yum.repos.d]# yum list installed |grep docker
[root@10-6-27-221-zssslj yum.repos.d]#
I have uninstall it all,now.
reinstall it ,but can't start it at all. The same error of it.

@cpuguy83
Copy link
Member

How did you re-install?
yum install docker-ce should be all you need.

@Yeading
Copy link
Author

Yeading commented Jan 18, 2018

first:select the stable version
yum list docker-ce --showduplicates | sort -r
docker-ce-17.12.0.ce-1.el7.centos
secondly,
install its neps
wget and install : container-selinux-2.21-1.el7.noarch.rpm
last,
rpm -ivh docker-ce-17.12.0.ce-1.el7.centos

@Yeading
Copy link
Author

Yeading commented Jan 18, 2018

I do according to the official website
web: https://docs.docker.com/engine/installation/linux/docker-ce/centos/#install-docker-ce-1

@Yeading
Copy link
Author

Yeading commented Jan 18, 2018

I found the reason of it;
my operation file system is xfs,it need remkfs the file system type
**

INFO[0000] loading plugin "io.containerd.content.v1.content"... module=containerd type=io.containerd.content.v1
INFO[0000] loading plugin "io.containerd.snapshotter.v1.btrfs"... module=containerd type=io.containerd.snapshotter.v1
WARN[0000] failed to load plugin io.containerd.snapshotter.v1.btrfs error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.btrfs must be a btrfs filesystem to be used with the btrfs snapshotter" module=containerd
INFO[0000] loading plugin "io.containerd.snapshotter.v1.overlayfs"... module=containerd type=io.containerd.snapshotter.v1
WARN[0000] failed to load plugin io.containerd.snapshotter.v1.overlayfs error="/var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.overlayfs does not support d_type. If the backing filesystem is xfs, please reformat with ftype=1 to enable d_type support" module=containerd
INFO[0000] loading plugin "io.containerd.metadata.v1.bolt"... module=containerd type=io.containerd.metadata.v1
WARN[0000] could not use snapshotter btrfs in metadata plugin error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.btrfs must be a btrfs filesystem to be used with the btrfs snapshotter" module="containerd/io.containerd.metadata.v1.bolt"
WARN[0000] could not use snapshotter overlayfs in metadata plugin error="/var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.overlayfs does not support d_type. If the backing filesystem is xfs, please reformat with ftype=1 to enable d_type support" module="containerd/io.containerd.metadata.v1.bolt"
INFO[0000] loading plugin "io.containerd.differ.v1.walking"... module=containerd type=io.containerd.differ.v1
INFO[0000] loading plugin "io.containerd.gc.v1.scheduler"... module=containerd type=io.containerd.gc.v1

@thaJeztah
Copy link
Member

Yes, using overlay or overlay2 on a filesystem without d_type support is not supported

Running overlay (or overlay2) on XFS without d_type is known to cause issues. Older versions of docker "allowed" running without d_type support (for backward-compatibility), and printed a warning (in docker info) as well as logged a warning when starting the daemon;

overlay: the backing xfs filesystem is formatted without d_type support,
which leads to incorrect behavior. Reformat the filesystem with ftype=1
to enable d_type support.
Running without d_type support will no longer be supported in Docker 17.12.

Also see these issues, which contain some information #10294, #29873.

The RHEL release notes mentions this; https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/7.2_Release_Notes/technology-preview-file_systems.html

Note that XFS file systems must be created with the -n ftype=1 option enabled for use as an overlay. With the rootfs and any file systems created during system installation, set the --mkfsoptions=-n ftype=1 parameters in the Anaconda kickstart. When creating a new file system after the installation, run the # mkfs -t xfs -n ftype=1 /PATH/TO/DEVICE command. To determine whether an existing file system is eligible for use as an overlay, run the # xfs_info /PATH/TO/DEVICE | grep ftype command to see if the ftype=1 option is enabled.
Note that OverlayFS provides a restricted set of the POSIX standards. Test your application thoroughly before deploying it with OverlayFS.

Please keep in mind that the GitHub issue tracker is not intended as a general support forum,
but for reporting bugs and feature requests. For other type of questions, consider using one of;

I'm closing this issue because this is not a bug, but feel free to continue the conversation 👍

@Yeading
Copy link
Author

Yeading commented Jan 18, 2018

wonderful,I see it now.

@listenerme
Copy link

rhel 7.4 and docker-ce17.12 : /etc/sysconfig/docker works
centos 7.4 and docker-ce17.12: /etc/sysconfig/docker doesnt work

In RHEL 7.4, its ExecStart=/usr/bin/dockerd-current
in Centos 7.4 , its ExecStart=/usr/bin/dockerd

what is the difference, how can I customize the docker daemon in centos 7.4 , is it possible on through daemon.json. In daemon.json, default-ulimit is not supported.

@cpuguy83
Copy link
Member

@listenerme If you are seeing dockerd-current, this is not the official docker package, so the packaging, init scripts, etc are all different.

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

No branches or pull requests

4 participants