What's new

AdGuardHome AdGuard Home fails to start after reboot

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Thanks for the quick replys.
I've updated AdGuard with your latest patch.
Now, lets wait and see if it fails to start again.

Maybe there's some misconfiguration on my part, but I'm not seeing it. I've shared AdGuardHome.yaml so you can have a look.
@Markfree I know it has been a minute since I stopped in to check, but I just want you to know the thought of your issue still sits in my mind. Do your issues still persist?
 
Hey @SomeWhereOverTheRainBow .
Thanks for your update.
I've had a fail on May 15, but I've updated Adguard since then, and it is not failing anymore.
Okay, continue to monitor it over the next week or so. Keep me updated. If it comes back, I have some other debugging techniques to tell if it resides on the AdGuardHome side (i mean their development side and not mine). If it turns out I need to raise an issue about it with the AGH developers at that point I will.
 
Okay, continue to monitor it over the next week or so. Keep me updated. If it comes back, I have some other debugging techniques to tell if it resides on the AdGuardHome side (i mean their development side and not mine). If it turns out I need to raise an issue about it with the AGH developers at that point I will.
I'm now monitoring AdGuard with Zabbix and have detected a new fail.
Unfortunately, Adguard Home failed once again on May 25.

I've shared the messages log again if it helps.
 
I'm now monitoring AdGuard with Zabbix and have detected a new fail.
Unfortunately, Adguard Home failed once again on May 25.

I've shared the messages log again if it helps.
First stop AdGuardHome with

Code:
service stop_AdGuardHome

If you are capable, use a ssh terminal editor such as nano or vi to edit a single line inside
/opt/etc/init.d/S99AdGuardHome
the line to edit is line 6,
Code:
ARGS="-s run -c ${WORK_DIR}/AdGuardHome.yaml -w $WORK_DIR --pidfile $PID_FILE --no-check-update -l syslog"

the only change needed is to change -l syslog to -l /opt/var/log/AdGuardHome.log

next simply run

Code:
 service start_AdGuardHome

over the next week if adguardhome does not restart on reboot, use
Code:
tail -f /opt/var/log/AdGuardHome.log
to check the log file for any errors that may exist.

I realized that if AdGuardHome fails to start it simply wont write the errors to system log, however if a different log location is specified, then the logged errors do get printed. You should be able to observe this by tail -f the log file when the failures occur.
 
@Markfree if you want to set the log up to be a filter with scribe, you can then observe it through UiScribe on the gui as well.
That is awesome!
Just for future reference, I did this:

Updated AdGuardHome Init.
Bash:
# sed -i 's|-l syslog|-l /opt/var/log/AdGuardHome.log|' /opt/etc/init.d/S99AdGuardHome
Added AdGuardHome to SyslogNG.
Bash:
# nano /opt/etc/syslog-ng.d/AdGuardHome
    # put AdGuardHome messages into /opt/var/log/AdGuardHome.log

    destination d_AdGuardHome {
        file("/opt/var/log/AdGuardHome.log");
    };

    filter f_AdGuardHome {
        program("AdGuardHome") or
        message("AdGuardHome");
    };

    log {
        source(src);
        filter(f_AdGuardHome);
        destination(d_AdGuardHome);
        flags(final);
    };

    #eof
Restarted AdGuardHome
Bash:
/opt/etc/init.d/S99AdGuardHome stop
/opt/etc/init.d/S99AdGuardHome start
Then, went to AMTM, and reloaded UIScribe lists.

Maybe you can implement that feature with AdGuard installer.
Now I can open AdGuard log within Web UI.
Thanks
 
