Community discussions

MikroTik App
 
kriller
just joined
Topic Author
Posts: 4
Joined: Mon Jun 18, 2018 10:15 pm

hap ac3 - containers stop working after reboot

Fri Apr 28, 2023 4:15 pm

I now 2 times experimented with containers and got them working just to see them stop working at the next hard reboot (i.e. power outage) of the router.
First time was with PiHole and this second time I tried with Adguard home instead.
When it happens, the container will start (status is "running" and I can get shell access to the container) but any services on them will not be reachable from the network. Both the DNS and admin interfaces of Pihole and Adguard stopped working. I am using an external USB stick as recommended. Initially I supected that the random old stick I had found to experiment with PiHole was bad, so when I tried again with Adguard, I swapped to a nearly new Sony USB stick that I have much more faith in. I've had it unplugged to fsck the ext4 filesystem using my laptop with no reported errors on the FS.
I can ping the container from the external network, but no application services is reachable inside the container.
I've tried editing the cmd to add -l and -w to the Adguard Home startup to get some more logs from the container, but nothing gets logged either even with logging enabled.
Any ideas?
 
holvoetn
Forum Guru
Forum Guru
Posts: 5808
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: hap ac3 - containers stop working after reboot

Fri Apr 28, 2023 8:56 pm

Without a crystall ball, anyone can guess ...

export your config for container part, place between code quotes.
 
kriller
just joined
Topic Author
Posts: 4
Joined: Mon Jun 18, 2018 10:15 pm

Re: hap ac3 - containers stop working after reboot

Sun Apr 30, 2023 3:44 pm

/container mounts
add comment="Adguard working directory" dst=/opt/adguardhome/work name=Adguard_Work src=/usb1-part1/adguard-work
add comment="Adguard conf directory" dst=/opt/adguardhome/conf name=Adguard_Conf src=/usb1-part1/adguard-conf
/disk
add parent=usb1 partition-number=1 partition-offset=512 partition-size="31 004 294 656" type=partition
/interface bridge
add name=docker-bridge protocol-mode=none
...
/interface veth
add address=192.168.255.2/24 gateway=192.168.255.1 name=veth-adguard
...
/container
add cmd="/opt/adguardhome/AdGuardHome --no-check-update -c /opt/adguardhome/conf/AdGuardHome.yaml -h 0.0.0.0 -w /opt/adguardhome/work -l -v" interface=veth-adguard  logging=yes mounts=Adguard_Work,Adguard_Conf root-dir=usb1-part1/adguard workdir=/opt/adguardhome/work
/container config
set ram-high=100 registry-url=https://registry-1.docker.io tmpdir=usb1-part1/pull
..
/interface bridge port
add bridge=docker-bridge interface=veth-adguard multicast-router=disabled
...
/interface list member
add interface=docker-bridge list=LAN
add interface=veth-adguard list=LAN
...
/ip address
add address=192.168.255.1/24 interface=docker-bridge network=192.168.255.0
...
/system logging
add topics=container,debug
I haven't included firewall rules since the clients get a "connection refused" and I have only ACCEPT and DROP rule - no REJECT rules. And if it was the firewall rules, I would expect it to break as soon as the problematic firewall rule was added - not after a reboot.
The hap ac3 is running 7.8. The Adguard container was uploaded manually due from a tarball due to the issue with newer container formats that is discussed elsewhere in this forum. The pihole container was pull from the docker registry as per the example in the documentation.
 
ashpri
Member Candidate
Member Candidate
Posts: 154
Joined: Sun Oct 14, 2018 3:11 am

Re: hap ac3 - containers stop working after reboot

Thu Dec 07, 2023 1:38 am

I now 2 times experimented with containers and got them working just to see them stop working at the next hard reboot (i.e. power outage) of the router.
First time was with PiHole and this second time I tried with Adguard home instead.
When it happens, the container will start (status is "running" and I can get shell access to the container) but any services on them will not be reachable from the network. Both the DNS and admin interfaces of Pihole and Adguard stopped working. I am using an external USB stick as recommended.

Did you manage to solve this issue? I have just installed adguard-home on an RB5009 on ROS 7.12.1 following the guide in the network berg youtube clip.

Following your suggestion, I used an SSD. However, like you, after a reboot (auto-start container checked) the container runs but none of the services work.

On a new install, I have tried stopping the adguard before rebooting the router but the result is the same. None of the services (web interface, dns) works on reboot of the router and manual start of the container.

Update: It does start, but the dashboard only partially loaded after around 5 minutes after container start and even at the end of typing the dashboard is still loading. I have a suspicion container isn't stable yet. Has anyone managed to get any container working stably after a router reboot?

Who is online

Users browsing this forum: Bing [Bot], lurker888 and 41 guests