[Help needed] Docker not starting Portainer - Randomly

  • On my OMV installation I shut down the server at night and restart it in the morning. Randomly Portainer is not started. I can go for days with it running correctly and then again it might not be started. It can always be properly started by restarting Docker in the GUI.


    I am guessing this might be a random timing issue upon startup but I am at a loss to find a way to resolve it.

    1. Is there a way to delay the startup of Portainer within Docker?
    2. Or should there be a delay in Docker startup?
    3. Where are Docker log files stored?

    OMV 5.6.11-1 ■ AMD 6 Core ■ 8TB ■ 32GB SSD Boot

  • Hello,


    Logically the docker service starts and then it starts the containers which are in automatic start.


    Can you display the configuration of your container portainer ?


    maybe it is configured in mode :

    Code
    restart: unless-stopped

    AMD Ryzen 5 2400G on Asus TUF B450M-PLUS - 16Gb RAM - 3 * 3To RAID5 on LSI Megaraid SAS 9260-8i and 3 SSD in Fractal Design Node 804 Black
    OS: OMV 6.3.2-1 (Shaitan)

    • Offizieller Beitrag

    Is there a way to delay the startup of Portainer within Docker?

    Docker waits until all "known" filesystems are mounted. Known filesystems are those that were present at the installation of docker through omv-extras.

    Check the content of this file /etc/systemd/system/docker.service.d/waitAllMounts.conf

    To update (or create) the file you can just press the "install docker" button in omv-extras.

    RE: Is your docker also corrupt after a reboot? (OMV5, Pi4) This might fix it!


    If that does not work, you can delay the start of docker writing an override file:

    systemctl edit docker.service

    paste

    Code
    [Service]
    ExecStartPre=/bin/sleep 30
    StartLimitIntervalSec=300s

    For explanation see here and following posts

  • Methy By default Portainer installed itself with a Restart Policy of Unless Stopped. I've changed it to Always. I'll monitor the next week or so for the effect of that as the occurrence was random and it will take a while to see if it pops up again. Thankyou.


    macom I'll wait to see what changing the Restart Policy does before moving to a more direct approach but thanks for your suggestions.

    OMV 5.6.11-1 ■ AMD 6 Core ■ 8TB ■ 32GB SSD Boot

  • Methy By default Portainer installed itself with a Restart Policy of Unless Stopped. I've changed it to Always. I'll monitor the next week or so for the effect of that as the occurrence was random and it will take a while to see if it pops up again. Thankyou.


    macom I'll wait to see what changing the Restart Policy does before moving to a more direct approach but thanks for your suggestions.

    Unless you intentionally top portainer with docker stop portainer and expect it to restart after a reboot your change will not have any visable effect.


    unless-stopped is a sensible configuration except you randomly stop containers and reboot and expect the state to be as before.

    I stop containers for a reason.

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!