Once again, AdGuard failed to start.
The router was rebooted at 4h AM and AdGuard was started manually at 04h05.
This time all logs were saved at /opt/var/log/AdGuardHome.log, still I could not find an error.
Bash:
(...)
2022/05/29 18:01:24.527154 [info] saving filter 1650351705 contents to: /tmp/mnt/entware/entware/etc/AdGuardHome/data/filters/1650351705.txt
2022/05/29 18:01:24.528021 [info] updated filter 1650351705: 1156451 bytes, 58375 rules
2022/05/29 18:01:24.553879 [info] Updated filter #1650265309.  Rules: 10427 -> 10428
2022/05/29 18:01:24.553924 [info] Updated filter #1650265311.  Rules: 5175 -> 5186
2022/05/29 18:01:24.553949 [info] Updated filter #1650265312.  Rules: 20002 -> 20014
2022/05/29 18:01:24.553967 [info] Updated filter #1650265313.  Rules: 6752 -> 6752
2022/05/29 18:01:24.553982 [info] Updated filter #1650265314.  Rules: 2930 -> 2931
2022/05/29 18:01:24.553999 [info] Updated filter #1650351695.  Rules: 3669 -> 3670
2022/05/29 18:01:24.554018 [info] Updated filter #1650351700.  Rules: 406 -> 406
2022/05/29 18:01:24.554040 [info] Updated filter #1650351703.  Rules: 46204 -> 46237
2022/05/29 18:01:24.554056 [info] Updated filter #1650351705.  Rules: 58399 -> 58375
2022/05/30 04:00:08.031961 [info] Received signal "interrupt"
2022/05/30 04:00:08.032076 [info] stopping AdGuard Home
2022/05/30 04:00:08.032093 [info] stopping http server...
2022/05/30 04:00:08.033404 [info] stopped http server
2022/05/30 04:00:08.033493 [info] Stopping the DNS proxy server
2022/05/30 04:00:08.033611 [info] Stopped the DNS proxy server
2022/05/30 04:00:08.077829 [info] Stopped
May 30 04:05:59 [hostname] S99AdGuardHome[6859]: Starting Monitor!
May 30 04:05:59 [hostname] S99AdGuardHome[6859]: Started AdGuardHome from S99AdGuardHome[6859].
2022/05/30 04:06:00.078559 [info] AdGuard Home, version v0.107.6
2022/05/30 04:06:00.078644 [info] AdGuard Home is running as a service
May 30 04:06:00 [hostname] S99AdGuardHome[6859]: start_AdGuardHome took 1 second(s) to complete.
2022/05/30 04:06:00.135662 [info] Initializing auth module: /tmp/mnt/entware/entware/etc/AdGuardHome/data/sessions.db
2022/05/30 04:06:00.139105 [info] auth: initialized.  users:1  sessions:4
2022/05/30 04:06:00.139214 [info] Initialize web module
2022/05/30 04:06:00.892118 [info] AdGuard Home is available at the following addresses:
2022/05/30 04:06:00.914069 [info] Go to http://127.0.0.1:14711
2022/05/30 04:06:00.914164 [info] Go to http://127.0.1.1:14711
2022/05/30 04:06:00.914183 [info] Go to http://[::1]:14711
(...)

That's basically it.
 
Once again, AdGuard failed to start.
The router was rebooted at 4h AM and AdGuard was started manually at 04h05.
This time all logs were saved at /opt/var/log/AdGuardHome.log, still I could not find an error.
Bash:
(...)
2022/05/29 18:01:24.527154 [info] saving filter 1650351705 contents to: /tmp/mnt/entware/entware/etc/AdGuardHome/data/filters/1650351705.txt
2022/05/29 18:01:24.528021 [info] updated filter 1650351705: 1156451 bytes, 58375 rules
2022/05/29 18:01:24.553879 [info] Updated filter #1650265309.  Rules: 10427 -> 10428
2022/05/29 18:01:24.553924 [info] Updated filter #1650265311.  Rules: 5175 -> 5186
2022/05/29 18:01:24.553949 [info] Updated filter #1650265312.  Rules: 20002 -> 20014
2022/05/29 18:01:24.553967 [info] Updated filter #1650265313.  Rules: 6752 -> 6752
2022/05/29 18:01:24.553982 [info] Updated filter #1650265314.  Rules: 2930 -> 2931
2022/05/29 18:01:24.553999 [info] Updated filter #1650351695.  Rules: 3669 -> 3670
2022/05/29 18:01:24.554018 [info] Updated filter #1650351700.  Rules: 406 -> 406
2022/05/29 18:01:24.554040 [info] Updated filter #1650351703.  Rules: 46204 -> 46237
2022/05/29 18:01:24.554056 [info] Updated filter #1650351705.  Rules: 58399 -> 58375
2022/05/30 04:00:08.031961 [info] Received signal "interrupt"
2022/05/30 04:00:08.032076 [info] stopping AdGuard Home
2022/05/30 04:00:08.032093 [info] stopping http server...
2022/05/30 04:00:08.033404 [info] stopped http server
2022/05/30 04:00:08.033493 [info] Stopping the DNS proxy server
2022/05/30 04:00:08.033611 [info] Stopped the DNS proxy server
2022/05/30 04:00:08.077829 [info] Stopped
May 30 04:05:59 [hostname] S99AdGuardHome[6859]: Starting Monitor!
May 30 04:05:59 [hostname] S99AdGuardHome[6859]: Started AdGuardHome from S99AdGuardHome[6859].
2022/05/30 04:06:00.078559 [info] AdGuard Home, version v0.107.6
2022/05/30 04:06:00.078644 [info] AdGuard Home is running as a service
May 30 04:06:00 [hostname] S99AdGuardHome[6859]: start_AdGuardHome took 1 second(s) to complete.
2022/05/30 04:06:00.135662 [info] Initializing auth module: /tmp/mnt/entware/entware/etc/AdGuardHome/data/sessions.db
2022/05/30 04:06:00.139105 [info] auth: initialized.  users:1  sessions:4
2022/05/30 04:06:00.139214 [info] Initialize web module
2022/05/30 04:06:00.892118 [info] AdGuard Home is available at the following addresses:
2022/05/30 04:06:00.914069 [info] Go to http://127.0.0.1:14711
2022/05/30 04:06:00.914164 [info] Go to http://127.0.1.1:14711
2022/05/30 04:06:00.914183 [info] Go to http://[::1]:14711
(...)

