Coder Social home page Coder Social logo

Comments (14)

maddie avatar maddie commented on September 6, 2024 2

Hmm, maybe I can add an option to disable ICMP ping entirely to see it helps.

from speedtest-cli.

maddie avatar maddie commented on September 6, 2024 1

There shouldn't be any different for the binary to be built anywhere.

  • Are you using the official server list, or you're using your own?
  • Have you tried to wait it out to see if it actually finishes?

The CLI pings all the servers in the list to get the fastest one, so it might take some time to finish. The server list isn't too big (at least for now), so I haven't done anything special to filter out only the fastest ones to try (i.e. using distance).

from speedtest-cli.

maddie avatar maddie commented on September 6, 2024 1

@dbrennand Can you try compile from source and use option --no-icmp and try again?

Thanks.

from speedtest-cli.

dbrennand avatar dbrennand commented on September 6, 2024

Hi @maddie

Thanks for the response 👍🏻

  • I’m using the official server list.
  • I will wait it out for around 10 minutes? Surely it shouldn’t take much longer than that?

I will report back 🙂

Many Thanks.

from speedtest-cli.

maddie avatar maddie commented on September 6, 2024

From my end (in China, which should be pretty slow accessing the official servers), pinging the servers takes a couple of minutes. It shouldn't take very long, since it tries to ping each server once (ICMP) or 3 times (via HTTP), 10 servers at a time.

If it really takes a very long time, it's most likely a bug 😅

from speedtest-cli.

dbrennand avatar dbrennand commented on September 6, 2024

Hi again @maddie

Looking at past issues, this looks almost identical to #12

When running --verbose the following errors are shown:

/ # ./librespeed --telemetry-level disabled --verbose
Retrieving server list from https://librespeed.org/backend-servers/servers.php
Selecting the fastest server based on ping
Failed to ping target host: socket: permission denied
Will try TCP ping
Failed to ping target host: socket: permission denied
Will try TCP ping
Failed to ping target host: socket: permission denied
Will try TCP ping
Failed to ping target host: socket: permission denied
Will try TCP ping
Failed to ping target host: socket: permission denied
Will try TCP ping
Failed to ping target host: socket: permission denied
Will try TCP ping
Failed to ping target host: socket: permission denied
Will try TCP ping
Failed to ping target host: socket: permission denied
Will try TCP ping
Failed to ping target host: socket: permission denied
Will try TCP ping
Failed to ping target host: socket: permission denied
Will try TCP ping
Failed to ping target host: socket: permission denied
Will try TCP ping
Failed to ping target host: socket: permission denied
Will try TCP ping
Failed to ping target host: socket: permission denied
Will try TCP ping
Failed to ping target host: socket: permission denied
Will try TCP ping
Failed to ping target host: socket: permission denied
Will try TCP ping
Server New York, United States (1) (BuyVM) (ny1.backend.librespeed.nixnet.services) doesn't seem to be up, skipping
Failed to ping target host: socket: permission denied
Will try TCP ping
Failed to ping target host: socket: permission denied
Will try TCP ping
Failed to ping target host: socket: permission denied
Will try TCP ping
Failed to ping target host: socket: permission denied
Will try TCP ping
Failed to ping target host: socket: permission denied
Will try TCP ping

After this last output, the CLI hangs. I waited 10 minutes before giving up 😞

from speedtest-cli.

dbrennand avatar dbrennand commented on September 6, 2024

So after looking at this issue comment: go-ping/ping#4 (comment)

I wanted to see if I could get it the CLI working without specifying the server ID.

So I did the following, running my container with --privileged :

/ # sysctl -w net.ipv4.ping_group_range="0 2147483647"
net.ipv4.ping_group_range = 0 2147483647
/ # ./librespeed --verbose
Retrieving server list from https://librespeed.org/backend-servers/servers.php
Selecting the fastest server based on ping
Server New York, United States (1) (BuyVM) (ny1.backend.librespeed.nixnet.services) doesn't seem to be up, skipping
No ICMP pings returned for server Indianapolis, United States  (speedtest.chet.space), trying TCP ping

It removed the socket permissions errors. But still hanged for 10 minutes.

Did the same with debug (below) and still hanged for 10 minutes.

