All docker commands do not respond, even docker logs, docker info or docker version
#: sudo systemctl stop docker doesn't respond as well
#: sudo systemctl status docker respond with:
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: activating (start) since Thu 2020-12-17 19:12:16 MSK; 27min ago
TriggeredBy: ● docker.socket
Docs: https://docs.docker.com
Main PID: 7613 (dockerd)
Tasks: 22
Memory: 44.3M
CGroup: /system.slice/docker.service
└─7613 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock <nil> 0 <nil>}] <nil> <nil>}" module=grpc
level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
level=info msg="[graphdriver] using prior storage driver: overlay2"
level=warning msg="Your kernel does not support CPU realtime scheduler"
level=warning msg="Your kernel does not support cgroup blkio weight"
level=warning msg="Your kernel does not support cgroup blkio weight_device"
level=info msg="Loading containers: start."
level=info msg="Container b25db26d185ef0b90061996d61cd169b820b0731d6b68a8c8c356b87293c810a failed to exit within 10 seconds of signal 15 - using the force"
level=info msg="Container ff7095aa0124b7a4afdc2036f89c4bf51e2ccd56c3430f74690aaf21e40fcbe3 failed to exit within 10 seconds of signal 15 - using the force"
I've run several containers through docker-compose before it happened. A couple of Postgres images and a couple of golang services were built statically and packed in Alpine image.
kill -9 7613 kills dockerd but it starts anyway.
Any assumptions?
Related
I am trying to use docker compose with inellij but it does not connect. Here is the out of
sudo systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2022-05-30 22:57:39 +04; 17min ago
TriggeredBy: ● docker.socket
Docs: https://docs.docker.com
Main PID: 3820 (dockerd)
Tasks: 27 (limit: 9308)
Memory: 53.9M
CPU: 3.267s
CGroup: /system.slice/docker.service
├─ 3820 /usr/bin/dockerd -H fd://
└─ 3832 containerd --config /var/run/docker/containerd/containerd.toml --log-level info
May 30 22:57:39 albert-80nv dockerd[3820]: time="2022-05-30T22:57:39.578835983+04:00" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///v>
May 30 22:57:39 albert-80nv dockerd[3820]: time="2022-05-30T22:57:39.578850600+04:00" level=info msg="ClientConn switching balancer to \"pick_first\"" modu>
May 30 22:57:39 albert-80nv dockerd[3820]: time="2022-05-30T22:57:39.580713487+04:00" level=info msg="[graphdriver] using prior storage driver: btrfs"
May 30 22:57:39 albert-80nv dockerd[3820]: time="2022-05-30T22:57:39.584726242+04:00" level=info msg="Loading containers: start."
May 30 22:57:39 albert-80nv dockerd[3820]: time="2022-05-30T22:57:39.678110934+04:00" level=info msg="Default bridge (docker0) is assigned with an IP addre>
May 30 22:57:39 albert-80nv dockerd[3820]: time="2022-05-30T22:57:39.716490285+04:00" level=info msg="Loading containers: done."
May 30 22:57:39 albert-80nv dockerd[3820]: time="2022-05-30T22:57:39.725192175+04:00" level=info msg="Docker daemon" commit=f756502055 graphdriver(s)=btrfs>
May 30 22:57:39 albert-80nv dockerd[3820]: time="2022-05-30T22:57:39.725256842+04:00" level=info msg="Daemon has completed initialization"
May 30 22:57:39 albert-80nv systemd[1]: Started Docker Application Container Engine.
May 30 22:57:39 albert-80nv dockerd[3820]: time="2022-05-30T22:57:39.748038554+04:00" level=info msg="API listen on /run/docker.sock"
id
id=1000(albert) gid=1000(albert) groups=1000(albert),3(sys),90(network),98(power),961(docker),991(lp),998(wheel)
and
ps aux | grep docker
root 3820 0.0 0.5 1742604 46792 ? Ssl 22:57 0:00 /usr/bin/dockerd -H fd://
root 3832 0.2 0.3 1639784 30568 ? Ssl 22:57 0:03 containerd --config /var/run/docker/containerd/containerd.toml --log-level info
albert 5144 0.0 0.0 7012 2560 pts/1 S+ 23:21 0:00 grep --colour=auto docker
As you can see docker daemon is not among the running processes, but the docker. service is active and I am pretty sure all permissions have been set correctly. So what can I do here?
I run
systemctl status docker
and get
docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2021-05-22 01:13:39 EDT; 2min 58s ago
TriggeredBy: ● docker.socket
Docs: https://docs.docker.com
Main PID: 29937 (dockerd)
Tasks: 16
Memory: 44.2M
CGroup: /system.slice/docker.service
└─29937 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
May 22 01:13:38 mbfgdell dockerd[29937]: time="2021-05-22T01:13:38.546418221-04:00" level=warning msg="Your kernel>
May 22 01:13:38 mbfgdell dockerd[29937]: time="2021-05-22T01:13:38.546439612-04:00" level=warning msg="Your kernel>
May 22 01:13:38 mbfgdell dockerd[29937]: time="2021-05-22T01:13:38.546456513-04:00" level=warning msg="Your kernel>
May 22 01:13:38 mbfgdell dockerd[29937]: time="2021-05-22T01:13:38.546810704-04:00" level=info msg="Loading contai>
May 22 01:13:38 mbfgdell dockerd[29937]: time="2021-05-22T01:13:38.865868481-04:00" level=info msg="Default bridge>
May 22 01:13:39 mbfgdell dockerd[29937]: time="2021-05-22T01:13:39.027302568-04:00" level=info msg="Loading contai>
May 22 01:13:39 mbfgdell dockerd[29937]: time="2021-05-22T01:13:39.173496789-04:00" level=info msg="Docker daemon">
May 22 01:13:39 mbfgdell dockerd[29937]: time="2021-05-22T01:13:39.173625360-04:00" level=info msg="Daemon has com>
May 22 01:13:39 mbfgdell systemd[1]: Started Docker Application Container Engine.
May 22 01:13:39 mbfgdell dockerd[29937]: time="2021-05-22T01:13:39.258181088-04:00" level=info msg="API listen on >
but when i do
docker info
I get
Client:
Context: default
Debug Mode: false
Plugins:
app: Docker App (Docker Inc., v0.9.1-beta3)
buildx: Build with BuildKit (Docker Inc., v0.5.1-docker)
scan: Docker Scan (Docker Inc., v0.7.0)
Server:
ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
errors pretty printing info
Does anyone know what's wrong here?
(i do see a docker.pid in /var/run, however i do NOT see a docker.sock in /var/run)
After further discovery, the socket file is here
/run/docker.sock
not /var/run/docker.sock
the systemd unit file for docker.socket looks like
cat docker.socket
[Unit]
Description=Docker Socket for the API
[Socket]
ListenStream=/var/run/docker.sock
SocketMode=0660
SocketUser=root
SocketGroup=docker
[Install]
WantedBy=sockets.target
not sure if the daemon or the client is wrong, and how to fix it???
UPDATE: hmm it seems if i create a symlink from /var/run/docker.sock to /run/docker.sock it works. Not great, but i guess i'll live with it
I am new to docker and haven't found a question here to answer the problem I'm experiencing.
I am tryin to use Pycharm to run a dockerfile, in order to debug certain program inside the docker.
I opened the dockerfile in pycharm, and I created a configuration for running the dockerfile.
Running the program results in an error message under the 'services' tab:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
After I Googled the problem, I found this thread: Cannot connect to the Docker daemon at unix:/var/run/docker.sock. Is the docker daemon running?
Which said I should be running sudo dockerd. After some bugs I uninstalled docker completely, and installed it again.
After installation I ran:
systemctl status docker
And the output is:
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2020-09-26 15:06:22 IDT; 59s ago
Docs: https://docs.docker.com
Main PID: 24888 (dockerd)
Tasks: 21
CGroup: /system.slice/docker.service
└─24888 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
So I stopped it using sudo service docker stop
I ran systemctl status docker again and it was indeed stopped:
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Sat 2020-09-26 15:09:29 IDT; 16s ago
Docs: https://docs.docker.com
Process: 24888 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=0/SUCCES
Main PID: 24888 (code=exited, status=0/SUCCESS)
Sep 26 15:06:21 DL-2 dockerd[24888]: time="2020-09-26T15:06:21.919021419+03:00" level=info msg="Loading containers: done."
Sep 26 15:06:22 DL-2 dockerd[24888]: time="2020-09-26T15:06:22.265996712+03:00" level=info msg="Docker daemon" commit=4484c46d9
Sep 26 15:06:22 DL-2 dockerd[24888]: time="2020-09-26T15:06:22.266253446+03:00" level=info msg="Daemon has completed initializa
Sep 26 15:06:22 DL-2 dockerd[24888]: time="2020-09-26T15:06:22.642407513+03:00" level=info msg="API listen on /var/run/docker.s
Sep 26 15:06:22 DL-2 systemd[1]: Started Docker Application Container Engine.
Sep 26 15:09:29 DL-2 systemd[1]: Stopping Docker Application Container Engine...
Sep 26 15:09:29 DL-2 dockerd[24888]: time="2020-09-26T15:09:29.427473508+03:00" level=info msg="Processing signal 'terminated'"
Sep 26 15:09:29 DL-2 dockerd[24888]: time="2020-09-26T15:09:29.428067483+03:00" level=info msg="stopping event stream following
Sep 26 15:09:29 DL-2 dockerd[24888]: time="2020-09-26T15:09:29.428325869+03:00" level=info msg="Daemon shutdown complete"
Sep 26 15:09:29 DL-2 systemd[1]: Stopped Docker Application Container Engine.
So I ran sudo dockerd and it seemed to run fine:
INFO[2020-09-26T15:11:03.918879915+03:00] Starting up
INFO[2020-09-26T15:11:03.919388821+03:00] detected 127.0.0.53 nameserver, assuming systemd-resolved, so using resolv.conf: /run/systemd/resolve/resolv.conf
INFO[2020-09-26T15:11:03.919768789+03:00] parsed scheme: "unix" module=grpc
INFO[2020-09-26T15:11:03.919779317+03:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2020-09-26T15:11:03.919792653+03:00] ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock 0 <nil>}] <nil>} module=grpc
INFO[2020-09-26T15:11:03.919798154+03:00] ClientConn switching balancer to "pick_first" module=grpc
INFO[2020-09-26T15:11:03.920399082+03:00] parsed scheme: "unix" module=grpc
INFO[2020-09-26T15:11:03.920409757+03:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2020-09-26T15:11:03.920418642+03:00] ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock 0 <nil>}] <nil>} module=grpc
INFO[2020-09-26T15:11:03.920423441+03:00] ClientConn switching balancer to "pick_first" module=grpc
INFO[2020-09-26T15:11:04.050458554+03:00] [graphdriver] using prior storage driver: overlay2
WARN[2020-09-26T15:11:04.212728085+03:00] Your kernel does not support swap memory limit
WARN[2020-09-26T15:11:04.212780116+03:00] Your kernel does not support cgroup rt period
WARN[2020-09-26T15:11:04.212798165+03:00] Your kernel does not support cgroup rt runtime
WARN[2020-09-26T15:11:04.212812782+03:00] Your kernel does not support cgroup blkio weight
WARN[2020-09-26T15:11:04.212830211+03:00] Your kernel does not support cgroup blkio weight_device
INFO[2020-09-26T15:11:04.213206856+03:00] Loading containers: start.
INFO[2020-09-26T15:11:04.547434099+03:00] Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address
INFO[2020-09-26T15:11:04.985878757+03:00] Loading containers: done.
INFO[2020-09-26T15:11:05.259805773+03:00] Docker daemon commit=4484c46d9d graphdriver(s)=overlay2 version=19.03.13
INFO[2020-09-26T15:11:05.259975115+03:00] Daemon has completed initialization
INFO[2020-09-26T15:11:05.418371093+03:00] API listen on /var/run/docker.sock
But running the dockerfile again resulted in the same error. Im quite at a loss as to why this happens, so I would appreciate any feedback.
Should more information be needed, let me know and I'll be happy to provide.
Thanks in advance :)
Can you run docker command such as docker images without sudo? If not, you should run sudo usermod -aG docker $USER and then you can use docker command as non-root user (https://docs.docker.com/engine/install/linux-postinstall/). I'm not sure if it will solve your problem.
For Pop!_OS users:
If you installed PyCharm / PhpStorm / IntelliJ via PoP!_Shop as flatpack image:
flatpak override --user --filesystem=/run/docker.sock com.jetbrains.PyCharm-Community
Change the trailing jetbrains product name (here:PyCharm-Community) according to the used version / flavour.
Just restart the computer/laptop if other suggestions did not help. It helped me :)
I can't restart docker service. After command system just getting stuck.
docker service status is here:
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: deactivating (stop-sigterm)
Docs: https://docs.docker.com
Main PID: 1216 (dockerd)
Tasks: 9
CGroup: /system.slice/docker.service
└─1216 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
Aug 25 15:08:21 hq-rproxy02 dockerd[1216]: time="2020-08-25T15:08:21.179342033-07:00" level=info msg="ClientConn switching balancer to \"pick_first\"" module=
Aug 25 15:08:21 hq-rproxy02 dockerd[1216]: time="2020-08-25T15:08:21.631714600-07:00" level=info msg="[graphdriver] using prior storage driver: overlay2"
Aug 25 15:08:23 hq-rproxy02 dockerd[1216]: time="2020-08-25T15:08:23.607526073-07:00" level=warning msg="Your kernel does not support swap memory limit"
Aug 25 15:08:23 hq-rproxy02 dockerd[1216]: time="2020-08-25T15:08:23.608984581-07:00" level=warning msg="Your kernel does not support cgroup rt period"
Aug 25 15:08:23 hq-rproxy02 dockerd[1216]: time="2020-08-25T15:08:23.609119466-07:00" level=warning msg="Your kernel does not support cgroup rt runtime"
Aug 25 15:08:23 hq-rproxy02 dockerd[1216]: time="2020-08-25T15:08:23.609435097-07:00" level=info msg="Loading containers: start."
Aug 25 15:08:32 hq-rproxy02 dockerd[1216]: time="2020-08-25T15:08:32.266035465-07:00" level=info msg="Removing stale sandbox f2295d6e0a7aec8569c42470bbccbc5a1
Aug 25 15:08:32 hq-rproxy02 dockerd[1216]: time="2020-08-25T15:08:32.677509372-07:00" level=warning msg="Error (Unable to complete atomic operation, key modif
Aug 25 15:08:33 hq-rproxy02 dockerd[1216]: time="2020-08-25T15:08:33.339048947-07:00" level=info msg="Default bridge (docker0) is assigned with an IP address
Aug 27 05:12:40 hq-rproxy02 dockerd[1216]: time="2020-08-27T05:12:40.330007214-07:00" level=info msg="Processing signal 'terminated'"
● docker.socket - Docker Socket for the API
Loaded: loaded (/lib/systemd/system/docker.socket; enabled; vendor preset: enabled)
Active: active (running) since Tue 2020-08-25 15:07:44 PDT; 5 days ago
Listen: /var/run/docker.sock (Stream)
Tasks: 0 (limit: 1113)
CGroup: /system.slice/docker.socket
Aug 25 15:07:44 hq-rproxy02 systemd[1]: Starting Docker Socket for the API.
Aug 25 15:07:44 hq-rproxy02 systemd[1]: Listening on Docker Socket for the API.
What can I check?
I'm trying to pull an image off GCR using docker, using:
docker pull eu.gcr.io/<project>/<image>:<tag>
However I keep getting the error:
failed to register layer: ApplyLayer exit status 1 stdout: stderr: Error cleaning up after pivot: remove /.pivot_root347438920: device or resource busy
After receiving the error all calls to docker returns:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
The output of systemctl status docker is:
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2020-08-18 10:38:26 CEST; 14min ago
TriggeredBy: ● docker.socket
Docs: https://docs.docker.com
Main PID: 985 (dockerd)
Tasks: 42
Memory: 175.0M
CGroup: /system.slice/docker.service
└─985 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
Aug 18 10:38:25 <my_name> dockerd[985]: time="2020-08-18T10:38:25.329780734+02:00" level=info msg="Loading containers: start."
Aug 18 10:38:26 <my_name> dockerd[985]: time="2020-08-18T10:38:26.093178325+02:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address"
Aug 18 10:38:26 <my_name> dockerd[985]: time="2020-08-18T10:38:26.219186657+02:00" level=info msg="Loading containers: done."
Aug 18 10:38:26 <my_name> dockerd[985]: time="2020-08-18T10:38:26.333584778+02:00" level=info msg="Docker daemon" commit=48a66213fe graphdriver(s)=devicemapper version=19.03.12-ce
Aug 18 10:38:26 <my_name> dockerd[985]: time="2020-08-18T10:38:26.334733161+02:00" level=info msg="Daemon has completed initialization" Aug 18 10:38:26 emil-pc dockerd[985]: time="2020-08-18T10:38:26.389239911+02:00" level=info msg="API listen on /run/docker.sock"
Aug 18 10:38:26 <my_name> systemd[1]: Started Docker Application Container Engine.
Aug 18 10:46:05 <my_name> dockerd[985]: time="2020-08-18T10:46:05.342092783+02:00" level=info msg="Attempting next endpoint for pull after error: failed to register layer: ApplyLayer exit status 1 stdout: stderr: Error cleaning up after pivot: remove /.pivot_root557795275: device or resource busy"
I've tried restarting docker but to no avail. Any help is much appriciated.