Docker containers reset after server reboot


Jeffy

Recommended Posts

so for the past few days i've been dealing with an issue with docker containers resetting after server reboot.  i updated unraid after the reboot. i noticed that my unifi controller (docker container) had been reset. didn't think much of it and i always keep a backup of the config and fed it the backup file and was on my way. Just yesterday i went out and was trying to watch a movie on my plex also in a container and noticed it was offline. when i got home and logged into my plex i noticed it was reset as if i were setting it up for the first time. 

So i spent the hour or so getting it all set back up and then reboot the server logged back in and the docker containers were reset again. 

unifi controller, plex, and pihole main containers i run and all get reset.

 

things i've tried are deleting the docker image file, deleting appdata, and deleting the docker templates. after all that docker still seems to reset the container after server reboot. 

 

any help would be appreciated.

 

thank you

Link to comment

im thinking you need this? 

root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='Plex-Media-Server' --net='br0' --ip='10.10.10.3' -e TZ="America/New_York" -e HOST_OS="Unraid" -e 'PLEX_CLAIM'='Insert Token from https://plex.tv/claim' -e 'PLEX_UID'='99' -e 'PLEX_GID'='100' -e 'VERSION'='latest' -v '/mnt/user/Videos/Transcoding/':'/transcode':'rw' -v '/mnt/user/':'/data':'rw' -v '/mnt/user/appdata/Plex-Media-Server':'/config':'rw' 'plexinc/pms-docker'

953233cfecbeea81471cd39c27b62c0d30d67f96c8cda0cd97dbf974ca73a00e

The command finished successfully!

Link to comment
On 3/22/2021 at 10:06 PM, Jeffy said:

just claimed it, reboot the server open webui and its running the first time setup wizard asking me to make a server name and create libraries. 

Just to clarify, does your docker run command now include the plex token instead of that text telling you where to insert it?

Link to comment

yes it does. also I just replaced the flash boot drive to rule out that being an issue. 

fix common problems is telling me "Invalid folder cache contained within /mnt    Generally speaking, most times when other folders get created within /mnt it is a result of an improperly configured application. This error may or may not cause issues for you"

 

could this be the problem?

this is what's inside it.
/mnt/cache/appdata# ls
binhex-plex/  pihole/
 

Link to comment
6 minutes ago, Jeffy said:

No I do not. All HDDs

Then you need to change all references to /mnt/cache in your container definitions to /mnt/user instead of /mnt/cache.

Since you don't have a cache drive, anything written to that path only exists in RAM and will be gone after a reboot.

Once you have removed all references to /mnt/cache, then reboot, you should be able to set things up permanently.

Link to comment
4 minutes ago, jonathanm said:

Then you need to change all references to /mnt/cache in your container definitions to /mnt/user instead of /mnt/cache.

Since you don't have a cache drive, anything written to that path only exists in RAM and will be gone after a reboot.

Once you have removed all references to /mnt/cache, then reboot, you should be able to set things up permanently.

That would make sense but from what I can tell none of my containers have mappings to that directory. 

image.thumb.png.0af356dda7737bb5ebd893f75d1a03d4.png

Link to comment

Oh yeah I see that now. OMG I must need sleep or something. 

So I fixed that, deleted the cache directory and rebooted the server. So far everything seems to be working. 

My guess is that one of the docker containers created that directory and a few started using that causing the configs to be wiped on reboot. 

 

thank you all for your help. 

  • Thanks 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.