Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speedtest cannot read from socket #9

Open
itsmejoeeey opened this issue Apr 3, 2024 · 0 comments
Open

Speedtest cannot read from socket #9

itsmejoeeey opened this issue Apr 3, 2024 · 0 comments

Comments

@itsmejoeeey
Copy link

I noticed I was getting large gaps (sometimes 5+ hours) in the data received by prometheus, even though the speedtest should be occurring hourly.

docker-compose.yml

  speedtest:
    image: "billimek/prometheus-speedtest-exporter:1.3.1"
    restart: "unless-stopped"

I decided to run the speedtest manually inside the container to try and debug this.

With speedtest --accept-license --accept-gdpr -f tsv -v -v -v I get the following (not reliably, but most of the time):

[2024-04-03 12:06:15.462] [info] Ping 1: 2.97 ms (2.97ms min, 0.00ms jitter)
[2024-04-03 12:06:15.465] [info] Ping 2: 2.53 ms (2.53ms min, 0.44ms jitter)
[2024-04-03 12:06:15.468] [info] Ping 3: 2.32 ms (2.32ms min, 0.33ms jitter)
[2024-04-03 12:06:15.470] [info] Ping 4: 2.52 ms (2.32ms min, 0.29ms jitter)
[2024-04-03 12:06:15.473] [info] Ping 5: 2.60 ms (2.32ms min, 0.23ms jitter)
[2024-04-03 12:06:15.473] [info] Final Ping: 2.32 ms
[2024-04-03 12:06:15.474] [info] Stage 1 completed
[2024-04-03 12:06:15.474] [info] Starting stage 2 of type 3
[2024-04-03 12:06:24.204] [info] Stage 2 completed
[2024-04-03 12:06:24.205] [info] Smoothing graph for test with 0.580 progress, with duration of 0 ms in 0 updates
[2024-04-03 12:06:24.205] [info] Starting stage 3 of type 4
[2024-04-03 12:06:24.214] [info] Packet loss sent=174, received=174, dupes=0, maxId=173
[2024-04-03 12:06:27.330] [warning] Receive error: 11 (Resource temporarily unavailable)
[2024-04-03 12:06:27.331] [info] Connection 1 failed. Added connection and continuing test.
[2024-04-03 12:06:27.330] [warning] Receive error: 11 (Resource temporarily unavailable)
[2024-04-03 12:06:27.331] [info] Connection 2 failed. Added connection and continuing test.
[2024-04-03 12:06:27.331] [warning] Loaded latency: cannot read response.: [11] Resource temporarily unavailable
[2024-04-03 12:06:27.331] [warning] Receive error: 11 (Resource temporarily unavailable)
[2024-04-03 12:06:27.330] [warning] Receive error: 11 (Resource temporarily unavailable)
[2024-04-03 12:06:27.331] [warning] Receive error: 11 (Resource temporarily unavailable)
[2024-04-03 12:06:27.332] [warning] Loaded latency: Hello handshake failed with the server: [0] Cannot read from socket: 
[2024-04-03 12:06:27.332] [info] Connection 3 failed. Added connection and continuing test.
[2024-04-03 12:06:27.334] [info] Connection 4 failed. Added connection and continuing test.
[2024-04-03 12:06:27.335] [error] Test failed to complete: Cannot read from socket:

I've tested with network_mode: host and this seems to solve the issue, although some non-fatal warnings about Cannot read from uninitialized socket can still be seen in the runs.

If possible I'd rather not use host-networking, and I'm at a loss as to why this would be required. Additionally if this is a known-necessity it may be worth documenting.

Has anyone else encountered this? Is there a way I can have the speedtest work reliably with bridge-networking?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant