Community discussions

MikroTik App
 
DyadyaGenya
Member Candidate
Member Candidate
Topic Author
Posts: 249
Joined: Mon May 08, 2023 10:34 pm

The container has stopped loading.

Mon May 05, 2025 10:48 am

After another power outage, one of my containers stopped loading. If I start it with the command/start button, it starts and immediately turns off. Nothing is visible in the logs. Checking the status in the terminal shows this:
/container print                                                              
 0 ;;; Process exited with status 1
   name="f47c1f39-b38c-45f8-bb1f-d78ea300af42" repo="adguard/adguardhome:latest" os="linux" arch="arm" interface=virteth1 root-dir=adguard mounts=adguard_etc workdir="/opt/adguardhome/work" start-on-boot=yes status=stopped 
The directory with adguard exists. And I can enter it via WinSCP. But there are no logs in it either. The virtual interface also works and can be pinged. The new container is installed without problems. But I would not like to configure a new one, because I did not save the settings of the old one. This is the AdguardHome container. What can I try to do to restore the old container?
 
holvoetn
Forum Guru
Forum Guru
Posts: 7362
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: The container has stopped loading.

Mon May 05, 2025 11:21 am

What device is this ?
Are you sure the CORRECT folder exists ?

Reason for asking: there is a long standing bug with RB5009 in combination with certain USB sticks where after reboot USB3 stick is not properly recognized and gets mounted as USB2 but ... with another drive name.
So you may still see the folder but not notice it's actually on another drive. And then container settings can not find it.

USB reset with some seconds delay should solve this and then the container can be started again.

Can you confirm ?
 
DyadyaGenya
Member Candidate
Member Candidate
Topic Author
Posts: 249
Joined: Mon May 08, 2023 10:34 pm

Re: The container has stopped loading.

Mon May 05, 2025 11:27 am

What device is this ?
Are you sure the CORRECT folder exists ?
RB4011iGS+5HacQ2HnD
And I wrote that I can enter this directory using WinSCP.
 
holvoetn
Forum Guru
Forum Guru
Posts: 7362
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: The container has stopped loading.

Mon May 05, 2025 11:36 am

OK, if you are sure that folder is 100% correct.
Another thing to try:

Open container so you have all settings in front of you.
Create a new container in a second dialog box with the exact same settings, don't save yet (I do so with copy-paste between 2 dialog boxes).
Throw away the first container.
Then commit creation of new container.

It should take over all settings from the previous one.
 
DyadyaGenya
Member Candidate
Member Candidate
Topic Author
Posts: 249
Joined: Mon May 08, 2023 10:34 pm

Re: The container has stopped loading.

Mon May 05, 2025 11:51 am

OK, if you are sure that folder is 100% correct.
Another thing to try:

Open container so you have all settings in front of you.
Create a new container in a second dialog box with the exact same settings, don't save yet (I do so with copy-paste between 2 dialog boxes).
Throw away the first container.
Then commit creation of new container.

It should take over all settings from the previous one.
Do you mean like on the screenshot? If so, what about the tag? I set it via the terminal. In principle, I have all the commands saved specifically so that the tags are the same. But I once tried to recreate it and my settings were not saved. But I recreated it in the terminal. Although maybe I did not do it in exactly the right order. And I am also confused by the name of the container. Now it is f47c1f39-b38c-45f8-bb1f-d78ea300af42. The new one, in theory, will have a different name.
You do not have the required permissions to view the files attached to this post.
 
holvoetn
Forum Guru
Forum Guru
Posts: 7362
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: The container has stopped loading.

Mon May 05, 2025 12:00 pm

Tag is what your file should be when creating.

I've done this plenty of times, name of the container doesn't matter as long as it uses the same folders as the previous container.
As a matter of fact, when you want to upgrade a container, you need to do something similar when doing it manually. Throw away the old one and create a new one with the same settings.
 
DyadyaGenya
Member Candidate
Member Candidate
Topic Author
Posts: 249
Joined: Mon May 08, 2023 10:34 pm

Re: The container has stopped loading.

Mon May 05, 2025 1:14 pm

Tag is what your file should be when creating.

I've done this plenty of times, name of the container doesn't matter as long as it uses the same folders as the previous container.
As a matter of fact, when you want to upgrade a container, you need to do something similar when doing it manually. Throw away the old one and create a new one with the same settings.
Unfortunately, I didn't succeed and had to reconfigure. Perhaps I did something wrong. I'll have to try to create a similar situation myself sometime and try to restore the settings. But I have some doubts about the tags. This time, for some reason, the container was created with a different tag.
 
optio
Forum Guru
Forum Guru
Posts: 1106
Joined: Mon Dec 26, 2022 2:57 pm

Re: The container has stopped loading.

Mon May 05, 2025 7:34 pm

If after power outage container stops working this can be suspect of some file corruption used by service (writing to file while power is lost). Best way is to remove container and its used directories (mounts), recreate container and copy config files from backup into mounted dirs (you have it, right?) after container is started (mount dirs are created if not exists upon start) and restart container (to apply backed up config) to be sure that all files will be correctly restored.
I had similar issue with Pi-hole container and this method helped. Also I did fs check on USB drive since I’m using external drive for containers storage and some fs errors was detected and fixed, but since you are using internal drive for containers (not recommended), ROS on startup performs such check.

P.S.
container name is dynamically generated when added to some random UUID, not related to this issue.
Also consider using UPS if you are often experiencing power outages and always stop containers and soft shut down/restart ROS (button trigger can be scripted for it), never just unplug device from power, to avoid such issues.
 
User avatar
Amm0
Forum Guru
Forum Guru
Posts: 4873
Joined: Sun May 01, 2016 7:12 pm
Location: California
Contact:

Re: The container has stopped loading.

Mon May 05, 2025 8:34 pm

Can you see the files in the mount?
... If so, you should be able to just delete the container - not the mount. And create a new one, using same VETH and mount as before. In fact, if "copy" before deleting, you'll have all the setting to re-create it (perhaps needing to specify the tag).

Why does the root-dir NOT have a path on it? That means it's going to RouterOS flash/etc that's limited in size....
 
optio
Forum Guru
Forum Guru
Posts: 1106
Joined: Mon Dec 26, 2022 2:57 pm

Re: The container has stopped loading.

Mon May 05, 2025 8:56 pm

I had case where file was corrupted in mount dir, because service was writing some file in it. So if such files are not recreated there, issue can still persist if is such case.

Not familiar with RB4011iGS+5HacQ2HnD, if this device is not using RAM for root fs (512 MB internal disk size) maybe this is not issue with available storage, still not recommended to run containers on internal drive.
 
User avatar
Amm0
Forum Guru
Forum Guru
Posts: 4873
Joined: Sun May 01, 2016 7:12 pm
Location: California
Contact:

Re: The container has stopped loading.

Mon May 05, 2025 9:04 pm

I had case where file was corrupted in mount dir, because service was writing some file in it. So if such files are not recreated there, issue can still persist if is such case.
Fair enough. More saying it's a 50/50% shot it the root-dir (*perhaps higher since there are more files) & if root-dir corrupted, that's easily replaced since it a container that one is "safe". The mount often store config files, so if the corruption is there...well, now you have data loss or need to have backup.

I'm still concerned by the is no path on root-dir= - that means it's on the flash. And @optio point that it could be short on disk space, etc. Be good to confirm.
 
optio
Forum Guru
Forum Guru
Posts: 1106
Joined: Mon Dec 26, 2022 2:57 pm

Re: The container has stopped loading.

Mon May 05, 2025 9:12 pm

Yes, typo in my post (...is not issue with available storage...), available disk space needs to be checked also because container dirs are on flash. Generally bad things can happen having container dirs on internal drive, wear-out flash, fs corruption, disk space runs out...
 
DyadyaGenya
Member Candidate
Member Candidate
Topic Author
Posts: 249
Joined: Mon May 08, 2023 10:34 pm

Re: The container has stopped loading.

Tue May 06, 2025 12:49 am

