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

17.06.0 on Ubuntu - Docker system service fails to start. #47

Closed
glenpike opened this issue Jun 29, 2017 · 29 comments
Closed

17.06.0 on Ubuntu - Docker system service fails to start. #47

glenpike opened this issue Jun 29, 2017 · 29 comments

Comments

@glenpike
Copy link

Expected behavior

Docker service starts

Actual behavior

Docker service fails to start

Information

Distro: Ubuntu Xenial
Docker CE: 17.06.0ce-0ubuntu

Steps to reproduce the behavior

  1. systemctl start docker

Docker service fails to start.

  1. systemctl log / journal -xe not helpful, but syslog says:
Jun 29 11:43:40 mc-1 systemd[1]: Starting Docker Application Container Engine...
Jun 29 11:43:40 mc-1 docker[5899]: `docker daemon` is not supported on Linux. Please run `dockerd` directly
Jun 29 11:43:40 mc-1 systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Jun 29 11:43:40 mc-1 systemd[1]: Failed to start Docker Application Container Engine.
  1. sudo systemctl edit --full docker.service has nothing about docker daemon, but shows the following line:
ExecStart=/usr/bin/dockerd -H fd://

Similar to #11 ?

Workaround:

apt-get install docker-ce=17.05.0~ce-0~ubuntu-xenial
@glenpike
Copy link
Author

See: docker/machine#4156

@narration-sd
Copy link

narration-sd commented Jun 30, 2017

I'm not sure why this didn't cross-reference, but more information and workaround here:

#11 (comment)

@corbathegeek
Copy link

Workaround listed above doesn't work. Can't locate the ubuntu xenial version:

peterc@L4692197:~$ sudo apt-get install docker-ce=17.05.0~ce-0~ubuntu-xenial Reading package lists... Done Building dependency tree Reading state information... Done E: Version '17.05.0~ce-0~ubuntu-xenial' for 'docker-ce' was not found peterc@L4692197:~$

@glenpike
Copy link
Author

glenpike commented Jul 6, 2017

Have you updated your apt-cache?
sudo apt-get update

Then checked what packages are available for docker?
sudo apt-cache showpkg docker-ce
(Command from top of my head so if it doesn't work read the doc's for apt-cache)

That should show all the available versions then you can pick one that's not the broken version.

@muffl0n
Copy link

muffl0n commented Jul 10, 2017

Having the same problem. Downgrading to 17.03.2 helps

apt-get remove docker-ce
apt-get install docker-ce=17.03.2~ce-0~ubuntu-xenial

@mpepping
Copy link

mpepping commented Aug 17, 2017

It seems that this Engine Deprecation feature is already removed in 17.06 .. whilst scheduled for the 17.12 release.

@glenpike
Copy link
Author

This issue also happens if you use the regenerate-certs command - necessary if you reboot your machine and it gets a new IP...

@FX-HAO
Copy link

FX-HAO commented Sep 6, 2017

Replace this line in /etc/systemd/system/docker.service and then run systemctl daemon-reload should fix the problem on Ubuntu.

# ExecStart=/usr/bin/docker daemon -H tcp://0.0.0.0:2376 -H unix:///var/run/docker.sock --storage-driver aufs --tlsverify --tlscacert /etc/docker/ca.pem --tlscert /etc/docker/server.pem --tlskey /etc/docker/server-key.pem --label provider=generic  --mtu=1472 --bip=10.1.63.1/24
ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2376 -H unix:///var/run/docker.sock --storage-driver aufs --tlsverify --tlscacert /etc/docker/ca.pem --tlscert /etc/docker/server.pem --tlskey /etc/docker/server-key.pem --label provider=generic  --mtu=1472 --bip=10.1.63.1/24

@michalm86
Copy link

michalm86 commented Oct 19, 2017

Or use systemctl edit docker to override ExecStart
https://success.docker.com/KBase/Using_systemd_to_control_the_Docker_daemon

@chiflux
Copy link

chiflux commented Dec 11, 2017

Installing 17.09.1-ce on Ubuntu 16.04
To me, it appears to be an unresolvable problem after doing apt-get dist-upgrade . Wild guess is, it is connected with the Kernel Version...

This environment works fine with 17.09.1-ce ...
4.4.0-97-generic #120-Ubuntu SMP Tue Sep 19 17:28:18 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

This environment fails with 17.09.1-ce (17.05.0-ce works fine, though!)...
4.4.0-103-generic #126-Ubuntu SMP Mon Dec 4 16:23:28 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

