Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AdGuard not running after power outage #4309

Closed
gyCfjSnO opened this issue Feb 18, 2022 · 15 comments
Closed

AdGuard not running after power outage #4309

gyCfjSnO opened this issue Feb 18, 2022 · 15 comments
Labels
snap Snap-related issues

Comments

@gyCfjSnO
Copy link

gyCfjSnO commented Feb 18, 2022

Just had a power outage in our neighbourhood which caused the computer running AdGuard Home to power off.

When power was restored we had no internet so I checked the computer running AdGuard Home and it running as when I checked sudo systemcpl AdGuard Home was red and it had a red dot before the name, the web address wasn't accessible either.

Running sudo snap restart AdGuard-home made it run again giving access to the internet.

Can you please help me with instructions on how I can find out in the logs what caused AdGuard Home not to run?

I'm running Debian 11 on 4th Gen Intel i5 and AdGuard Home is version v0.108.0-b.3.

@EugeneOne1
Copy link
Member

@gyCfjSnO, hello. See the wiki page.

So the AGH has successfully restarted and continued working?

@EugeneOne1 EugeneOne1 added the waiting for data Waiting for users to provide more data. label Feb 18, 2022
@gyCfjSnO
Copy link
Author

@gyCfjSnO, hello. See the wiki page.

So the AGH has successfully restarted and continued working?

When I restarted it via snap it started working. Wanting to find out why it didn't start in the first place after a power outage as it's the first time it hasn't come back to life after a power outage.

I will check the logs and post back.

@gyCfjSnO
Copy link
Author

@gyCfjSnO, hello. See the wiki page.

So the AGH has successfully restarted and continued working?

These are the logs I pulled, looks like it's only logs from after I restarted it.

2022-02-18T17:15:24+10:00 adguard-home.adguard-home[4066]: 2022/02/18 17:15:24.672831 [info] Starting the DNS proxy server
2022-02-18T17:15:24+10:00 adguard-home.adguard-home[4066]: 2022/02/18 17:15:24.672851 [info] The server is configured to refuse ANY requests
2022-02-18T17:15:24+10:00 adguard-home.adguard-home[4066]: 2022/02/18 17:15:24.672855 [info] DNS cache is enabled
2022-02-18T17:15:24+10:00 adguard-home.adguard-home[4066]: 2022/02/18 17:15:24.672861 [info] MaxGoroutines is set to 300
2022-02-18T17:15:24+10:00 adguard-home.adguard-home[4066]: 2022/02/18 17:15:24.672868 [info] Creating the UDP server socket
2022-02-18T17:15:24+10:00 adguard-home.adguard-home[4066]: 2022/02/18 17:15:24.672927 [info] Listening to udp://192.168.0.2:53
2022-02-18T17:15:24+10:00 adguard-home.adguard-home[4066]: 2022/02/18 17:15:24.672931 [info] Creating a TCP server socket
2022-02-18T17:15:24+10:00 adguard-home.adguard-home[4066]: 2022/02/18 17:15:24.672971 [info] Listening to tcp://192.168.0.2:53
2022-02-18T17:15:24+10:00 adguard-home.adguard-home[4066]: 2022/02/18 17:15:24.673039 [info] Entering the UDP listener loop on 192.168.0.2:53
2022-02-18T17:15:24+10:00 adguard-home.adguard-home[4066]: 2022/02/18 17:15:24.673055 [info] Entering the tcp listener loop on 192.168.0.2:53

@ainar-g
Copy link
Contributor

ainar-g commented Feb 18, 2022

There isn't anything wrong with these logs, really. The logs from the time of actual outage could shed more light. Also, what kind of upstream server did you use? Any DoH/DoQ/DoT ones?

@gyCfjSnO
Copy link
Author

gyCfjSnO commented Feb 27, 2022

Had another power outage and AdGuard didn't come back up.

