1

How do I kill the docker main process? Why does it keep crashing?

I have docker installed on Ubuntu (on AWS).

I started a cluster the other day, and let it run over night. (It appeared to start with no issues.)

Returning the next day, I did a docker ps:

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

So I tail -f /var/log/syslog:

Jul 14 11:25:20 server01 kernel: [8107974.094867] init: docker main process (23915) terminated with status 1
Jul 14 11:25:20 server01 kernel: [8107974.094876] init: docker main process ended, respawning
Jul 14 11:25:21 server01 kernel: [8107975.451554] init: docker main process (23961) terminated with status 1
Jul 14 11:25:21 server01 kernel: [8107975.451564] init: docker main process ended, respawning

And the syslog looks like this, for hours.

And so I try me@server01:~$ sudo sysctl docker stop:

sysctl: cannot stat /proc/sys/docker: No such file or directory
sysctl: cannot stat /proc/sys/stop: No such file or directory

Then I try me@server01:~$ sudo service docker stop:

docker stop/waiting

Then sudo service docker start:

docker start/running, process 11150

And tail -f /var/log/syslog:

Jul 14 11:35:13 server01 kernel: [8108567.403154] init: docker main process (11082) terminated with status 1
Jul 14 11:36:46 server01 kernel: [8108660.693572] init: docker main process (11150) terminated with status 1
Jul 14 11:36:46 server01 kernel: [8108660.693581] init: docker main process ended, respawning
Jul 14 11:36:48 server01 kernel: [8108662.068454] init: docker main process (11200) terminated with status 1
Jul 14 11:36:48 server01 kernel: [8108662.068463] init: docker main process ended, respawning

Thinking myself clever, I sudo kill -SIGUSR1 $(cat /var/run/docker.pid) then...

sudo kill -SIGUSR1 $(cat /var/run/docker.pid)
sudo kill -SIGUSR1 $(cat /var/run/docker.pid)
sudo kill -SIGUSR1 $(cat /var/run/docker.pid)

Just for good measure... and yet:

me@server01:~$ tail -f /var/log/syslog
Jul 14 11:56:07 server01 kernel: [8109821.948151] init: docker main process (17416) terminated with status 1
Jul 14 11:56:07 server01 kernel: [8109821.948160] init: docker main process ended, respawning
Jul 14 11:56:09 server01 kernel: [8109823.340658] init: docker main process (17469) terminated with status 1
Jul 14 11:56:09 server01 kernel: [8109823.340666] init: docker main process ended, respawning

And so forth... So I'm back to where I began.


Unfortunately, systemctl: command not found


docker run hello-world:

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

You want the systemctl command, not sysctl.

systemctl stop docker

If you want to stop it from starting at boot:

systemctl disable docker
  • Unfortunately systemctl: command not found – NonCreature0714 Jul 14 '17 at 18:27
  • What version of Ubuntu? You may also want to add the line DOCKER_OPTS="--debug=true --log-level=debug to /etc/default/docker. – Deathgrip Jul 14 '17 at 18:30
  • Not entirely sure, but uname -a outputs: Linux server 3.13.0-91-generic #138-Ubuntu SMP Fri Jun 24 17:00:34 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux – NonCreature0714 Jul 14 '17 at 18:31
  • lsb_release -a or cat /etc/os-release or cat /etc/lsb-release. – Deathgrip Jul 14 '17 at 18:32
  • Excuse me, lsb_release -a tells me it's 14.04.5 LTS – NonCreature0714 Jul 14 '17 at 18:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.