AdguardTeam / AdGuardHome

Network-wide ads & trackers blocking DNS server
https://adguard.com/adguard-home.html
GNU General Public License v3.0
25.5k stars 1.83k forks source link

issue in logs on edge #5631

Closed JohnFawkes closed 1 year ago

JohnFawkes commented 1 year ago

Prerequisites

Operating system type

Linux, Other (please mention the version in the description)

CPU architecture

AMD64

Installation

Docker

Setup

On one machine

AdGuard Home version

Edge

Description

What did you do?

Updated

Additional information

Checking logs after trying to access the webui throws this error in the logs and webui now returns a 502 bad gateway error

panic: runtime error: slice bounds out of range [:1] with length 0 goroutine 97 [running]: github.com/AdguardTeam/dnsproxy/proxy.(Proxy).LookupIPAddr(0x8?, {0x190c0d6?, 0x10?}) github.com/AdguardTeam/dnsproxy@v0.48.0/proxy/lookup.go:37 +0x611 github.com/AdguardTeam/AdGuardHome/internal/dnsforward.(Server).Resolve(0x190c0d6?, {0x190c0d6?, 0xc01c0c78b0?}) github.com/AdguardTeam/AdGuardHome/internal/dnsforward/dnsforward.go:251 +0xc6 github.com/AdguardTeam/AdGuardHome/internal/home.customDialContext({0x191a518, 0xc0001165a0}, {0xdaa5ac, 0x3}, {0x190c0d6, 0x1}) github.com/AdguardTeam/AdGuardHome/internal/home/home.go:898 +0x185 net/http.(Transport).dial(0xc00032e870?, {0x191a518?, 0xc0001165a0?}, {0xdaa5ac?, 0xdaa087?}, {0x190c0d6?, 0xc000400140?}) net/http/transport.go:1170 +0xda net/http.(Transport).dialConn(0xc0003aa000, {0x191a518, 0xc0001165a0}, {{}, 0xc00032e870, {0xc000400140, 0x5}, {0xc000e3c000, 0x19}, 0x0}) net/http/transport.go:1608 +0x83f net/http.(Transport).dialConnFor(0x99b4c6?, 0xc0005de0b0) net/http/transport.go:1450 +0xb0 created by net/http.(Transport).queueForDial net/http/transport.go:1419 +0x3f2

ainar-g commented 1 year ago

Thanks for reporting, we're looking into it.

EugeneOne1 commented 1 year ago

@JohnFawkes, hello. We seem to find the reason of panic. It most probably caused by URL of one of the configured filters, which either doesn't contain hostname, or represents a path to file while also being a valid URL. You may temporarily exclude such list from your configuration or properly specify the hostname into its URL. This would also be very helpful if you'll share your findings and let us take a look at the particular case.

The fix for this is expected later today for the edge channel.

EugeneOne1 commented 1 year ago

@JohnFawkes, the latest build is uploaded to the edge channel. Could you please check if it fixes the panic with the configuration you have?

JohnFawkes commented 1 year ago

@EugeneOne1 it doesnt seem to have fixed it. its v0.108.0-a.466+9f7a582d. I did remove some filters as well but the error is spamming the logs. Its basically doing a loop where it tries to start and throws the error and starts again. Do you want me to send you my yaml file?

JohnFawkes commented 1 year ago

Ive been running this config for about a year now btw with no issues until recently. Like within the past week

JohnFawkes commented 1 year ago

So i deleted the container and recreated it and it is working now but my logs are spammed with all of my lists with this

2023/03/24 16:47:14.394467 [info] requesting filter from https://raw.githubusercontent.com/hoshsadiq/adblock-nocoin-list/master/hosts.txt, skip: Get "https://raw.githubusercontent.com/hoshsadiq/adblock-nocoin-list/master/hosts.txt": proxyconnect tcp: resolving "": host is empty

What exactly am I supposed to use for host? A direct link to the file used to work fine

EugeneOne1 commented 1 year ago

@JohnFawkes, well, it looks weird and unfortunately we can't reproduce it. Could you please help us troubleshoot the issue and collect verbose log. You may send it to our e-mail devteam@adguard.com, with the issue number in the subject.

JohnFawkes commented 1 year ago

@EugeneOne1 sent the verbose log to the email

devipasigner commented 1 year ago

@EugeneOne1 sent the verbose log to the email

nothing to do with the actual issue but, I recommend you use AdBlock or "AdGuard" style lists in AdGuard Home instead of domains/hosts.

JohnFawkes commented 1 year ago

Actually it looks like the filters finally updated. So weird. The logs aren't spammed with that error either about hosts

JohnFawkes commented 1 year ago

domains/hosts.

I do. The one in the error message I copied the wrong link and already fixed it. It was just the first of the error messages that I saw so I copied it

EugeneOne1 commented 1 year ago

@JohnFawkes, I presume the issue can be closed for now. If the error will appear again, could you please try to capture it within verbose log? The update can be enforced by moving files from /data/filters directory