Bobcares

For every $500 you spend, we will provide you with a $500 credit on your account*

BLACK FRIDAY SPECIAL EXTENSION

*The maximum is $4000 in credits, Offer valid till December 6th, 2024, New Customers Only, Credit will be applied after purchase and expires after six (6) months

For every $500 you spend, we will provide you with a $500 credit on your account*

BLACK FRIDAY SPECIAL EXTENSION

*The maximum is $4000 in credits, Offer valid till December 6th, 2024, New Customers Only, Credit will be applied after purchase and expires after six (6) months

“Docker: unrecognized service” error – How to resolve

by | Jun 11, 2021

Wondering how to resolve “Docker: unrecognized service” error? We can help you.

Docker is an open-source containerization platform to run on Windows, Linux, and macOS.

As part of our Docker Hosting Support, we assist our customers with several Docker queries.

Today, let us see the steps followed by our Support Techs to resolve this error.

 

How to resolve “Docker: unrecognized service” error?

After installing Docker on Centos, users may see this error while trying to start the Docker service.

# service docker start
docker: unrecognized service

Let us see two different methods used by our Support Techs to resolve it.

Method 1:

In this method, we need to remove docker and then edit Repo.

First, remove the docker using below command:

yum remove docker

Then remove docker-selinux (if you have installed it before)

yum remove docker-selinux

Then modify the file.

vi /etc/yum.repos.d/docker.repo

Fill in the following content directly:

[dockerrepo]

name=Docker Repository

baseurl=https://yum.dockerproject.org/repo/main/centos/$releasever/

enabled=1

gpgcheck=1

gpgkey=https://yum.dockerproject.org/gpg

Then start the installation:

yum install docker-engine

Installed as a dependency: docker-engine-selinux.noarch 0:1.10.2-1.el7.centos

Finally, start the docker service:

service docker start

The following status code is returned:

Starting cgconfig service: [OK]
Starting docker: [OK]

This ensures that the docker starts successfully.

 

Method 2:

In this method, you can directly install using below command:

# curl -fsSL https://get.docker.com/ | sh + sh -c’sleep 3; yum -y -q install docker-engine’

You might see the below prompt message which can be ignored.

Warning: /var/cache/yum/x86_64/7/docker-main-repo/packages/docker-engine-selinux-1.10.2-1.el7.centos.noarch.rpm: header V4 RSA/SHA512 Signature, key ID 2c52609d: NOKEY docker-engine-selinux-1.10.2-1.el7.centos.noarch.rpm public key has not been installed Import GPG key 0x2C52609D: User ID: “Docker Release Tool (releasedocker) “Fingerprint: 5811 8e89 f3a9 1289 7c07 0adb f762 2157 2c52 609d From: https://yum.dockerproject.org/gpg setsebool: SELinux is disabled. + sh -c’docker version’ Client: Version: 1.10.2 API version: 1.22 Go version: go1.5.3 Git commit: c3959b1 Built: Mon Feb 22 16:16:33 2016 OS/Arch: linux/amd64 Cannot connect to the Docker daemon. Is the docker daemon running on this host? If you would like to use Docker as a non-root user, you should now consider adding your user to the “docker” group with something like: sudo usermod -aG docker your-user Remember that you will have to log out and back in for this to take effect!

Then just start it directly using the below command:

service docker start Redirecting to /bin/systemctl start docker.service

 

[Need help with Docker error? We can help you]

 

Conclusion

In short, “Docker: unrecognized service” error may occur while trying to restart Docker service. Today, we saw the methods followed by our Support Techs to resolve it.

Are you using Docker based apps?

There are proven ways to get even more out of your Docker containers! Let us help you.

Spend your time in growing business and we will take care of Docker Infrastructure for you.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.