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

Systemd activation of docker.sock is missing in 18.09.0 #38119

Closed
sudo-bmitch opened this issue Oct 31, 2018 · 5 comments
Closed

Systemd activation of docker.sock is missing in 18.09.0 #38119

sudo-bmitch opened this issue Oct 31, 2018 · 5 comments

Comments

@sudo-bmitch
Copy link

Description

The docker.sock activation via systemd appears to be missing from the Debian installer in 18.09.0-beta5.

Steps to reproduce the issue:

  1. Create /etc/systemd/system/docker.service.d/override.conf with:
# Disable flags to dockerd, all settings are done in /etc/docker/daemon.json
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd
  1. Create /etc/docker/daemon.json containing:
{
  "hosts": ["fd://"]
}
  1. Reload the systemd config
systemctl daemon-reload
  1. Restart docker
systemctl restart docker

Describe the results you received:

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

# journalctl -u docker
...
Oct 31 15:42:00 bmitch-asusr556l systemd[1]: docker.service: Service hold-off time over, scheduling restart.                                                                                   
Oct 31 15:42:00 bmitch-asusr556l systemd[1]: Stopped Docker Application Container Engine.                                                                                                       
Oct 31 15:42:00 bmitch-asusr556l systemd[1]: Starting Docker Application Container Engine...                                                                                                    Oct 31 15:42:00 bmitch-asusr556l dockerd[24904]: Failed to load listeners: no sockets found via socket activation: make sure the service was started by systemd                                 
Oct 31 15:42:00 bmitch-asusr556l systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE                                                                                 Oct 31 15:42:00 bmitch-asusr556l systemd[1]: Failed to start Docker Application Container Engine.                                                                                               
Oct 31 15:42:00 bmitch-asusr556l systemd[1]: docker.service: Unit entered failed state.                                                                                                         Oct 31 15:42:00 bmitch-asusr556l systemd[1]: docker.service: Failed with result 'exit-code'.                                                                                                    
Oct 31 15:42:02 bmitch-asusr556l systemd[1]: docker.service: Service hold-off time over, scheduling restart.                                                                                    
Oct 31 15:42:02 bmitch-asusr556l systemd[1]: Stopped Docker Application Container Engine.
Oct 31 15:42:02 bmitch-asusr556l systemd[1]: docker.service: Start request repeated too quickly.
Oct 31 15:42:02 bmitch-asusr556l systemd[1]: Failed to start Docker Application Container Engine.
Oct 31 15:42:02 bmitch-asusr556l systemd[1]: docker.service: Unit entered failed state.
Oct 31 15:42:02 bmitch-asusr556l systemd[1]: docker.service: Failed with result 'exit-code'.
  1. Note the missing socket unit file:
# ls -l /lib/systemd/system/docker*
-rw-r--r-- 1 root root 1599 Oct 23 18:25 /lib/systemd/system/docker.service
# ls -l /lib/systemd/system/containerd*
-rw-r--r-- 1 root root 486 Oct 16 16:56 /lib/systemd/system/containerd.service

Describe the results you expected:

Upgrading to 18.09 should preserve the systemd socket activation that is used with fd://. If this functionality is being removed, the change should be documented as a breaking change in the release notes.

Additional information you deem important (e.g. issue happens only occasionally):

Easily reproduced. My daemon.json file typically contains many more entries, including a listener on 2376 with TLS keys, hence the custom configuration.

Output of docker version:

$ docker version
Client:
 Version:           18.09.0-beta5
 API version:       1.39
 Go version:        go1.10.4
 Git commit:        e1910c5
 Built:             Tue Oct 23 22:25:34 2018
 OS/Arch:           linux/amd64
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          18.09.0-beta5
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.4
  Git commit:       e1910c5
  Built:            Tue Oct 23 21:50:22 2018
  OS/Arch:          linux/amd64
  Experimental:     false

Output of docker info:

$ docker info
Containers: 41
 Running: 7
 Paused: 0
 Stopped: 34
