speedtest cli not running from cron

Started by simdim, November 27, 2023, 11:24:24 PM

Previous topic - Next topic
Hi All,
Attempting to run speedtest plugin from cron but getting the following error:

Script action failed with Command '/usr/local/bin/python3 /usr/local/opnsense/scripts/OPNsense/speedtest/opn_speedtest.py stat ' returned non-zero exit status 1. at Traceback (most recent call last): File "/usr/local/opnsense/service/modules/actions/script_output.py", line 44, in execute subprocess.check_call(script_command, env=self.config_environment, shell=True, File "/usr/local/lib/python3.9/subprocess.py", line 373, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '/usr/local/bin/python3 /usr/local/opnsense/scripts/OPNsense/speedtest/opn_speedtest.py stat ' returned non-zero exit status 1.

I have serverid specified as a parameter in cron entry

From cli and "run test" it runs just fine:

/usr/local/bin/python3 /usr/local/opnsense/scripts/OPNsense/speedtest/opn_speedtest.py 50854
{"timestamp": "2023-11-27T21:29:42Z", "clientip": "removed", "serverid": 50854, "servername": "123NET, Grand Rapids, MI", "country": "United States", "latency": 29.52, "download": 1338.73, "upload": 40.51, "link": "https://www.speedtest.net/result/c/removed"}

I am running:

OPNsense 23.7.9-amd64
FreeBSD 13.2-RELEASE-p5
OpenSSL 1.1.1w
os-speedtest-community (installed)   0.9_4   36.7KiB   N/A   mimugmail   Speedtest


I've got the same issue - did you ever find a solution to this?