That's basically it.
so when you say manually started, You mean you had to type the commands in the terminal to start it?
 
Yes. I usually do it like this /opt/etc/init.d/S99AdGuardHome start
One thing I recommend is doing service start_AdGuardHome

the reason why is because the AdGuardHome does not seperate from the terminal session properly (i.e. when the terminal session ends it might kill adguardhome process). Other wise you need to do,

/opt/etc/init.d/S99AdGuardHome start &
 
Yes. I usually do it like this /opt/etc/init.d/S99AdGuardHome start
From what I can tell is your adguardhome might not be fully starting on those occasions. Do you ever observe any errors when going through the adguardhome webui or when adjusting settings?

Obviously the manager script is perceiving your adguardhome as being active though. which is also weird because it should restart it once it notices the process is not actually running.
 
One thing I recommend is doing service start_AdGuardHome

the reason why is because the AdGuardHome does not seperate from the terminal session properly (i.e. when the terminal session ends it might kill adguardhome process). Other wise you need to do,

/opt/etc/init.d/S99AdGuardHome start &
I see your point, but for me usually that way is unintuitive, but I'll try doing so.
Bash:
# service check_AdGuardHome

Done.
:rolleyes:
 
No error at Web UI.
I cannot seem to pinpoint the cause of the anomalous behaviors. One option you could try doing is making a backup of your .yaml file. Then completely uninstall and reinstall, just remember to copy and paste your back up .yaml file into the new .yaml file. also make sure you place your backup.yaml on the out side of the /opt/etc/AdGuardHome directory.
 
Not really.
I have another AX86U that behaves as it should and AdGuard correctly starts everytime.
Both of them are configured similarly.

Except from nsrum which runs only on the "adguard failing" router, these are the active scripts I use on both of them:
Code:
5  open     scribe                    v2.4.3
j1 open     connmon                   v3.0.2
j2 open     ntpMerlin                 v3.4.5
j3 open     scMerlin                  v2.4.0
j6 open     uiScribe                  v1.4.5
j7 open     YazDHCP                   v1.0.4
ag open     AdGuardHome               v1.5.3
rs manage   Reboot scheduler * @ 4:0
Maybe there's some misconfiguration somewhere, but I really could not find it.
 
Not really.
I have another AX86U that behaves as it should and AdGuard correctly starts everytime.
Both of them are configured similarly.

Except from nsrum which runs only on the "adguard failing" router, these are the active scripts I use on both of them:
Code:
5  open     scribe                    v2.4.3
j1 open     connmon                   v3.0.2
j2 open     ntpMerlin                 v3.4.5
j3 open     scMerlin                  v2.4.0
j6 open     uiScribe                  v1.4.5
j7 open     YazDHCP                   v1.0.4
ag open     AdGuardHome               v1.5.3
rs manage   Reboot scheduler * @ 4:0
Maybe there's some misconfiguration somewhere, but I really could not find it.
Weird, see there are two points AdGuardHome manager script could start at, the first possible place to start init-start where the process just sleeps until the binary file is detectable. The second is from when entware mounts and all the packages that reside in entware init.d start. It is hard to fathom it not starting at either of these points unless something hindered the process, but even I don't know what could be causing it.
 
@Markfree

I know sometimes when scribe runs, it doesn't pull in some of the logs present at reboot. Maybe there is something occuring before scribe starts, that may indicate errors of some kind. It is hard to say.
 

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top