It is currently Tue Aug 03, 2021 12:35 am
All times are UTC + 8 hours

issue with current Docker not starting up after reboot

Got a feature request? Great! Post your ideas here!

issue with current Docker not starting up after reboot

Postby dkobelak » Fri Jun 18, 2021 6:50 am

I was hoping we could get an update too the current Docker version that we have in the app center. I am running the latest version available in ADM, however after rebooting the server, quite often docker does not start up properly and many of the apps that I have running that use it (sabnzbd, portainer, etc) do not come back up after reboot. I need to restart docker, sometimes multiple times for it to start working.. Also if anyone has any tips or a way of fixing this, it would be great to hear.. otherwise, I am hoping a newer version of docker could fix this issue..
AS-5104T running stock memory;RAID 5 - 4x3TB Toshiba DT01ACA300;BIOS: v1.21 - ADM: 3.5.6.RHA2
AS-6204T running stock memory;RAID 5 - 3x8TB Seagate Ironwolf ST8000VN0022;BIOS: v2.23 - ADM: 3.5.6.RHA2
dkobelak
 
Posts: 93
Joined: Wed Jun 08, 2016 2:21 am

Re: issue with current Docker not starting up after reboot

Postby Nazar78 » Sat Jun 19, 2021 7:11 am

I noticed it too after the recent upgrade. Not all of the containers started at boot or after daily update (I'm using watchtower) despite the "restart always" flag.

Didn't really try to find the culprit think it's the startup order but until there's a fix this is what I did... Edit the startup file using vi or whatever you're comfortable with.

Code: Select all
vi /volume1/.@plugins/AppCentral/docker-ce/CONTROL/start-stop.sh

Look for the case start mount cgroup at line 22, append this code below the line.

Code: Select all
docker start `docker container ls -a|awk 'NR>1{print $NF}'`>/dev/null

I actually have this in my other tweak/mods because it will revert if there's an update but above still works.
Last edited by Nazar78 on Sat Jun 26, 2021 11:00 am, edited 2 times in total.
AS5304T - 16GB DDR4 - [40TB N300 RAID10 + 5 Bay USB: 8TB RAID5 & 480GB SSD for Apps]
User avatar
Nazar78
 
Posts: 334
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore

Re: issue with current Docker not starting up after reboot

Postby dkobelak » Tue Jun 22, 2021 7:13 am

Nazar78 wrote:I noticed it too after the recent upgrade. Not all of the containers started at boot or after daily update (I'm using watchtower) despite the "restart always" flag.

Didn't really try to find the culprit think it's the startup order but until there's a fix this is what I did... Edit the startup file using vi or whatever you're comfortable with.

Code: Select all
vi /volume1/.@plugins/AppCentral/docker-ce/CONTROL/start-stop.sh

Look for the case start mount cgroup at line 22, append this code below the line.

Code: Select all
docker container ls -a|awk '{print $NF}'|grep -v NAMES|xargs docker start>/dev/null

I actually have this in my other tweak/mods because it will revert if there's an update but above still works.


Thank you for this.. I edited it on one of my NAS and will test it out.. will post here how it goes after my next reboot..
AS-5104T running stock memory;RAID 5 - 4x3TB Toshiba DT01ACA300;BIOS: v1.21 - ADM: 3.5.6.RHA2
AS-6204T running stock memory;RAID 5 - 3x8TB Seagate Ironwolf ST8000VN0022;BIOS: v2.23 - ADM: 3.5.6.RHA2
dkobelak
 
Posts: 93
Joined: Wed Jun 08, 2016 2:21 am

Re: issue with current Docker not starting up after reboot

Postby Nazar78 » Sat Jun 26, 2021 11:01 am

No problem, if it works for you I've edited the previous command just to make it slightly shorter.
AS5304T - 16GB DDR4 - [40TB N300 RAID10 + 5 Bay USB: 8TB RAID5 & 480GB SSD for Apps]
User avatar
Nazar78
 
Posts: 334
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore

Re: issue with current Docker not starting up after reboot

Postby ajizle » Wed Jul 07, 2021 11:55 am

I am having this issue as well - I have to manually toggle the Docker app in AppCentral off/on or reboot a few times to get things to load properly. Occured in ADM 3.5 and I am now running ADM 4.0 beta and the issue still persists.
ajizle
 
Posts: 5
Joined: Mon Dec 07, 2020 2:22 am

Re: issue with current Docker not starting up after reboot

Postby Nazar78 » Wed Jul 14, 2021 7:58 am

ajizle wrote:I am having this issue as well - I have to manually toggle the Docker app in AppCentral off/on or reboot a few times to get things to load properly. Occured in ADM 3.5 and I am now running ADM 4.0 beta and the issue still persists.

I noticed it's worst in ADM 4 beta especially just to restart certain containers. Currently this is my approach which is to force start all the containers a few times. Run it at boot with few secs of sleep prior and whenever some containers not able to restart on demand. Not the best method but it works for me.
Code: Select all
while [ ${count:-0} -lt 3 ];do count=$((count+1));docker container ls -a|awk 'NR>1{print $NF}'|xargs docker start 2>&1;done

I have another scheduled script that I use to force network host disconnect on problematic containers during my watchtower upgrades every 4pm. It runs 5 mins after the upgrade. These containers won't automatically restart after upgrades unless you force disconnect its host network. Without this, I would end up daily noticing some of the containers not running after the automatic upgrade.
Code: Select all
for i in $(docker ps -a 2>&1|awk 'NR>1&&/Exited|Created/{print $NF}');do docker network disconnect -f host $i>/dev/null 2>&1;echo "Restarting $i...";docker start $i 2>&1;done

Then followed by the previous snippet to force start a few times just incase.
AS5304T - 16GB DDR4 - [40TB N300 RAID10 + 5 Bay USB: 8TB RAID5 & 480GB SSD for Apps]
User avatar
Nazar78
 
Posts: 334
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore

Re: issue with current Docker not starting up after reboot

Postby dkobelak » Thu Jul 15, 2021 4:23 am

so the scrip didn't work for me.. i just restart all containers, but first i restart docker itself.. works after a couple of tries most of the time.. just hate the fact I have to do this after each restart.. I really wish we got a newer docker CE version as I think it is more stable based on the fix info provided since the version we are running.
AS-5104T running stock memory;RAID 5 - 4x3TB Toshiba DT01ACA300;BIOS: v1.21 - ADM: 3.5.6.RHA2
AS-6204T running stock memory;RAID 5 - 3x8TB Seagate Ironwolf ST8000VN0022;BIOS: v2.23 - ADM: 3.5.6.RHA2
dkobelak
 
Posts: 93
Joined: Wed Jun 08, 2016 2:21 am

Re: issue with current Docker not starting up after reboot

Postby Nazar78 » Sat Jul 17, 2021 4:00 am

I managed to automate the failed startup at boot and once daily after a scheduled container upgrade, in fact I even created some notifications just to monitor the situation. So far it's been helping a lot rather than having to login to the NAS manually to restart the containers, at least for now until there's an official fix.

Untitled.png
Untitled.png (29.54 KiB) Viewed 160 times
AS5304T - 16GB DDR4 - [40TB N300 RAID10 + 5 Bay USB: 8TB RAID5 & 480GB SSD for Apps]
User avatar
Nazar78
 
Posts: 334
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore

Return to Feature Requests

  • You cannot post new topics in this forum
    You cannot reply to topics in this forum
    You cannot edit your posts in this forum
    You cannot delete your posts in this forum
    You cannot post attachments in this forum
  • Who is online

    Users browsing this forum: No registered users and 2 guests