Author Topic: speedtest-cli no longer working...or partially...why?  (Read 749 times)

Dariusz Piatkowski

  • Hero Member
  • *****
  • Thank You
  • -Given: 15
  • -Receive: 32
  • Posts: 991
  • Karma: +21/-0
    • View Profile
speedtest-cli no longer working...or partially...why?
« on: September 04, 2021, 06:19:01 pm »
Hi Everyone,

Just this morning I enabled streaming optimization on my router for a couple of media devices on our LAN, went to my OS/2 box to check the throughput using the speedtest-cli and discovered the following:

Code: [Select]
Selected Test Server :  20916

Retrieving speedtest.net configuration...
Traceback (most recent call last):
  File "speedtest-cli", line 2000, in <module>
    main()
  File "speedtest-cli", line 1986, in main
    shell()
  File "speedtest-cli", line 1875, in shell
    secure=args.secure
  File "speedtest-cli", line 1091, in __init__
    self.get_config()
  File "speedtest-cli", line 1174, in get_config
    map(int, server_config['ignoreids'].split(','))
ValueError: invalid literal for int() with base 10: ''

This is executing speedtest-cli v2.1.2 and python 2.7.6.

Off I went looking into this, found that 2.1.3 and 2.1.4b1 have been released. Discovered a fix for 2.1.2, applied and that got me further, but for the sake of running the updated stuff (in case there was something else causing the issue) I grabbed them both, and running the stable 2.1.3 I now see the following:

Code: [Select]
Selected Test Server :  20916

Retrieving speedtest.net configuration...
Testing from Managed Network Systems (216.8.146.248)...
Retrieving speedtest.net server list...
ERROR: No matched servers: 20916

...the problem here being that my local good-ol'-trusty ISP server is no longer selectable, although what's weird is that even if I issue the '--list' option to simply show me the speedtest servers I can connect to, at times (this is NOT consistent though) even if I select a listed server ID I still fail to actually successfully test with it...ughhh???!!!  ???

I subsequently spent a little time on-line (hmm, been a couple of hours already actually...LOL) but found no relevant info.