@lianesten
Copy link

If for any reason the status container after run image is Exited, use:

docker run -d -ti <image_id>

This indicate interctive CLI, so the status container will be Up.

@KingReload
Copy link

KingReload commented Jan 17, 2018

I have a funny one for you guys:

user:~$ sudo service docker start
* Starting Docker: docker [ OK ]
user:~$ sudo service docker status
* Docker is not running

@sepidetari
Copy link

I have the same problem and failed to solve it till now ....
just after installing try to run:
sudo docker run hello-world
but Received this:
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.See 'docker run --help'.
then:
sudo service docker start

  • Starting Docker: docker
    sudo service docker status
  • Docker is not running

@seemethere
Copy link

Closing this since it's related to an older (unsupported version of Docker CE).

Feel free to continue the conversation or post a new issue if you see this issue arise with newer versions of Docker CE!

@bronsonatcs
Copy link

i dunno ive tried multiple version and come into the same issue, i feel like removing docker is leaving some files behind which is causing errors when re installing it.

@filippo-orru
Copy link

filippo-orru commented Apr 14, 2019

I'm having the same problem while running Debian on armhf on my phone in chroot.

I have a funny one for you guys:

user:~$ sudo service docker start
* Starting Docker: docker [ OK ]
user:~$ sudo service docker status
* Docker is not running

docker run hello-world as well as docker info both return docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.

@filinvadim
Copy link

sudo apt install docker.io
helps me

@crisanlucid
Copy link

sudo service docker start

Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.

@adibenc
Copy link

adibenc commented Sep 18, 2019

sudo apt install docker.io
helps me

same here, the cause of my case is missing dockerd. i have to install containerd & docker.io with apt.

journalctl -u docker.service says

  • /usr/bin/dockerd not present or not executable

@plato1123
Copy link

plato1123 commented Dec 28, 2019

Was getting:
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.

I ran sudo dockerd --debug and got:
failed to start daemon: mkdir /var/lib/docker/runtimes: not a directory

dafuq?

sudo rm /var/lib/docker/runtimes

sudo mkdir /var/lib/docker/runtimes

sudo chmod a+w /var/lib/docker/runtimes

sudo service docker start

Now she works!

@nikluwfy
Copy link

This solved issue for me:

echo "export DOCKER_HOST=tcp://localhost:2375" >> ~/.bashrc && source ~/.bashrc

@kurdi89
Copy link

kurdi89 commented Apr 8, 2020

was getting the same error on WSL and @nikluwfy answer solved it

echo "export DOCKER_HOST=tcp://localhost:2375" >> ~/.zshrc && source ~/.zshrc

@hassaan-prog
Copy link

I have a funny one for you guys:

user:~$ sudo service docker start
* Starting Docker: docker [ OK ]
user:~$ sudo service docker status
* Docker is not running

i am still facing the same issue on WSL, even after trying above posted solutions.

@thaJeztah
Copy link
Member

WSL1 does not have all features needed to run a container engine such as docker or containerd, so that's expected; you can run docker on WSL2; if your machine supports WSL2, you can install Docker Desktop for Windows, and have it run docker in WSL2

@nikluwfy
Copy link

I have a funny one for you guys:
user:~$ sudo service docker start
* Starting Docker: docker [ OK ]
user:~$ sudo service docker status
* Docker is not running

i am still facing the same issue on WSL, even after trying above posted solutions.

@thaJeztah is right. You can't install and run Docker services directly in your subsystem.
You have to install and run your Docker Desktop for Windows and then try running command I've suggested above.

@hassaan-prog
Copy link

@thaJeztah @nikluwfy thank you for your answers, i made it work by following docker desktop documentation, and that done the trick for me.

@ckvtvm-arch
Copy link

i have same issue, please let me know the solution

root@L5PXPQN2:/home/centy# sudo service docker restart

  • Starting Docker: docker [ OK ]
    root@L5PXPQN2:/home/centy# sudo service docker status
  • Docker is not running

@ckvtvm-arch
Copy link

Please let me know how you solved this

root@L5PXPQN2:/home/centy# sudo service docker restart

  • Starting Docker: docker [ OK ]
    root@L5PXPQN2:/home/centy# sudo service docker status
  • Docker is not running

@thaJeztah
Copy link
Member

@ckvtvm-arch there's no single answer to that question. The service failing to run can have any reason. I'd recommend looking for logs to find out what's causing that problem in your situation (journalctl -xu docker would probably give more details if the service failed).

Please keep in mind that this 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;

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