Docker automatically stopped

Docker automatically stopped

This morning I found that the Docker service on one our linux servers for no apparent reason had stopped. From the entries in syslog I could see that Docker had been going up and down since about 06:34 in the morning. Extract from syslog:

# File: /var/log/syslog
Jul  9 06:34:31 server systemd[1]: Stopping Docker Application Container Engine...
Jul  9 06:34:42 server dockerd[1290]: time="2019-07-09T06:34:42.142216961+02:00" level=info msg="Container 2ab734cdb0123ad751675124fsd281ec07c2d8fd113wer0721c3503748csdf508ef8f170 failed to exit within 10 seconds of signal 15 - using the force"
Jul  9 06:34:43 server dockerd[1290]: time="2019-07-09T06:34:43.145338961+02:00" level=error msg="failed to get event" error="rpc error: code = Unavailable desc = transport is closing" module=libcontainerd namespace=moby
Jul  9 06:34:43 server systemd[1]: Stopped Docker Application Container Engine.

I came across, and from the comment section there I was led to check what the unattended upgrades had been doing this morning, and found this:

root@server:~# grep -A 1 -i docker /var/log/apt/history.log
Upgrade: (18.09.5-0ubuntu1~16.04.2, 18.09.7-0ubuntu1~16.04.4)
End-Date: 2019-07-09  06:34:54

On this particular linux server we don’t really wish unattended upgrades, as we frequently upgrade it ourselves, so we decided to disable unattended upgrades to avoid the above situation from happening again:

root@server:~# grep Unattended /etc/apt/apt.conf.d/20auto-upgrades              
APT::Periodic::Unattended-Upgrade "0";

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.