Worse yet, my ISP does certainly support testing through speedtest, they simply poing to the browser GUI (http://mnsi.speedtest.net/) and go from there. The problem is that browser GUI shows a throughput that's normally 4-5x slower than the CLI does, so from a stable & true results perspective it's really of no use (with our OS/2 browser that is).

Is anyone else seeing this?

Thanks!

Dave Yeo

  • Hero Member
  • *****
  • Thank You
  • -Given: 13
  • -Receive: 226
  • Posts: 3153
  • Karma: +59/-0
    • View Profile
Re: speedtest-cli no longer working...or partially...why?
« Reply #1 on: September 04, 2021, 07:53:21 pm »
I see the same error with 2.1.2, haven't tried a newer one or tried with Python 3 which might be a better environment with support for Python2 officially over.

Dave Yeo

  • Hero Member
  • *****
  • Thank You
  • -Given: 13
  • -Receive: 226
  • Posts: 3153
  • Karma: +59/-0
    • View Profile
Re: speedtest-cli no longer working...or partially...why?
« Reply #2 on: September 04, 2021, 08:01:52 pm »
I did
Code: [Select]
git clone https://github.com/sivel/speedtest-cli.gitand tested by directly running speedtest.py and it worked fine besides picking a weird server down in Washington State (400 km away) instead of closer.
Code: [Select]
E:\test\speedtest-cli>python speedtest.py
Retrieving speedtest.net configuration...
Testing from Telus Communications (209.53.249.194)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by City of Bellevue (Bellevue, WA) [400.47 km]: 101.5 ms
Testing download speed..........................................................
......................
Download: 24.12 Mbit/s
Testing upload speed............................................................
....................................
Upload: 6.11 Mbit/s

The current speeds are better then usual on this wireless LTE connection.

Dariusz Piatkowski

  • Hero Member
  • *****
  • Thank You
  • -Given: 15
  • -Receive: 32
  • Posts: 991
  • Karma: +21/-0
    • View Profile
Re: speedtest-cli no longer working...or partially...why?
« Reply #3 on: September 04, 2021, 08:48:52 pm »
Hi Dave!

I did
Code: [Select]
git clone https://github.com/sivel/speedtest-cli.gitand tested by directly running speedtest.py and it worked fine besides picking a weird server down in Washington State (400 km away) instead of closer.
Code: [Select]
E:\test\speedtest-cli>python speedtest.py
Retrieving speedtest.net configuration...
Testing from Telus Communications (209.53.249.194)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by City of Bellevue (Bellevue, WA) [400.47 km]: 101.5 ms
Testing download speed..........................................................
......................
Download: 24.12 Mbit/s
Testing upload speed............................................................
....................................
Upload: 6.11 Mbit/s

The current speeds are better then usual on this wireless LTE connection.

So on my end the 2.1.3 as well as the 2.1.4b1 version both work fine, provided that you let the speedtest machinery pick the best (normally the smallest ping I think) server to you.

However, attempting to specify a server, such as my ISP, that no longer appears to be in the public list (see '--list' option) fails.

I tried with the default 2.7.6 Python of ours, as well as 3.8 that Paul released a while back, both behave the same.

Looking into this further on, it almost appears as if the "public" speedtest server that was advertised by my ISP is no longer "visible", meaning, you can't simply hit it up through the CLI interface.

After all, relying on the currently returned list appears to work fine, here is an example:

Code: [Select]
[G:\util\misc]speedtest 1061

Quick script to execute a Python test against some speedtest.net servers:
            4861 - Quadro Comm (Kirkton, ON, Canada) [180.26 km]
           10727 - Mornington Comm (Milverton, ON, Canada) [221.74 km]
           22208 - Packetworks (Waterloo, ON, Canada) [242.06 km]
           18646 - NeuStyle Software & Sys (Waterloo, ON, Canada) [242.06 km]
            1061 - Netflash Internet (Kitchener, ON, Canada) [243.40 km]
           16046 - Cloudwifi (Kitchener, ON, Canada) [243.40 km]
            1317 - Wightman (Clifford, ON, Canada) [249.27 km]
           17341 - Cogeco Connexion Inc. (Burlington, ON, Canada) [286.63 km]
           23625 - System Lifeline (Brampton, ON, Canada) [309.31 km]
           37270 - Rogers Wireless (Mississauga, ON, Canada) [310.18 km]
DEFAULT => 20916 - MNSi Telecom (Windsor, ON) [3.93 km]

Selected Test Server :  1061

Retrieving speedtest.net configuration...
Testing from Managed Network Systems (216.8.146.248)...
Retrieving speedtest.net server list...
Retrieving information for the selected server...
Hosted by Netflash Internet (Kitchener, ON) [243.40 km]: 44.333 ms
Testing download speed..........................................................
......................
Download: 728.59 Mbit/s
Testing upload speed............................................................
....................................


Dariusz Piatkowski

  • Hero Member
  • *****
  • Thank You
  • -Given: 15
  • -Receive: 32
  • Posts: 991
  • Karma: +21/-0
    • View Profile
Re: speedtest-cli no longer working...or partially...why?
« Reply #4 on: September 04, 2021, 08:51:57 pm »
Aha!!!

Well, not quite an earth-shattering dsicovery, however it does apear that speedtest must now be using some kind of a round-robin (perhaps load-balancing???) configuration.

Having re-tried a number of times, and the 1061 server now returning an error (whereas literally 2 minutes ago it was fine), I was able to hit my local ISP (20916) and there was no problem in testing this.

FYI I suppose for everyone...

Dave Yeo

  • Hero Member
  • *****
  • Thank You
  • -Given: 13
  • -Receive: 226
  • Posts: 3153
  • Karma: +59/-0
    • View Profile
Re: speedtest-cli no longer working...or partially...why?
« Reply #5 on: September 05, 2021, 01:29:44 am »
Perhaps your ISP's server was down?
Running list here results in a list that looks sane besides that it puts Telus as 300 km away. Their headquarters (and Vancouver in general) is perhaps 70- 80 km by road.
Code: [Select]
Retrieving speedtest.net configuration...
 3049) TELUS (Vancouver, BC, Canada) [300.42 km]
16691) TeraGo Networks (Vancouver, BC, Canada) [300.42 km]
37272) Rogers Wireless (Vancouver, BC, Canada) [300.42 km]
41509) AEBC Internet (Vancouver, BC, Canada) [300.42 km]
40141) San Juan Cable (Bellingham, WA, United States) [304.78 km]
22154) Eastlink (Delta, BC, Canada) [308.77 km]
31110) City of Anacortes (Anacortes, WA, United States) [331.62 km]
 9551) Whidbey Telecom (Langley, WA, United States) [365.97 km]
 8008) JUCE Communications (Victoria, BC, Canada) [375.67 km]
12192) Nitel (Seattle, WA, United States) [405.28 km]
BTW, version reports,
Code: [Select]
speedtest-cli 2.1.4b1
Python 2.7.6 (default, May 16 2020, 17:42:14) [GCC 9.2.0 20190812 (OS/2 RPM build 9.2.0-4.oc00)]
« Last Edit: September 05, 2021, 01:32:22 am by Dave Yeo »