/ # ./librespeed --debug
Retrieving server list from https://librespeed.org/backend-servers/servers.php
Selecting the fastest server based on ping
Server New York, United States (1) (BuyVM) (ny1.backend.librespeed.nixnet.services) doesn't seem to be up, skipping
No ICMP pings returned for server Helsinki, Finland (3) (Hetzner) (fi.openspeed.org), trying TCP ping
No ICMP pings returned for server Atlanta, United States (Clouvider) (atl.speedtest.clouvider.net), trying TCP ping
No ICMP pings returned for server Indianapolis, United States  (speedtest.chet.space), trying TCP ping

from speedtest-cli.

dbrennand avatar dbrennand commented on September 6, 2024

Hi @maddie

Just compiled the new version and still hangs. See output below:

/librespeed --debug --no-icmp
Retrieving server list from https://librespeed.org/backend-servers/servers.php
Selecting the fastest server based on ping
Skipping ICMP for server Amsterdam, Netherlands (Clouvider), will use HTTP ping
Skipping ICMP for server Frankfurt, Germany (DigitalOcean), will use HTTP ping
Skipping ICMP for server Frankfurt, Germany (Clouvider), will use HTTP ping
Skipping ICMP for server Helsinki, Finland (1) (Hetzner), will use HTTP ping
Skipping ICMP for server Helsinki, Finland (3) (Hetzner), will use HTTP ping
Skipping ICMP for server Helsinki, Finland (2) (Hetzner), will use HTTP ping
Skipping ICMP for server Atlanta, United States (Clouvider), will use HTTP ping
Skipping ICMP for server Helsinki, Finland (5) (Hetzner), will use HTTP ping
Skipping ICMP for server Bari, Italy (GARR), will use HTTP ping
Skipping ICMP for server Bologna, Italy (GARR), will use HTTP ping
Skipping ICMP for server Chicago, United States (HostHatch), will use HTTP ping
Skipping ICMP for server London, England (Clouvider), will use HTTP ping
Skipping ICMP for server Indianapolis, United States , will use HTTP ping
Skipping ICMP for server New York, United States (2) (Clouvider), will use HTTP ping
Skipping ICMP for server Nottingham, England (LayerIP), will use HTTP ping
Skipping ICMP for server Los Angeles, United States (1) (Clouvider), will use HTTP ping
Skipping ICMP for server New York, United States (3) (HostHatch), will use HTTP ping
Server New York, United States (1) (BuyVM) (ny1.backend.librespeed.nixnet.services) doesn't seem to be up, skipping
Skipping ICMP for server Las Vegas, United States (BuyVM), will use HTTP ping
Skipping ICMP for server Los Angeles, United States (2) (HostHatch), will use HTTP ping
Skipping ICMP for server Nuremberg, Germany (1) (Hetzner), will use HTTP ping

It's hard to tell what it is actually stuck on even with debug.

Thanks for your help on this 😃

from speedtest-cli.

Perflyst avatar Perflyst commented on September 6, 2024

I can reproduce this bug only if the sysctl configuration mentioned in https://github.com/go-ping/ping#linux is not applied.
The ping test now stucks on a TCP ping
No ICMP pings returned for server Indianapolis, United States (speedtest.chet.space), trying TCP ping

Running with --no-icmp stucks at the same output as mentioned above from dbrennand

from speedtest-cli.

maddie avatar maddie commented on September 6, 2024

@dbrennand Can you try v1.0.9? This issue should be fixed by commit 08d21d6.

from speedtest-cli.

dbrennand avatar dbrennand commented on September 6, 2024

Hi @maddie

I've just build librespeed-cli in a Golang docker container at version v1.0.9 and it no longer hangs. However, when running with --verbose I do see a lot of:

Failed to ping target host: socket: permission denied
Will try TCP ping
Failed to ping target host: socket: permission denied
Will try TCP ping
Failed to ping target host: socket: permission denied
Will try TCP ping
Failed to ping target host: socket: permission denied
Will try TCP ping
Failed to ping target host: socket: permission denied

from speedtest-cli.

dbrennand avatar dbrennand commented on September 6, 2024

Hi again @maddie

I've been able to resolve the errors:

Failed to ping target host: socket: permission denied

By running the container with --sysctl net.ipv4.ping_group_range="0 2147483647"

E.g: docker run --rm --sysctl net.ipv4.ping_group_range="0 2147483647" librespeed-cli:latest

from speedtest-cli.

dbrennand avatar dbrennand commented on September 6, 2024

My dockerfile is here: https://github.com/dbrennand/speedtest-cli/blob/feat/dockerfile/dockerfile

from speedtest-cli.

dbrennand avatar dbrennand commented on September 6, 2024

As it's no longer just hanging, I think this can be marked as resolved? 😄

from speedtest-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.