TechnitiumSoftware / DnsServer

Technitium DNS Server
https://technitium.com/dns/
GNU General Public License v3.0
4.47k stars 431 forks source link

DNS App Store Timeout #875

Closed whi-tw closed 8 months ago

whi-tw commented 8 months ago

Hullo,

Running version 12.0.1 in docker:

  technitium:
    restart: unless-stopped
    image: technitium/dns-server:latest
    hostname: technitium.redacted.internal
    networks:
      container_vlan:
        ipv4_address: "${IPV4_ADGUARDHOME}"
        ipv6_address: "${IPV6_ADGUARDHOME}"
    dns:
      - 1.1.1.1
    healthcheck:
      test: ["CMD-SHELL", "nslookup cloudflare.com ${IPV4_ADGUARDHOME}"]
      interval: 30s
      timeout: 30s
      retries: 3
      start_period: 10s
    volumes:
      - ./technitium:/etc/dns
      - /etc/localtime:/etc/localtime:ro
    environment:
      TZ: Europe/London
      DNS_SERVER_DOMAIN: technitium.redacted.internal
      DNS_SERVER_PREFER_IPV6: "true"
    sysctls:
      - net.ipv4.ip_local_port_range=1024 65535

container_vlan is a macvlan network with ipv4 and ipv6 available.

When I click "App Store" on the Apps tab, the DNS App Store modal opens, I get the spinner, then after 30 seconds the API request to /api/apps/listStoreApps times out with response:

{
    "status": "error",
    "errorMessage": "The operation has timed out.",
    "stackTrace": "   at TechnitiumLibrary.TaskExtensions.WithTimeout[T](Task\u00601 task, Int32 timeout) in Z:\\Technitium\\Projects\\TechnitiumLibrary\\TechnitiumLibrary\\TaskExtensions.cs:line 46\n   at DnsServerCore.WebServiceAppsApi.ListStoreApps(HttpContext context) in Z:\\Technitium\\Projects\\DnsServer\\DnsServerCore\\WebServiceAppsApi.cs:line 386\n   at DnsServerCore.DnsWebService.WebServiceApiMiddleware(HttpContext context, RequestDelegate next) in Z:\\Technitium\\Projects\\DnsServer\\DnsServerCore\\DnsWebService.cs:line 591\n   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.\u003CInvoke\u003Eg__Awaited|10_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task)"
}

The same message appears in the log:

[2024-03-03 14:51:21 UTC] System.TimeoutException: The operation has timed out.
   at TechnitiumLibrary.TaskExtensions.WithTimeout[T](Task`1 task, Int32 timeout) in Z:\Technitium\Projects\TechnitiumLibrary\TechnitiumLibrary\TaskExtensions.cs:line 46
   at DnsServerCore.WebServiceAppsApi.ListStoreApps(HttpContext context) in Z:\Technitium\Projects\DnsServer\DnsServerCore\WebServiceAppsApi.cs:line 386
   at DnsServerCore.DnsWebService.WebServiceApiMiddleware(HttpContext context, RequestDelegate next) in Z:\Technitium\Projects\DnsServer\DnsServerCore\DnsWebService.cs:line 591
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.<Invoke>g__Awaited|10_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task)

I can both resolve go.technitium.com and can curl https://go.technitium.com/?id=44 from within the container, from the host and on machines with the technitium instances as a resolver:

❯ docker compose exec -it technitium dig +short go.technitium.com
technitium.com.
139.59.3.235
❯ dig +short go.technitium.com
technitium.com.
139.59.3.235

Do y'all have any ideas?

ShreyasZare commented 8 months ago

Thanks for the post. This seems to be installation specific problem so will need to be debugged in details. I would suggest that you run packet capture using tcpdump on the container and analyze the file in Wireshark. This will give you insights on what is really happening at the network level. Do share the pcap file with support@technitium.com if you need help with analysis.