Images: 290
Server Version: 18.09.0-beta5
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: active
 NodeID: q44zx0s2lvu1fdduk800e5ini
 Is Manager: true
 ClusterID: b4qh6x548wfo2sv9pubs33hk7
 Managers: 1
 Nodes: 1
 Default Address Pool: 10.0.0.0/8
 SubnetSize: 24
 Orchestration:
  Task History Retention Limit: 5
 Raft:
  Snapshot Interval: 10000
  Number of Old Snapshots to Retain: 0
  Heartbeat Tick: 1
  Election Tick: 3
 Dispatcher:
  Heartbeat Period: 5 seconds
 CA Configuration:
  Expiry Duration: 3 months
  Force Rotate: 4
 Autolock Managers: false
 Root Rotation In Progress: false
 Node Address: 192.168.233.100
 Manager Addresses:
  192.168.233.100:2377
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: d6de12e2f362cb9dc49ad957911996d3de59b338 (expected: 468a545b9edcd5932818eb9de8e72413e616e86e)
runc version: 4fc53a81fb7c994640722ac585fa9ca548971871 (expected: 69663f0bd4b60df09991c08812a60108003fa340)
init version: fec3683
Security Options:
 seccomp
  Profile: default
Kernel Version: 4.9.0-8-amd64
Operating System: Debian GNU/Linux 9 (stretch)
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 5.739GiB
Name: bmitch-asusr556l
ID: 5OZQ:RKOD:MLMQ:3YC4:QOWX:SLWX:SYO2:XDJF:CG6C:43ER:4QQ4:DXOO
Docker Root Dir: /home/var-docker
Debug Mode (client): false
Debug Mode (server): false
Username: bmitch3020
Registry: https://index.docker.io/v1/
Labels:
 foo=bar
 env=laptop
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine

Additional environment details (AWS, VirtualBox, physical, etc.):

Install on physical machine.

@thaJeztah
Copy link
Member

ping @seemethere @crosbymichael I think this came up in an earlier discussion, but I don't recall if this was just temporarily removed, or if this was intended to be added back.

If not, we should document this in the changelog

/cc @ahh-docker

@VuokkoVuorinnen
Copy link

Just installed 18.09 and had this same issue... No docker.socket systemd file to be found anymore, docker refusing to start up. Manually adding the docker.socket systemd file from the previous version 18.06.1 fixed this...

@akanass
Copy link

akanass commented Nov 8, 2018

Same problem for me:


$ docker version

Client:
Version: 18.09.0
API version: 1.39
Go version: go1.10.4
Git commit: 4d60db4
Built: Wed Nov 7 00:49:01 2018
OS/Arch: linux/amd64
Experimental: false
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?


$ systemctl status docker.service

● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/docker.service.d
└─override.conf
Active: failed (Result: exit-code) since Thu 2018-11-08 21:13:33 CET; 22min ago
Docs: https://docs.docker.com
Process: 2801 ExecStart=/usr/bin/dockerd -H fd:// --live-restore (code=exited, status=1/FAILURE)
Main PID: 2801 (code=exited, status=1/FAILURE)



$ journalctl -x

-- Unit docker.service has begun starting up.
Nov 08 21:40:31 ns538586.ip-158-69-247.net dockerd[4534]: Failed to load listeners: no sockets found via socket activation: make sure the service was started by systemd
Nov 08 21:40:31 ns538586.ip-158-69-247.net systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Nov 08 21:40:31 ns538586.ip-158-69-247.net systemd[1]: docker.service: Failed with result 'exit-code'.
Nov 08 21:40:31 ns538586.ip-158-69-247.net systemd[1]: Failed to start Docker Application Container Engine.
-- Subject: Unit docker.service has failed
-- Defined-By: systemd

@thaJeztah
Copy link
Member

This is being worked on in docker/docker-ce-packaging#257

@thaJeztah thaJeztah changed the title Systemd activation of docker.sock is missing in 18.09.0-beta5 Systemd activation of docker.sock is missing in 18.09.0 Nov 10, 2018
@thaJeztah
Copy link
Member

This should be fixed, and backported to 18.09; docker/docker-ce-packaging#258

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

No branches or pull requests

4 participants