moby: dockerd and docker do not run well on NixOS
I ran this in a terminal on NixOS:
sudo dockerd
and then tried to run this in another terminal:
sudo docker ps
and I got
INFO[2019-08-09T17:31:25.236948800Z] libcontainerd: containerd is still running pid=19738
INFO[2019-08-09T17:31:25.237059962Z] parsed scheme: "unix" module=grpc
INFO[2019-08-09T17:31:25.237070312Z] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2019-08-09T17:31:25.237130872Z] ccResolverWrapper: sending new addresses to cc: [{unix:///var/run/docker/containerd/containerd.sock 0 <nil>}] module=grpc
INFO[2019-08-09T17:31:25.237158523Z] ClientConn switching balancer to "pick_first" module=grpc
INFO[2019-08-09T17:31:25.237232833Z] pickfirstBalancer: HandleSubConnStateChange: 0xc0007a74f0, CONNECTING module=grpc
ERRO[2019-08-09T17:31:35.237214701Z] failed connecting to containerd error="failed to dial \"/var/run/docker/containerd/containerd.sock\": context deadline exceeded" module=libcontainerd
INFO[2019-08-09T17:31:35.337438989Z] killing and restarting containerd module=libcontainerd pid=19738
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x555f4b862d20]
goroutine 54 [running]:
github.com/docker/docker/vendor/github.com/containerd/containerd.(*Client).Close(0x0, 0x0, 0x0)
/build/source/components/engine/.gopath/src/github.com/docker/docker/vendor/github.com/containerd/containerd/client.go:536 +0x30
github.com/docker/docker/libcontainerd/supervisor.(*remote).monitorDaemon(0xc0007ed040, 0x555f4c9313c0, 0xc000799e40)
/build/source/components/engine/.gopath/src/github.com/docker/docker/libcontainerd/supervisor/remote_daemon.go:321 +0x24f
created by github.com/docker/docker/libcontainerd/supervisor.Start
/build/source/components/engine/.gopath/src/github.com/docker/docker/libcontainerd/supervisor/remote_daemon.go:90 +0x3b5
not sure what that error is about. the docker -v output is:
Docker version 18.09.2, build 62479626f213818ba5b4565105a05277308587d5
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 16 (4 by maintainers)
ah, sorry; @angristan just posted the same 😂
The issue seems closable now?
Other nix-specific issues should be reported to https://github.com/NixOS/nixpkgs/issues
Here is my config: https://github.com/angristan/nixos-config/blob/2f897306751d59326f3e6e26b2a08d1f1919ca8c/configuration.nix#L338-L346
journalctl -xe
is usually not very useful (doesn’t give details why a unit failed); may want to usejournalctl -xu <service>
journalctl -xeu docker
? Something is not quite rightTry to start the daemon with
systemctl start docker
or add:@ORESoftware Why do you launch dockerd with
sudo dockerd
?You should install docker with
Which will install all that’s needed including a systemd service which supports socket activation.