You are not logged in.
Pages: 1
Topic closed
when running
sudo systemctl start docker.servicethe first time after rebooting it takes forever, like 5 minutes.
stopping and starting after that work instantly.
I have googled and poked around but I have no idea what to do next. Anyone seen this before?
Last edited by cschep (2024-03-11 19:51:11)
Offline
You should check the docker logs:
journalctl -eu docker.service which operation takes the longest time?
If the information is insufficient, try enabling debug https://docs.docker.com/config/daemon/l … -debugging
Offline
How much space do all your containers and images take up? Have you tried to do "docker system prune"?
Offline
You should check the docker logs:
journalctl -eu docker.servicewhich operation takes the longest time?
If the information is insufficient, try enabling debug https://docs.docker.com/config/daemon/l … -debugging
Thank you! So this is a weird thing.. when I execute the systemctl start command nothing appears in the journalctl logs for many minutes then bam it happens quickly.
Mar 11 11:51:43 tormund systemd[1]: Starting Docker Application Container Engine...
Mar 11 11:51:43 tormund dockerd[119325]: time="2024-03-11T11:51:43.412870543-04:00" level=info ms>
Mar 11 11:51:43 tormund dockerd[119325]: time="2024-03-11T11:51:43.413342776-04:00" level=info ms>
Mar 11 11:51:43 tormund dockerd[119325]: time="2024-03-11T11:51:43.467713949-04:00" level=info ms>
Mar 11 11:51:43 tormund dockerd[119325]: time="2024-03-11T11:51:43.468646685-04:00" level=info ms>
Mar 11 11:51:43 tormund dockerd[119325]: time="2024-03-11T11:51:43.577142398-04:00" level=info ms>
Mar 11 11:51:43 tormund dockerd[119325]: time="2024-03-11T11:51:43.606793017-04:00" level=info ms>
Mar 11 11:51:43 tormund dockerd[119325]: time="2024-03-11T11:51:43.660300835-04:00" level=warning>
Mar 11 11:51:43 tormund dockerd[119325]: time="2024-03-11T11:51:43.660415965-04:00" level=info ms>
Mar 11 11:51:43 tormund dockerd[119325]: time="2024-03-11T11:51:43.660576397-04:00" level=info ms>
Mar 11 11:51:43 tormund dockerd[119325]: time="2024-03-11T11:51:43.681422720-04:00" level=info ms>
Mar 11 11:51:43 tormund systemd[1]: Started Docker Application Container Engine.Once it sits for many minutes... it finally hit starts then as you can see starts in like one second.
How much space do all your containers and images take up? Have you tried to do "docker system prune"?
So this is a fresh install of Docker, never pulled a single image/container/anything.
Offline
Also -- this only happens the first time. Once I wait the 5 minutes and Docker finally comes up I can stop/start it all I want.. My gut says some sort of network timeout but... I don't know how to troubleshoot.
Offline
SOLVED!
Turns out
systemd-network-wait-onlinewas taking two minutes to timeout and failing every time. I noticed that docker.service had this as a dep by using the command:
systemctl list-dependencies docker.serviceI have two network cards, ethernet and wireless. The default for systemd network wait is to make sure all interfaces are up. I only use ethernet this is a desktop that doesn't need a wireless connection. I would love to disable the wireless card (and bluetooth for that matter) but it turns out to be a well known firmware flaw on this MSI board that there is no option to do that.
so! I was able to update systemd to consider any interface to be up not ALL of them. weird default but whatever.
This ended up being really helpful in case anyone stumbled upon this in the future: https://unix.stackexchange.com/question … ne-failure
Thanks all!
Offline
Thanks very much for posting your findings and solution. Finally I can put this annoying issue to rest.
Offline
Thanks for the answer, it really helped me. I was tired of waiting 2 minutes everytime I ran wsl
Offline
Mod note: closing this old solved topic to prevent further necrobumps.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Pages: 1
Topic closed