plaintextpackets / netprobe_lite

Simple internet performance tester written in Python
625 stars 126 forks source link

netprobe speedtest not working #53

Open Kalpha02 opened 4 months ago

Kalpha02 commented 4 months ago

netprobe-speedtest (ver. 1.4.2) is not working and trying to restart all the time. netprobe was running with default docker compose

plaintextpackets commented 4 months ago

Can you provide more detail, including logs from the console?

Kalpha02 commented 4 months ago

I'm just dump. By default the enabled value is "False". I don't know whether it's normal or not but if it's disabled it's trying to restart all the time

plaintextpackets commented 4 months ago

need more info than that, can you provide logs?

Zazucki commented 3 months ago

Here are some logs related to this issue. Just did a git clone and then docker compose up: https://0x0.st/Xq7o.txt

plaintextpackets commented 3 months ago

Looks like the problem is with your Netprobe-probe container. Do you have internet access from the host?

Here's a test:

When docker is running, run "docker exec -it netprobe-probe /bin/bash'

This will take you to a linux terminal within the probe container

From there try pinging google.com or 8.8.8.8. (ping google.com OR ping 8.8.8.8)

See if that works. If it doesn't there may be other network issues in your Docker host

Zazucki commented 3 months ago

Blew out all the volumes and images and re-pulled them. Same issue, when testing ping within the container, they respond by IP but not by domain name:

root@b8e7ea4ac59a:/netprobe_lite# ping google.com
ping: google.com: Temporary failure in name resolution
root@b8e7ea4ac59a:/netprobe_lite# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=63 time=3.44 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=63 time=3.23 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=63 time=3.41 ms
^C
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2004ms
rtt min/avg/max/mdev = 3.227/3.357/3.435/0.092 ms
root@b8e7ea4ac59a:/netprobe_lite# ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
64 bytes from 1.1.1.1: icmp_seq=1 ttl=63 time=4.12 ms
64 bytes from 1.1.1.1: icmp_seq=2 ttl=63 time=3.87 ms
64 bytes from 1.1.1.1: icmp_seq=3 ttl=63 time=6.27 ms
^C
--- 1.1.1.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2005ms
rtt min/avg/max/mdev = 3.872/4.754/6.272/1.077 ms

Additionally, everything was working fine until I switched to the new release. I'm just testing the software out, so I deleted everything and started over to get to the new version.

plaintextpackets commented 3 months ago

In your compose.yaml file, remove these lines and re-test:

speedtest: restart: always container_name: netprobe-speedtest image: "plaintextpackets/netprobe:latest" pull_policy: always volumes:

These lines manually set the DNS used by this container to Google. This was new in the latest releases.

Zazucki commented 3 months ago

I removed that line and now pinging from inside the container works, both IP and domain. Still see this in the logs though: (and speedtest container still restarts constantly)

netprobe-speedtest exited with code 0
netprobe-speedtest exited with code 0
netprobe-speedtest exited with code 0
netprobe-probe         | Error performing DNS resolution on ('CloudFlare_DNS', '1.1.1.1')Error performing DNS resolution on ('Quad9_DNS', '9.9.9.9')Error performing DNS resolution on ('My_DNS_Server', '8.8.8.8')
netprobe-probe         | All nameservers failed to answer the query google.com. IN A: Server Do53:9.9.9.9@53 answered SERVFAIL
netprobe-probe         | All nameservers failed to answer the query google.com. IN A: Server Do53:1.1.1.1@53 answered SERVFAIL
netprobe-probe         | Error performing DNS resolution on ('Google_DNS', '8.8.8.8')All nameservers failed to answer the query google.com. IN A: Server Do53:8.8.8.8@53 answered SERVFAIL
netprobe-probe         | All nameservers failed to answer the query google.com. IN A: Server Do53:8.8.8.8@53 answered SERVFAIL
netprobe-probe         | Error performing DNS resolution on ('Google_DNS', '8.8.8.8')Error performing DNS resolution on ('Quad9_DNS', '9.9.9.9')
netprobe-probe         | All nameservers failed to answer the query google.com. IN A: Server Do53:9.9.9.9@53 answered SERVFAIL
netprobe-probe         | All nameservers failed to answer the query google.com. IN A: Server Do53:8.8.8.8@53 answered SERVFAIL
netprobe-probe         | Error performing DNS resolution on ('CloudFlare_DNS', '1.1.1.1')
netprobe-probe         | All nameservers failed to answer the query google.com. IN A: Server Do53:1.1.1.1@53 answered SERVFAIL
netprobe-probe         | Error performing DNS resolution on ('My_DNS_Server', '8.8.8.8')
netprobe-probe         | All nameservers failed to answer the query google.com. IN A: Server Do53:8.8.8.8@53 answered SERVFAIL
netprobe-grafana       | logger=infra.usagestats t=2024-06-05T21:24:59.478110578Z level=info msg="Usage stats are ready to report"
netprobe-probe         | Error performing DNS resolution on ('CloudFlare_DNS', '1.1.1.1')Error performing DNS resolution on ('My_DNS_Server', '8.8.8.8')Error performing DNS resolution on ('Quad9_DNS', '9.9.9.9')
netprobe-probe         | All nameservers failed to answer the query google.com. IN A: Server Do53:9.9.9.9@53 answered SERVFAILError performing DNS resolution on ('Google_DNS', '8.8.8.8')