htpc@HTPC:~$ sudo snap logs adguard-home
2022-02-27T19:18:39+10:00 adguard-home.adguard-home[1748]: 2022/02/27 19:18:39.695214 [fatal] couldn't start forwarding DNS server: listening to udp socket: listen udp 192.168.0.2:53: bind: cannot assign requested address
2022-02-27T19:18:39+10:00 systemd[1]: snap.adguard-home.adguard-home.service: Main process exited, code=exited, status=1/FAILURE
2022-02-27T19:18:39+10:00 systemd[1]: snap.adguard-home.adguard-home.service: Failed with result 'exit-code'.
2022-02-27T19:18:39+10:00 systemd[1]: snap.adguard-home.adguard-home.service: Consumed 1.889s CPU time.
2022-02-27T19:18:40+10:00 systemd[1]: snap.adguard-home.adguard-home.service: Scheduled restart job, restart counter is at 10.
2022-02-27T19:18:40+10:00 systemd[1]: Stopped Service for snap application adguard-home.adguard-home.
2022-02-27T19:18:40+10:00 systemd[1]: snap.adguard-home.adguard-home.service: Consumed 1.889s CPU time.
2022-02-27T19:18:40+10:00 systemd[1]: snap.adguard-home.adguard-home.service: Start request repeated too quickly.
2022-02-27T19:18:40+10:00 systemd[1]: snap.adguard-home.adguard-home.service: Failed with result 'exit-code'.
2022-02-27T19:18:40+10:00 systemd[1]: Failed to start Service for snap application adguard-home.adguard-home.

@gyCfjSnO
Copy link
Author

My understand, I could be wrong, is that the AdGuard snap is booting before the PC is getting an IP and that is why it isn't starting correctly. Could this be resolved by running the AdGuard snap after everything has loaded during boot? I couldn't seem to find any commands on how to do this.

@gyCfjSnO
Copy link
Author

gyCfjSnO commented Mar 9, 2022

There isn't anything wrong with these logs, really. The logs from the time of actual outage could shed more light. Also, what kind of upstream server did you use? Any DoH/DoQ/DoT ones?

I have tried seeking assistance over at the Snap forums but have been unsuccessful so far.

https://forum.snapcraft.io/t/adguard-home-snap-not-loading-after-power-outage/28926

@ainar-g
Copy link
Contributor

ainar-g commented Mar 9, 2022

Apologies for absence of responses from our side. Unfortunately, I'm not sure if I can be of any help with the interaction between snapd, systemd, and AdGuard Home. The two things that you could possibly try are:

  1. Edit the resulting .service file to add some kind of pre-launch sleep.

  2. Install AGH as a binary as opposed to a Snapcraft package and see if the situation improves.

@gyCfjSnO
Copy link
Author

Apologies for absence of responses from our side. Unfortunately, I'm not sure if I can be of any help with the interaction between snapd, systemd, and AdGuard Home. The two things that you could possibly try are:

  1. Edit the resulting .service file to add some kind of pre-launch sleep.
  2. Install AGH as a binary as opposed to a Snapcraft package and see if the situation improves.

Removing AGH snap, and installing via GitHub has resolved the issue... 😂 haha

@ainar-g ainar-g added the snap Snap-related issues label Mar 10, 2022
@ainar-g
Copy link
Contributor

ainar-g commented Mar 10, 2022

Thanks for testing! I would say that that most probably means that the issue is not with AGH, or at least not directly. If you still want a contained solution, you could try the Docker image. Otherwise, you could probably just use the simple binary package.

@stale
Copy link

stale bot commented Jun 13, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jun 13, 2022
@Birbber Birbber removed the waiting for data Waiting for users to provide more data. label Sep 1, 2022
@stale stale bot removed the wontfix label Sep 1, 2022
@Birbber
Copy link

Birbber commented Sep 1, 2022

Closing this issue as completed.

@Birbber Birbber closed this as completed Sep 1, 2022
@nick191007
Copy link

i am not sure if am at the right place to share my issue but it seem i am having the similar issue. where in my Raspberry pi 4 has ad guard Home over it. when ever there is a power outage i am able to ssh it but no internet until i reboot the system (Pi) for the internet to work again.

installed OS :- Pi lite Version.
ad guard Home

not sure how to get the log file as am new to it.

@ainar-g
Copy link
Contributor

ainar-g commented Sep 14, 2022

@nick191007, this issue is rather old, so if you feel like this is a bug in AGH, please file a new one, filling all template fields. You can also try to debug the issue yourself by enabling and inspecting the verbose logs as well as your OS's logs (journalctl etc.).

@nick191007
Copy link

@ainar-g thanks for the quick update will try to debug it and share any update on new one if any.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
snap Snap-related issues
Projects
None yet
Development

No branches or pull requests

5 participants