OPNsense Forum

English Forums => 24.7, 24.10 Legacy Series => Topic started by: DenverTech on December 04, 2024, 05:01:42 AM

Title: 24.7.10_1 issues with AdGuard Home
Post by: DenverTech on December 04, 2024, 05:01:42 AM
This isn't the first time I've seen this and haven't figured out the cause yet. Short version is that every few updates to OPNsense, AGH crashes badly and can't be restarted without wiping it out and starting fresh. Trying to track down the cause and resolve it once and for all. I've seen a few people post with similar issues, but they mostly just get told off (ie, "Doesn't happen to me, so it's your problem" type of replies). I acknowledge this isn't happening to all firewalls, but I have two of them doing this...and oddly, they don't always break on the same updates.

Ok, here's the pile of info on what I'm seeing and tested, using today's crash as an example. Previous run-ins with this issue were identical:

Any ideas or things I may not have tried?
Title: Re: 24.7.10_1 issues with AdGuard Home
Post by: Patrick M. Hausen on December 04, 2024, 05:05:00 AM
Quote from: DenverTech on December 04, 2024, 05:01:42 AM
When this occurs, it's usually after an update to OPNsense or the AGH container. Either can trigger it, but the results are the same.

What container? How did you install AGH on OPNsense?
Title: Re: 24.7.10_1 issues with AdGuard Home
Post by: DenverTech on December 04, 2024, 05:07:24 AM
I used the community plugin from maxit/mimugmail, so it's installed via the plugin. Nothing too fancy or special there.
Title: Re: 24.7.10_1 issues with AdGuard Home
Post by: DenverTech on December 04, 2024, 07:33:57 AM
Out of curiosity, is there any way to log errors with plugins (such as from console)? If I could get a log of what is exploding in AGH, that would make this a lot easier.
Title: Re: 24.7.10_1 issues with AdGuard Home
Post by: cookiemonster on December 04, 2024, 01:33:50 PM
there seem to be a couple of hotfixes today for 24.7.10.x. I suggest you retest after system is stable again.
Title: Re: 24.7.10_1 issues with AdGuard Home
Post by: Patrick M. Hausen on December 04, 2024, 01:43:49 PM
Quote from: DenverTech on December 04, 2024, 07:33:57 AM
Out of curiosity, is there any way to log errors with plugins (such as from console)? If I could get a log of what is exploding in AGH, that would make this a lot easier.

Nothing to find in the /usr/local/AdGuardHome/data directory?

Also, log on to OPNsense via SSH, use drill to specifically throw a request at the AdGuard Home port, observe what happens.
Title: Re: 24.7.10_1 issues with AdGuard Home
Post by: DenverTech on December 04, 2024, 06:37:52 PM
Quote from: Patrick M. Hausen on December 04, 2024, 01:43:49 PM
Quote from: DenverTech on December 04, 2024, 07:33:57 AM
Out of curiosity, is there any way to log errors with plugins (such as from console)? If I could get a log of what is exploding in AGH, that would make this a lot easier.

Nothing to find in the /usr/local/AdGuardHome/data directory?

Also, log on to OPNsense via SSH, use drill to specifically throw a request at the AdGuard Home port, observe what happens.

I checked the AGH folder, including data, but all it has is the query log. I ran queries and only the query log changes. Nothing appears to be an "informational" log.

Quote from: cookiemonster on December 04, 2024, 01:33:50 PM
there seem to be a couple of hotfixes today for 24.7.10.x. I suggest you retest after system is stable again.

Good point. I've been watching those. They don't really describe the issue I'm having, but yeah, good call.
Title: Re: 24.7.10_1 issues with AdGuard Home
Post by: cookiemonster on December 04, 2024, 11:42:56 PM
For AdGH logging specifically there's another way. I can't really remember how long ago I did this modification but a few AdGH versions ago they introduced some additional logging capabilities by config. I update AdGH from time to time using the UI. The installation is from mimugmail's repo.
Please if you do it, check you have a version that has this capability and take notice of the schema changes. Make a backup of the config file: /usr/local/AdGuardHome/AdGuardHome.yaml before any changes.
I am on Version: v0.107.54 of AdGH.
On my config I have added/changed the following settings in the log section:
log:
  enabled: true
  file: /var/log/AdGuardHome/AdGuardHome.log
  max_backups: 30
  max_size: 10
  max_age: 31
  compress: false
  local_time: false
  verbose: false

This is very recently, before I had:
log:
  enabled: true
  file: /var/log/AdGuardHome/AdGuardHome.log
  max_backups: 3
  max_size: 100
  max_age: 3
  compress: false
  local_time: false
  verbose: false

but I realised I wanted to rotate earlier and not have 100 MB files. I have just recently made the change so will need to keep an eye on successful rotation.
So, take backup, make your desired changes, restart AdGH from : System: Diagnostics: Services. Read the new log file to see it starting. Keep an eye to make sure the log files are growing and rotating as expected.
More info on settings https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration



Title: Re: 24.7.10_1 issues with AdGuard Home
Post by: DenverTech on December 04, 2024, 11:54:24 PM
Quote from: cookiemonster on December 04, 2024, 11:42:56 PM
For AdGH logging specifically there's another way. I can't really remember how long ago I did this modification but a few AdGH versions ago they introduced some additional logging capabilities by config. I update AdGH from time to time using the UI. The installation is from mimugmail's repo.
Please if you do it, check you have a version that has this capability and take notice of the schema changes. Make a backup of the config file: /usr/local/AdGuardHome/AdGuardHome.yaml before any changes.
I am on Version: v0.107.54 of AdGH.
On my config I have added/changed the following settings in the log section:
log:
  enabled: true
  file: /var/log/AdGuardHome/AdGuardHome.log
  max_backups: 30
  max_size: 10
  max_age: 31
  compress: false
  local_time: false
  verbose: false

This is very recently, before I had:
log:
  enabled: true
  file: /var/log/AdGuardHome/AdGuardHome.log
  max_backups: 3
  max_size: 100
  max_age: 3
  compress: false
  local_time: false
  verbose: false

but I realised I wanted to rotate earlier and not have 100 MB files. I have just recently made the change so will need to keep an eye on successful rotation.
So, take backup, make your desired changes, restart AdGH from : System: Diagnostics: Services. Read the new log file to see it starting. Keep an eye to make sure the log files are growing and rotating as expected.
More info on settings https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration


Awesome, thank you! That should help a ton with troubleshooting. I've got it logging now and will monitor.
Title: Re: 24.7.10_1 issues with AdGuard Home
Post by: cookiemonster on December 04, 2024, 11:57:04 PM
Nice.