On the bright side, no more "divide by zero" error, either.

securedpackets commented 3 months ago

Try removing those DNS lines from the rest of the containers in the compose file

On Wed, Jun 5, 2024 at 5:30 PM Zazucki @.***> wrote:

I removed that line and now pinging from inside the container works, both IP and domain. Still see this in the logs though:

netprobe-speedtest exited with code 0 netprobe-speedtest exited with code 0 netprobe-speedtest exited with code 0 netprobe-probe | Error performing DNS resolution on ('CloudFlare_DNS', '1.1.1.1')Error performing DNS resolution on ('Quad9_DNS', '9.9.9.9')Error performing DNS resolution on ('My_DNS_Server', '8.8.8.8') netprobe-probe | All nameservers failed to answer the query google.com. IN A: Server @. answered SERVFAIL netprobe-probe | All nameservers failed to answer the query google.com. IN A: Server @. answered SERVFAIL netprobe-probe | Error performing DNS resolution on ('Google_DNS', '8.8.8.8')All nameservers failed to answer the query google.com. IN A: Server @. answered SERVFAIL netprobe-probe | All nameservers failed to answer the query google.com. IN A: Server @. answered SERVFAIL netprobe-probe | Error performing DNS resolution on ('Google_DNS', '8.8.8.8')Error performing DNS resolution on ('Quad9_DNS', '9.9.9.9') netprobe-probe | All nameservers failed to answer the query google.com. IN A: Server @. answered SERVFAIL netprobe-probe | All nameservers failed to answer the query google.com. IN A: Server @. answered SERVFAIL netprobe-probe | Error performing DNS resolution on ('CloudFlare_DNS', '1.1.1.1') netprobe-probe | All nameservers failed to answer the query google.com. IN A: Server @. answered SERVFAIL netprobe-probe | Error performing DNS resolution on ('My_DNS_Server', '8.8.8.8') netprobe-probe | All nameservers failed to answer the query google.com. IN A: Server @. answered SERVFAIL netprobe-grafana | logger=infra.usagestats t=2024-06-05T21:24:59.478110578Z level=info msg="Usage stats are ready to report" netprobe-probe | Error performing DNS resolution on ('CloudFlare_DNS', '1.1.1.1')Error performing DNS resolution on ('My_DNS_Server', '8.8.8.8')Error performing DNS resolution on ('Quad9_DNS', '9.9.9.9') netprobe-probe | All nameservers failed to answer the query google.com. IN A: Server @.*** answered SERVFAILError performing DNS resolution on ('Google_DNS', '8.8.8.8')

On the bright side, no more "divide by zero" error, either.

— Reply to this email directly, view it on GitHub https://github.com/plaintextpackets/netprobe_lite/issues/53#issuecomment-2150994611, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIQ4XUMWDSUXIABUGTVBH63ZF57NZAVCNFSM6AAAAABIJBK7I2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJQHE4TINRRGE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Zazucki commented 3 months ago

Same logs, same issue. sorry :(

plaintextpackets commented 3 months ago

Looks like for some reason when the code runs it's failing to either resolve DNS or ping. Do you have some kind of firewall?

Zazucki commented 3 months ago

Logs from a different machine on a different network, with the dns lines removed: https://0x0.st/XqCr.txt No firewalls that I know of that would be blocking DNS, DNS works on the host as well. It let me log in to the Grafana UI, but there were no dashboards, also.

Zazucki commented 3 months ago

I used docker network inspect on the netprobe-net and the default bridge networks, they are similar aside from these differences, which I do not know enough to say if they matter: https://0x0.st/XqCH.txt

Specifically the "Options": { section being different is all that seems relevant.

plaintextpackets commented 3 months ago

Logs from a different machine on a different network, with the dns lines removed: https://0x0.st/XqCr.txt No firewalls that I know of that would be blocking DNS, DNS works on the host as well. It let me log in to the Grafana UI, but there were no dashboards, also.

Did this machine work? I assume not, but I don't see any errors reported in the log

Zazucki commented 3 months ago

Did this machine work? I assume not, but I don't see any errors reported in the log

No, but for some reason it didn't put me at the dashboard automatically but after selecting it manually all seem normal except the DNS and speedtest portions. All of the DNS sections were removed from the compose file for these tests as well.

bobalbion commented 2 months ago

i get the same issue. no logs as constantly restarting. removed dns entries for speedtest container made no difference, all other modules/outputs work fine. "When docker is running, run "docker exec -it netprobe-probe /bin/bash' This will take you to a linux terminal within the probe container From there try pinging google.com or 8.8.8.8. (ping google.com OR ping 8.8.8.8)"

this is fine but i have stopped the speedtest container from starting altogether (just from within docker desktop).

bobalbion commented 2 months ago

SPEEDTEST_ENABLED="True" - this was set to false, when TRUE restart doesnt happen, so presume when "=false" it conflicts with the compose file "restart always" setting?

Kalpha02 commented 2 months ago

SPEEDTEST_ENABLED="True" - this was set to false, when TRUE restart doesnt happen, so presume when "=false" it conflicts with the compose file "restart always" setting?

The same was going on on my pc. It was simply set to false (which is the default configuration) and it always tried to restart the speedtest