Speedtest-cli error

When I run speedtest-cli, I get this.

Cannot retrieve speedtest configuration
ERROR: HTTP Error 403: Forbidden
1 Like

The problem cleared up. The server was down temporarily.

Hi, @fixit7 .

I've never ran speedtest-cli but, after a web search, I've found the following Reddit post (in the subreddit "r/Linux4noobs") that was posted 23 days ago:

https://www.reddit.com/r/linux4noobs/comments/w6d5hg/speedtestcli_only_works_with_secure/

In that Reddit post, the original poster ("u/CryPTuuNe") wrote the following:

"(...) I just setup Ubuntu on my new PC. For testing purposes I installed the speedtest-cli and with the command Speedtest everything worked fine. I don't know what I did then, but now I am getting an http error 403 forbidden. But when doing speedtest --secure everything works fine again. (...)"

According to the "speedtest-cli" manpage - Ubuntu Manpage: speedtest-cli - Command line interface for testing internet bandwidth using speedtest.net - the "--secure" switch has the following meaning:

--secure
Use HTTPS instead of HTTP when communicating with speedtest.net operated servers

I hope this helps.

7 Likes

Thanks ricmarques. I will use --secure from now on.

2 Likes

Thanks for finding this info. Now using --secure :slight_smile:

2 Likes

Hi, you can actually put speedtest.Speedtest(secure=1) like this,
hope it help, you guys help me ; )

1 Like

Hi, Ricmarques,
Thanks for your info.
With --secure, it works!

2 Likes

Thanks, Ricmarques, but my question is why we need add "--secure"?
I didn't do anything, I just reinstalled my PC, and then speedtest-cli can't work. And I must added "--secure" now, it's so wierd! This problem wastes my half day time. Why without "--secure" option, my original environment could work? The root cause is on the different version of "speedtest-cli"? I suspect so.

1 Like

Welcome @zhongzhong to our community!

1 Like

Thanks, speedtest-cli works with --secure option

2 Likes

Welcome @Nagendra_Daivajna to the community!

1 Like

Thanks for --secure.
I have only headless Debian and I noticed that speedtest with no secure was working yesterday with no error. Today I tried it with the error but --secure worked nicely.
What changed since yesterday is a new kernel published in apt repo.
After upgrade speedtest (no secure) started working as usual. Is that coincident?

1 Like

Welcome @Z_KC to the community!

speedtest-cli works fine w/o flags.

user@cw:~$ speedtest-cli 

Retrieving speedtest.net configuration...
Testing from Cox Communications (184.176.73.9)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by PhoenixNAP Global IT Services (Phoenix, AZ) [20.84 km]: 34.523 ms
Testing download speed................................................................................
Download: 467.51 Mbit/s
Testing upload speed......................................................................................................
Upload: 59.73 Mbit/s

user@cw:~$ 
1 Like