AdGuardHome icon indicating copy to clipboard operation
AdGuardHome copied to clipboard

AdGuard Home enters crash loop due to duplicate instance causing port bind conflicts on 3000 and 443 (OpenWRT)

Open Shakura404 opened this issue 9 months ago • 3 comments

Prerequisites

Platform (OS and CPU architecture)

Linux, ARM64

Installation

Custom package (OpenWrt, HomeAssistant, etc; please mention in the description)

Setup

On a router, DHCP is handled by the router

AdGuard Home version

v0.107.72

Action

AdGuard Home running as a service on OpenWRT (procd managed). No manual restart was initiated at the time.

At 2026-02-26 17:15:03 the service attempted to start again while an existing AdGuard Home process was already running.

Environment: • AdGuard Home v0.107.72 • OpenWRT (procd service manager) • Running behind Caddy • TLS disabled in adguardhome.yaml • sysntpd active • Standard DNS on :53 • Web UI configured on :3000

Expected result

If AdGuard Home is already running:

  • procd should not start a second instance
  • The second instance should exit cleanly without entering a crash loop

Service should remain stable and DNS should continue functioning without interruption.

Actual result

A second AdGuard Home instance was started while another instance (PID 3685) was already running.

The new instance (PID 4498) attempted to bind:

  • 0.0.0:3000
  • 0.0.0.0:443

Both ports were already in use by the existing AGH process.

This caused repeated panics:

listen tcp 0.0.0.0:3000: bind: address already in use https: listen tcp 0.0.0.0:443: bind: address already in use

Stack trace shows failure inside:

internal/home.(*webAPI).serveTLS internal/home.(*webAPI).start

procd then reported: Instance AdGuardHome::instance1 in a crash loop 6 crashes

During this crash loop DNS service became unstable and the network lost internet connectivity.

End users experienced no internet access during this period.

Additional information and/or screenshots

Excerpt from logs (timestamp 2026-02-26 17:15:03):

AdGuardHome[4498]: starting adguard home
AdGuardHome[4498]: go to http://127.0.0.1:3000
AdGuardHome[4498]: go to https://127.0.0.1:443
AdGuardHome[4498]: starting plain server addr=0.0.0.0:3000
AdGuardHome[4498]: starting https server
AdGuardHome[4498]: listen tcp 0.0.0.0:3000: bind: address already in use
AdGuardHome[4498]: https: listen tcp 0.0.0.0:443: bind: address already in use
procd: Instance AdGuardHome::instance1 in a crash loop

Observations:

  • Another AGH process (PID 3685) was already running and continued running after the crash loop.
  • TLS was set to disabled in the YAML configuration.
  • Both 3000 and 443 were already bound by the first AGH instance.
  • Service manager (procd) appears to have triggered a second start unexpectedly.

Impact:

  • DNS interruptions
  • Temporary loss of internet access for LAN clients

Shakura404 avatar Feb 27 '26 02:02 Shakura404

You should report this in OpenWrt packages. Looks like something to do with procd.

GeorgeSapkin avatar Feb 28 '26 11:02 GeorgeSapkin

Hi, thanks for the report. Could you please confirm whether the issue still persists?

From the logs, this does not look like an AdGuard Home issue itself. The important part is that another AdGuard Home process was already running, and then procd started a second instance of the same service.

The second process then tried to bind the same ports (:3000 and :443), which were already occupied by the first AdGuard Home process, so it failed with address already in use and entered a restart/crash loop managed by procd.

So the root cause seems to be in the OpenWrt service/package setup or procd supervision logic that allowed a duplicate instance to be started. Please report this to the OpenWrt package maintainers or check the init script/service configuration.

GulnazSalakhova avatar Jun 16 '26 12:06 GulnazSalakhova

We didn't wait for an answer from you. I'm going to close this issue. Feel free to reopen if the problem comes back

GulnazSalakhova avatar Jul 27 '26 10:07 GulnazSalakhova