I installed Kubuntu 18 about 3 weeks ago on partition in 28G(sdb5), but after installing of docker seems this space is not enough for my root partition I found that /var/lib/docker/ takes 11.1 GiB.
I found a decision of using sdb7 partition for docker which is not used now. So after I formatted /sdb7 into ext4 and used /sdb7 in /etc/fstab and restarted OS I run:
cd /var/lib
sudo rsync -av docker /mnt/_work_sdb7
sudo mv docker docker.old
sudo ln -s /mnt/_work_sdb7/docker
and next :
$ docker-compose up -d --build
ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?
If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
I found a way of fixing such error:
sudo usermod -aG docker $USER
sudo newgrp - docker
But it did not help. Next :
Some configation/permittions missing?
# docker-compose --version
docker-compose version 1.17.1, build unknown
# docker --version
Docker version 19.03.2, build 6a30dfc
MODIFIED :
I run command and see messages in console :
$ sudo dockerd --data-root=/mnt/_work_sdb7
INFO[2019-09-14T14:56:26.394402307+03:00] Starting up
INFO[2019-09-14T14:56:26.395196810+03:00] detected 127.0.0.53 nameserver, assuming systemd-resolved, so using resolv.conf: /run/systemd/resolve/resolv.conf
INFO[2019-09-14T14:56:26.444127000+03:00] parsed scheme: "unix" module=grpc
INFO[2019-09-14T14:56:26.444152461+03:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2019-09-14T14:56:26.444179994+03:00] ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock 0 <nil>}] } module=grpc
INFO[2019-09-14T14:56:26.444193376+03:00] ClientConn switching balancer to "pick_first" module=grpc
INFO[2019-09-14T14:56:26.444651765+03:00] pickfirstBalancer: HandleSubConnStateChange: 0xc000143020, CONNECTING module=grpc
INFO[2019-09-14T14:56:26.444710232+03:00] blockingPicker: the picked transport is not ready, loop back to repick module=grpc
INFO[2019-09-14T14:56:26.463935589+03:00] pickfirstBalancer: HandleSubConnStateChange: 0xc000143020, READY module=grpc
INFO[2019-09-14T14:56:26.503211493+03:00] parsed scheme: "unix" module=grpc
INFO[2019-09-14T14:56:26.503236499+03:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2019-09-14T14:56:26.503253831+03:00] ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock 0 <nil>}] } module=grpc
INFO[2019-09-14T14:56:26.503264403+03:00] ClientConn switching balancer to "pick_first" module=grpc
INFO[2019-09-14T14:56:26.503334016+03:00] pickfirstBalancer: HandleSubConnStateChange: 0xc000143420, CONNECTING module=grpc
INFO[2019-09-14T14:56:26.503354596+03:00] blockingPicker: the picked transport is not ready, loop back to repick module=grpc
INFO[2019-09-14T14:56:26.503629147+03:00] pickfirstBalancer: HandleSubConnStateChange: 0xc000143420, READY module=grpc
WARN[2019-09-14T14:56:26.584401464+03:00] Your kernel does not support swap memory limit
WARN[2019-09-14T14:56:26.584423249+03:00] Your kernel does not support cgroup rt period
WARN[2019-09-14T14:56:26.584431948+03:00] Your kernel does not support cgroup rt runtime
INFO[2019-09-14T14:56:26.584832727+03:00] Loading containers: start.
INFO[2019-09-14T14:56:26.861388365+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[2019-09-14T14:56:27.120567034+03:00] Loading containers: done.
INFO[2019-09-14T14:56:27.294102345+03:00] Docker daemon commit=6a30dfc graphdriver(s)=overlay2 version=19.03.2
INFO[2019-09-14T14:56:27.294224407+03:00] Daemon has completed initialization
INFO[2019-09-14T14:56:27.366695106+03:00] API listen on /var/run/docker.sock
The command above did not finish and was working:
I opened console in other tab and run :
$ sudo usermod -aG docker $USER
$ sudo newgrp - docker
# cd /mnt/_work_sdb8/wwwroot/lar/DockerApps/votes_docker
# sudo systemctl enable docker
Synchronizing state of docker.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable docker
# sudo systemctl start docker
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
# systemctl status docker.service
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2019-09-14 15:00:34 EEST; 8s ago
Docs: https://docs.docker.com
Process: 14694 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
Main PID: 14694 (code=exited, status=1/FAILURE)
Sep 14 15:00:34 serge-at-hoe systemd[1]: docker.service: Service hold-off time over, scheduling restart.
Sep 14 15:00:34 serge-at-hoe systemd[1]: docker.service: Scheduled restart job, restart counter is at 3.
Sep 14 15:00:34 serge-at-hoe systemd[1]: Stopped Docker Application Container Engine.
Sep 14 15:00:34 serge-at-hoe systemd[1]: docker.service: Start request repeated too quickly.
Sep 14 15:00:34 serge-at-hoe systemd[1]: docker.service: Failed with result 'exit-code'.
Sep 14 15:00:34 serge-at-hoe systemd[1]: Failed to start Docker Application Container Engine.
# journalctl -xe
-- Automatic restarting of the unit docker.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
Sep 14 15:00:34 serge-at-hoe systemd[1]: Stopped Docker Application Container Engine.
-- Subject: Unit docker.service has finished shutting down
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit docker.service has finished shutting down.
Sep 14 15:00:34 serge-at-hoe systemd[1]: Closed Docker Socket for the API.
-- Subject: Unit docker.socket has finished shutting down
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit docker.socket has finished shutting down.
Sep 14 15:00:34 serge-at-hoe systemd[1]: Stopping Docker Socket for the API.
-- Subject: Unit docker.socket has begun shutting down
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit docker.socket has begun shutting down.
Sep 14 15:00:34 serge-at-hoe systemd[1]: Starting Docker Socket for the API.
-- Subject: Unit docker.socket has begun start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit docker.socket has begun starting up.
Sep 14 15:00:34 serge-at-hoe systemd[1]: Listening on Docker Socket for the API.
-- Subject: Unit docker.socket has finished start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit docker.socket has finished starting up.
--
-- The start-up result is RESULT.
Sep 14 15:00:34 serge-at-hoe systemd[1]: docker.service: Start request repeated too quickly.
Sep 14 15:00:34 serge-at-hoe systemd[1]: docker.service: Failed with result 'exit-code'.
Sep 14 15:00:34 serge-at-hoe systemd[1]: Failed to start Docker Application Container Engine.
-- Subject: Unit docker.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit docker.service has failed.
--
-- The result is RESULT.
Sep 14 15:00:34 serge-at-hoe systemd[1]: docker.socket: Failed with result 'service-start-limit-hit'.
Sep 14 15:00:42 serge-at-hoe systemd[1]: Started Run anacron jobs.
-- Subject: Unit anacron.service has finished start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit anacron.service has finished starting up.
--
-- The start-up result is RESULT.
Sep 14 15:00:42 serge-at-hoe anacron[14760]: Anacron 2.3 started on 2019-09-14
Sep 14 15:00:42 serge-at-hoe anacron[14760]: Normal exit (0 jobs run)
What is wrong ?
MODIFIED 2 : I did not find existing file, so I created new file /etc/docker/daemon.json with content :
{
"data-root": "/mnt/_work_sdb7/docker" ,
"storage-driver": "overlay2"
}
/etc/docker# ls -la
total 24
drwxr-xr-x 2 root root 4096 вер 14 16:52 .
drwxr-xr-x 150 root root 12288 вер 14 16:05 ..
-rwxrwxrwx 1 root root 81 вер 14 16:52 daemon.json
-rw------- 1 root root 244 вер 6 18:12 key.json
In my /etc/fstab :
/dev/sdb7 /mnt/_work_sdb7 ext4 defaults 0 0
and restarted the OS. After that in my docker project I run :
$ sudo systemctl enable docker
[sudo] password for serge:
Synchronizing state of docker.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable docker
serge@serge-at-hoe:/mnt/_work_sdb8/wwwroot/lar/DockerApps/votes_docker$ sudo systemctl start docker
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
serge@serge-at-hoe:/mnt/_work_sdb8/wwwroot/lar/DockerApps/votes_docker$ systemctl status docker.service
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2019-09-14 16:54:09 EEST; 2s ago
Docs: https://docs.docker.com
Process: 5199 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
Main PID: 5199 (code=exited, status=1/FAILURE)
вер 14 16:54:09 serge-at-hoe systemd[1]: docker.service: Service hold-off time over, scheduling restart.
вер 14 16:54:09 serge-at-hoe systemd[1]: docker.service: Scheduled restart job, restart counter is at 3.
вер 14 16:54:09 serge-at-hoe systemd[1]: Stopped Docker Application Container Engine.
вер 14 16:54:09 serge-at-hoe systemd[1]: docker.service: Start request repeated too quickly.
вер 14 16:54:09 serge-at-hoe systemd[1]: docker.service: Failed with result 'exit-code'.
вер 14 16:54:09 serge-at-hoe systemd[1]: Failed to start Docker Application Container Engine.
serge@serge-at-hoe:/mnt/_work_sdb8/wwwroot/lar/DockerApps/votes_docker$ journalctl -xe
--
-- Automatic restarting of the unit docker.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
вер 14 16:54:09 serge-at-hoe systemd[1]: Stopped Docker Application Container Engine.
-- Subject: Unit docker.service has finished shutting down
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit docker.service has finished shutting down.
вер 14 16:54:09 serge-at-hoe systemd[1]: Closed Docker Socket for the API.
-- Subject: Unit docker.socket has finished shutting down
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit docker.socket has finished shutting down.
вер 14 16:54:09 serge-at-hoe systemd[1]: Stopping Docker Socket for the API.
-- Subject: Unit docker.socket has begun shutting down
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit docker.socket has begun shutting down.
вер 14 16:54:09 serge-at-hoe systemd[1]: Starting Docker Socket for the API.
-- Subject: Unit docker.socket has begun start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit docker.socket has begun starting up.
вер 14 16:54:09 serge-at-hoe systemd[1]: Listening on Docker Socket for the API.
-- Subject: Unit docker.socket has finished start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit docker.socket has finished starting up.
--
-- The start-up result is RESULT.
вер 14 16:54:09 serge-at-hoe systemd[1]: docker.service: Start request repeated too quickly.
вер 14 16:54:09 serge-at-hoe systemd[1]: docker.service: Failed with result 'exit-code'.
вер 14 16:54:09 serge-at-hoe systemd[1]: Failed to start Docker Application Container Engine.
-- Subject: Unit docker.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit docker.service has failed.
--
-- The result is RESULT.
вер 14 16:54:09 serge-at-hoe systemd[1]: docker.socket: Failed with result 'service-start-limit-hit'.
вер 14 16:54:10 serge-at-hoe kernel: [UFW BLOCK] IN=enp4s0 OUT= MAC=01:00:5e:00:00:01:c8:e7:f0:6e:fc:29:08:00 SRC=100.103.0.1 DST=224.0.0.1 LEN=32 TOS=0x00 PREC=0xC0 TTL=1 ID=40300 PROTO=2
вер 14 16:54:10 serge-at-hoe kernel: [UFW BLOCK] IN=enp4s0 OUT= MAC=44:8a:5b:ee:2a:dd:c8:e7:f0:6e:fc:29:08:00 SRC=213.109.129.134 DST=213.109.234.130 LEN=44 TOS=0x00 PREC=0x00 TTL=250 ID=15541 DF PROTO=TCP SPT=35673 DPT=23 WINDOW=14600 R
вер 14 16:54:11 serge-at-hoe kernel: [UFW BLOCK] IN=enp4s0 OUT= MAC=44:8a:5b:ee:2a:dd:c8:e7:f0:6e:fc:29:08:00 SRC=36.63.165.72 DST=213.109.234.130 LEN=52 TOS=0x00 PREC=0x00 TTL=115 ID=901 DF PROTO=TCP SPT=44000 DPT=1433 WINDOW=8192 RES=0
вер 14 16:54:12 serge-at-hoe kernel: [UFW BLOCK] IN=enp4s0 OUT= MAC=01:00:5e:00:00:01:c8:e7:f0:6e:fc:29:08:00 SRC=100.103.0.1 DST=224.0.0.1 LEN=32 TOS=0x00 PREC=0xC0 TTL=1 ID=48963 PROTO=2
вер 14 16:54:23 serge-at-hoe kernel: [UFW BLOCK] IN=enp4s0 OUT= MAC=44:8a:5b:ee:2a:dd:c8:e7:f0:6e:fc:29:08:00 SRC=159.224.38.32 DST=213.109.234.130 LEN=60 TOS=0x00 PREC=0x00 TTL=56 ID=26239 DF PROTO=TCP SPT=34959 DPT=6881 WINDOW=7300 RES
вер 14 16:54:23 serge-at-hoe kernel: [UFW BLOCK] IN=enp4s0 OUT= MAC=44:8a:5b:ee:2a:dd:c8:e7:f0:6e:fc:29:08:00 SRC=185.222.211.54 DST=213.109.234.130 LEN=40 TOS=0x00 PREC=0x00 TTL=251 ID=1768 PROTO=TCP SPT=41109 DPT=8321 WINDOW=1024 RES=0
вер 14 16:54:23 serge-at-hoe kernel: [UFW BLOCK] IN=enp4s0 OUT= MAC=44:8a:5b:ee:2a:dd:c8:e7:f0:6e:fc:29:08:00 SRC=87.122.153.155 DST=213.109.234.130 LEN=60 TOS=0x00 PREC=0x00 TTL=57 ID=2867 DF PROTO=TCP SPT=47437 DPT=6881 WINDOW=7300 RES
вер 14 16:54:24 serge-at-hoe kernel: [UFW BLOCK] IN=enp4s0 OUT= MAC=44:8a:5b:ee:2a:dd:c8:e7:f0:6e:fc:29:08:00 SRC=159.224.38.32 DST=213.109.234.130 LEN=60 TOS=0x00 PREC=0x00 TTL=56 ID=26240 DF PROTO=TCP SPT=34959 DPT=6881 WINDOW=7300 RES
вер 14 16:54:24 serge-at-hoe kernel: [UFW BLOCK] IN=enp4s0 OUT= MAC=44:8a:5b:ee:2a:dd:c8:e7:f0:6e:fc:29:08:00 SRC=87.122.153.155 DST=213.109.234.130 LEN=60 TOS=0x00 PREC=0x00 TTL=57 ID=2868 DF PROTO=TCP SPT=47437 DPT=6881 WINDOW=7300 RES
lines 2823-2877/2877 (END)
I see errors :
вер 14 16:54:09 serge-at-hoe systemd[1]: docker.service: Start request repeated too quickly.
вер 14 16:54:09 serge-at-hoe systemd[1]: docker.service: Failed with result 'exit-code'.
вер 14 16:54:09 serge-at-hoe systemd[1]: Failed to start Docker Application Container Engine.
?
MODIFIED 3 : I found /etc/systemd/system.conf in which all parameters were commented I uncommented or added parameters with some values, incrementing them and restarting OS. I made so several times and at least I have :
DefaultStartLimitIntervalSec=350s
DefaultStartLimitBurst=260
StartLimitInterval=350s
StartLimitBurst=260
StartLimitIntervalSec=260
while all the rest parameters commented, But any way I see errors :
вер 14 18:05:44 serge-at-hoe systemd[1]: docker.service: Start request repeated too quickly.
вер 14 18:05:44 serge-at-hoe systemd[1]: docker.service: Failed with result 'exit-code'.
вер 14 18:05:44 serge-at-hoe systemd[1]: Failed to start Docker Application Container Engine.
Which values must have these(or some others) values ?
MODIFIED # 4 : I tried in /etc/systemd/system.conf to change some values to zero, as I googled such possible decision:
DefaultStartLimitIntervalSec=0
DefaultStartLimitBurst=260
StartLimitInterval=350
StartLimitBurst=260
StartLimitIntervalSec=0
But restarting OS I failed to login into the system and has a lot of flash messages on the screen. I modified the file with all 0 :
DefaultStartLimitIntervalSec=0
DefaultStartLimitBurst=0
StartLimitInterval=0
StartLimitBurst=0
StartLimitIntervalSec=0
I reloaded ok but running docker I still have "Start request repeated too quickly" errors:
$ sudo usermod -aG docker $USER
#:/mnt/_work_sdb8/wwwroot/lar/DockerApps/votes_docker$ sudo newgrp - docker
#:/root# cd /mnt/_work_sdb8/wwwroot/lar/DockerApps/votes_docker
#:/mnt/_work_sdb8/wwwroot/lar/DockerApps/votes_docker# sudo systemctl start docker
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
#:/mnt/_work_sdb8/wwwroot/lar/DockerApps/votes_docker# sudo systemctl enable docker
Synchronizing state of docker.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable docker
#:/mnt/_work_sdb8/wwwroot/lar/DockerApps/votes_docker# sudo systemctl start docker
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
#:/mnt/_work_sdb8/wwwroot/lar/DockerApps/votes_docker# systemctl status docker.service
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2019-09-16 14:30:07 EEST; 298ms ago
Docs: https://docs.docker.com
Process: 5183 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
Main PID: 5183 (code=exited, status=1/FAILURE)
Sep 16 14:30:07 s systemd[1]: docker.service: Service hold-off time over, scheduling restart.
Sep 16 14:30:07 s systemd[1]: docker.service: Scheduled restart job, restart counter is at 3.
Sep 16 14:30:07 s systemd[1]: Stopped Docker Application Container Engine.
Sep 16 14:30:07 s systemd[1]: docker.service: Start request repeated too quickly.
Sep 16 14:30:07 s systemd[1]: docker.service: Failed with result 'exit-code'.
Sep 16 14:30:07 s systemd[1]: Failed to start Docker Application Container Engine.
#:/mnt/_work_sdb8/wwwroot/lar/DockerApps/votes_docker# journalctl -xe
-- Support: http://www.ubuntu.com/support
--
-- Unit snapd.service has finished shutting down.
Sep 16 14:30:15 s systemd[1]: Starting Snappy daemon...
-- Subject: Unit snapd.service has begun start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit snapd.service has begun starting up.
Sep 16 14:30:15 s snapd[6435]: AppArmor status: apparmor is enabled and all features are available
Sep 16 14:30:15 s snapd[6435]: cannot run daemon: assert storage root unexpectedly world-writable: /var/lib/snapd/assertions/asserts-v0
Sep 16 14:30:15 s systemd[1]: snapd.service: Main process exited, code=exited, status=1/FAILURE
Sep 16 14:30:15 s systemd[1]: snapd.service: Failed with result 'exit-code'.
Sep 16 14:30:15 s systemd[1]: Failed to start Snappy daemon.
-- Subject: Unit snapd.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit snapd.service has failed.
--
-- The result is RESULT.
Sep 16 14:30:15 s systemd[1]: snapd.service: Triggering OnFailure= dependencies.
Sep 16 14:30:15 s systemd[1]: snapd.service: Service hold-off time over, scheduling restart.
Sep 16 14:30:15 s systemd[1]: snapd.service: Scheduled restart job, restart counter is at 25663.
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Automatic restarting of the unit snapd.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
Sep 16 14:30:15 s systemd[1]: Stopped Snappy daemon.
-- Subject: Unit snapd.service has finished shutting down
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit snapd.service has finished shutting down.
Sep 16 14:30:15 s systemd[1]: Starting Snappy daemon...
-- Subject: Unit snapd.service has begun start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit snapd.service has begun starting up.
Sep 16 14:30:15 s snapd[6467]: AppArmor status: apparmor is enabled and all features are available
Sep 16 14:30:15 s snapd[6467]: cannot run daemon: assert storage root unexpectedly world-writable: /var/lib/snapd/assertions/asserts-v0
Sep 16 14:30:15 s systemd[1]: snapd.service: Main process exited, code=exited, status=1/FAILURE
Sep 16 14:30:15 s systemd[1]: snapd.service: Failed with result 'exit-code'.
Sep 16 14:30:15 s systemd[1]: Failed to start Snappy daemon.
-- Subject: Unit snapd.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit snapd.service has failed.
--
-- The result is RESULT.
Sep 16 14:30:15 s systemd[1]: snapd.service: Triggering OnFailure= dependencies.
I am not sure if that valid options in /etc/systemd/system.conf or some other issue?
Did you typed:
sudo systemctl start docker
sudo systemctl enable docker
?