copy config files from backup into mounted dirs (you have it, right?)
Unfortunately, there were no copies. Some time ago I was interested here on the forum how to create copies or settings files for Adguard, but no one suggested anything, and I myself was unable to configure it.
Also consider using UPS if you are often experiencing power outages
From time to time I swap the UPS and just for a few days the Mikrotik stood without it.
Can you see the files in the mount?
... If so, you should be able to just delete the container - not the mount. And create a new one, using same VETH and mount as before. In fact, if "copy" before deleting, you'll have all the setting to re-create it (perhaps needing to specify the tag).

Why does the root-dir NOT have a path on it? That means it's going to RouterOS flash/etc that's limited in size....
Yes, I could go to the catalog. I am attaching a screenshot to finally understand whether I understand you correctly. And I did not delete the mount point. These settings remained and were even picked up in the configuration window. I only deleted the container, but this did not save the settings (block lists, local domain names, etc.)
And to understand that there are no special restrictions on the size of memory, here is a printout of resources
/system resource print                                                                                       
                   uptime: 1d39m27s           
                  version: 7.18.2 (stable)    
               build-time: 2025-03-11 11:59:04
         factory-software: 6.43.2             
              free-memory: 829.8MiB           
             total-memory: 1024.0MiB          
                      cpu: ARM                
                cpu-count: 4                  
            cpu-frequency: 1200MHz            
                 cpu-load: 4%                 
           free-hdd-space: 308.2MiB           
          total-hdd-space: 512.0MiB           
  write-sect-since-reboot: 51519              
         write-sect-total: 1844804            
               bad-blocks: 0%                 
        architecture-name: arm                
               board-name: RB4011iGS+5HacQ2HnD
                 platform: MikroTik  
still not recommended to run containers on internal drive.
There is simply no other. I would be happy to use a USB or SSD drive, but this model does not have such connectors.
You do not have the required permissions to view the files attached to this post.
 
optio
Forum Guru
Forum Guru
Posts: 1106
Joined: Mon Dec 26, 2022 2:57 pm

Re: The container has stopped loading.

Tue May 06, 2025 1:41 am

Unfortunately, there were no copies. Some time ago I was interested here on the forum how to create copies or settings files for Adguard, but no one suggested anything, and I myself was unable to configure it.
Not using AdGuard but by simply reading instructions for "Create directories for persistent configuration and data" from its container documentation https://hub.docker.com/r/adguard/adguardhome#quickstart it seems that /opt/adguardhome/conf and /opt/adguardhome/work directories contains configuration files (not sure to what is your adguard_etc mount pointing, but it seems wrong by its name - /etc maybe, there must be 2 mounts for mentioned dirs by their doc) and from this dirs files can be copied locally for backup after each config change, eg. using sftp to ROS, since you mentioned that you are using WinSCP to browse container files, you can backup/restore files from these 2 dirs using it.
 
DyadyaGenya
Member Candidate
Member Candidate
Topic Author
Posts: 249
Joined: Mon May 08, 2023 10:34 pm

Re: The container has stopped loading.

Wed May 07, 2025 11:09 pm

Not using AdGuard but by simply reading instructions for "Create directories for persistent configuration and data" from its container documentation https://hub.docker.com/r/adguard/adguardhome#quickstart it seems that /opt/adguardhome/conf and /opt/adguardhome/work directories contains configuration files (not sure to what is your adguard_etc mount pointing, but it seems wrong by its name - /etc maybe, there must be 2 mounts for mentioned dirs by their doc) and from this dirs files can be copied locally for backup after each config change, eg. using sftp to ROS, since you mentioned that you are using WinSCP to browse container files, you can backup/restore files from these 2 dirs using it.
I also read this page but I still didn't understand which files are responsible for the configuration. They also wrote that you can attach a file with a list of sites that need to be blocked, but I also didn't understand how to connect them. I tried, but it didn't work.
 
optio
Forum Guru
Forum Guru
Posts: 1106
Joined: Mon Dec 26, 2022 2:57 pm

Re: The container has stopped loading.

Thu May 08, 2025 3:17 pm

Can't help about that, not using AdGuard.