arevindh / pihole-speedtest

Pihole Speedtest Mod
https://arevindh.github.io/pihole-speedtest/
MIT License
219 stars 22 forks source link

Speedtest not running Manually or via Cronjob #184

Open arkdev1 opened 2 months ago

arkdev1 commented 2 months ago

Speedtest not running Manually or via Cronjob

Description

The system is failing to run speed tests, both when executed manually and via the configured cronjob. Despite multiple attempts, no speed test results are being generated. Below is the relevant section from the speedtest-run.log file for further analysis.

Log Output

root@pi-hole:~# cat /var/log/pihole/speedtest-run.log 
Running Test...
jq: error (at <stdin>:1): Cannot iterate over null (null)
jq: error (at <stdin>:1): Cannot iterate over null (null)
jq: error (at <stdin>:1): Cannot iterate over null (null)
jq: error (at <stdin>:1): Cannot iterate over null (null)
jq: error (at <stdin>:1): Cannot iterate over null (null)
jq: error: syntax error, unexpected ';' (Unix shell quoting issues?) at <top-level>, line 2:
    def walk(f): . as $in | if type == "object" then reduce keys_unsorted[] as $key ({}; . + { ($key):  ($in[$key] | walk(f)) }) | f else if type == "array" then map( walk(f) ) | f else f end;                                                                                                                                                                                               
jq: error: Possibly unterminated 'if' statement at <top-level>, line 2:
    def walk(f): . as $in | if type == "object" then reduce keys_unsorted[] as $key ({}; . + { ($key):  ($in[$key] | walk(f)) }) | f else if type == "array" then map( walk(f) ) | f else f end;                            
jq: 2 compile errors
Error: in prepare, near ",": syntax error
  44:05+00:00', 'Unknown', 'IPADDRESS', '', -1, , , , '');
                                      error here ---^

NB. IPADDRESS was my public ipv4.

I've manually installed the official speedtest cli of https://speedtest.net/. But after the cronjob start, it keep installing librespeed.

root@pi-hole:~# speedtest
Retrieving server list from https://librespeed.org/backend-servers/servers.php
Selecting the fastest server based on ping
Selected server: 
Sponsored by: 
You're testing from: {"processedString":"IPADDRESS - Unknown ISP","rawIspInfo":""}
Ping: 17.18 ms  Jitter: 0.95 ms
Download rate:  847.80 Mbps
Upload rate:    642.53 Mbps

Screenshot

image

NB. librespeed is selected always after the cronjob.

Steps to Reproduce

  1. Try running a manual speedtest command.
  2. Set up a cronjob to execute the speedtest periodically.

Expected Behavior

Speedtest should run as expected and provide network performance metrics.

Actual Behavior

No speedtest results are recorded in the log file, and the command seems to fail silently.

Environment

Additional Information

ipitio commented 2 months ago

Hi, thanks for reporting this bug! I think I caused it a few months ago, when I last refactored some code. I'll look into the issue soon.

arkdev1 commented 2 months ago

Hi @ipitio, thank you for the response. I'm waiting for your update—let me know if you need any more data/logs/information regarding the issue.

Side note: the Librespeed library reports a download and upload speed of about 1Gbps, but the actual speed is 2.5Gbps download and 1Gbps upload. I can't figure out why there’s such a strong downgrade in the reported speed.