jwigley / docker-smokeping-speedtest

Docker image containing smokeping with speedtest-cli and smokeping-speedtest probe
GNU General Public License v3.0
15 stars 7 forks source link

ERROR: output of '/usr/bin/dig localhost' does not match (?^i:query time:\s+([0-9.]+)\smsec.*) #3

Closed stmps closed 3 years ago

stmps commented 3 years ago

Hello there! Thanks for this image 👍 :)

It looks like an IPv6 entry in /etc/resolv.conf causes the container start-up process to bomb out.

Logs in stdout show that it gets stuck in a loop:

ERROR: output of '/usr/bin/dig localhost' does not match (?^i:query time:\s+([0-9.]+)\smsec.*)
 at (eval 58) line 1.

ERROR: output of '/usr/bin/dig localhost' does not match (?^i:query time:\s+([0-9.]+)\smsec.*)
 at (eval 60) line 1.

### parsing /usr/local/bin/speedtest-cli output... OK (version 2.1.2)
### parsing /usr/local/bin/speedtest-cli output... OK (version 2.1.2)
ERROR: output of '/usr/bin/dig localhost' does not match (?^i:query time:\s+([0-9.]+)\smsec.*)
 at (eval 64) line 1.

### parsing /usr/local/bin/speedtest-cli output... OK (version 2.1.2)
### parsing /usr/local/bin/speedtest-cli output... OK (version 2.1.2)

[ ... etc]

Inside the container, my /etc/resolv.conf looks like this:

search gateway
nameserver 10.0.2.3
nameserver 10.0.0.138
nameserver fe80::1213:31ff:fe1e:7f88%eth0

As a temporary workaround, if I delete the last line (with the IPv6 link-local address), then the smokeping process breaks out of the loop and continues happily along. The service works fine after that.

### parsing dig output...OK
Smokeping version 2.007003 successfully launched.
Entering multiprocess mode.
Child process 339 started for probe FPing.
Child process 340 started for probe speedtest-upload.
Child process 341 started for probe speedtest-download.
Child process 342 started for probe DNS.
All probe processes started successfully.

Unfortunately, /etc/resolv.conf seems to get re-created when restarting the container, so I have to perform the workaround every reboot or container restart.

My system is CentOS Linux release 8.2.2004 (Core), running a non-root container in podman.

jwigley commented 3 years ago

Thanks for reporting the issue (and sorry I'm pretty late replying!).

I'm guessing this is probably something that'd need to be addressed in the https://github.com/linuxserver/docker-smokeping base image.

I'm glad you at least have a workaround. Not sure if it'd fit with your setup, but you could use a volume to override /etc/resolv.conf with your own set of nameservers. It then will use that rather than creating a new file on start up.

github-actions[bot] commented 3 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed.