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

Test status "Started" instead of "Failed" when there is no internet connection #1821

Closed
LukeAllinson opened this issue Nov 24, 2024 · 7 comments · Fixed by #1826
Closed

Test status "Started" instead of "Failed" when there is no internet connection #1821

LukeAllinson opened this issue Nov 24, 2024 · 7 comments · Fixed by #1826
Assignees
Labels
🐛 bug Something isn't working

Comments

@LukeAllinson
Copy link

LukeAllinson commented Nov 24, 2024

Describe the bug
I am currently in the midst of an internet outage (posting this via my mobile phone). Speedtest-Tracker is not showing any failures, and instead all tests are showing as "Starting" and with no data attached if I view the results.
What triggers an actual failure?
Apologies if I am missing something obvious here.
It would also be nice if the graph reflected these failed tests too (although I see there is already an open request for that).

To Reproduce
I am unsure whether this is limited to my build/installation, although I don't believe I have configured anything out of the ordinary.
My docker-compose is included below for information:

speedtest-tracker:  
    container_name: speedtest-tracker  
    image: lscr.io/linuxserver/speedtest-tracker:latest  
    restart: unless-stopped  
    environment:  
      - PUID=1512  
      - PGID=1512  
      - APP_KEY=base64:XXXXXXXXXXXXXXXX  
      - DB_CONNECTION=sqlite  
      - SPEEDTEST_SCHEDULE=*/15 * * * *  
      - SPEEDTEST_SERVERS=23389,62486,54746,40377  
      - PRUNE_RESULTS_OLDER_THAN=7  
      - DISPLAY_TIMEZONE=${TIMEZONE}  
    volumes:  
      - ${DOCKER_BASE_FOLDER}/speedtest-tracker/config:/config  
      - ${DOCKER_BASE_FOLDER}/speedtest-tracker/keys:/config/keys

Expected behavior
A failed test (due to loss of internet connectivity) should show as failed in the test results.

Environment (please complete the following information):

  • OS: linuxserver.io container, running on Ubuntu 24.04.01, docker version 27.3.1
  • Architecture: amd64
  • Browser: The issue is browser independent (I have tried Edge and Firefox)
  • Version: 0.22.0 (linuxserver.io container)

Screenshots
image

Logs
I use Dozzle for docker log viewing; nothing shown:

image

Additional context
If I "docker exec" into the container and run the speedtest program interactively, it clearly says that it can't resolve the hostname.

image

This would seem consistent with the error message shown in the documentation (https://docs.speedtest-tracker.dev/help/error-messages#could-not-resolve-host) but this is not shown anywhere in the dashboard.

@alexjustesen alexjustesen self-assigned this Nov 24, 2024
@alexjustesen alexjustesen added the 🐛 bug Something isn't working label Nov 24, 2024
@alexjustesen
Copy link
Owner

@LukeAllinson anything odd in your logs? I just tested an "outage" and I'm getting records as failed with the latest build.

@svenvg93
Copy link
Contributor

@alexjustesen i'm wondering, did your DNS still work when testing?
I just tried the same with the current main branch. When I disconnect the internet fully, the DNS for GetExternalIpAddress fails as expected, but it seems its not catched as an failure as the status is not updated from Checking to Failed.

Besides the Could not resolve host error the logs don't show anything.

[2024-11-25 07:02:04] local.ERROR: Speedtest batch "9d923f46-fd4e-4a59-b06b-cbd1ee7b85ca" failed for an unknown reason.  
[2024-11-25 07:02:04] local.ERROR: cURL error 6: Could not resolve host: icanhazip.com (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://icanhazip.com/ {"exception":"[object] (Illuminate\\Http\\Client\\ConnectionException(code: 0): cURL error 6: Could not resolve host: icanhazip.com (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://icanhazip.com/ at /var/www/html/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php:941)
[stacktrace]

@ppittle
Copy link

ppittle commented Nov 25, 2024

I've created a new issue which I believe is the root cause: #1824.

Sorry for the issue duplication, but I feel like the Title in my issue may help more users in the future - as @svenvg93 pointed out, the issue is DNS dependency on icanhazip.com

@LukeAllinson
Copy link
Author

@LukeAllinson anything odd in your logs? I just tested an "outage" and I'm getting records as failed with the latest build.

I posted my docker logs in the original post (there is nothing showing at all).
Can I get more specific logs from within the container somewhere?

I've created a new issue which I believe is the root cause: #1824.

Sorry for the issue duplication, but I feel like the Title in my issue may help more users in the future - as @svenvg93 pointed out, the issue is DNS dependency on icanhazip.com

I do have pihole on my network, but the server running my docker containers (including Speedtest-Tracker) bypasses it and uses my firewall directly for DNS.

@svenvg93
Copy link
Contributor

I posted my docker logs in the original post (there is nothing showing at all). Can I get more specific logs from within the container somewhere?

The log is located at /app/www/storage/logs/laravel.log inside the container

@LukeAllinson
Copy link
Author

I've posted an extract from the logs below; the full log simply contains these two traces over and over again:

[2024-11-25 11:30:03] production.ERROR: cURL error 6: Could not resolve host: icanhazip.com (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://icanhazip.com/ {"exception":"[object] (Illuminate\\Http\\Client\\ConnectionException(code: 0): cURL error 6: Could not resolve host: icanhazip.com (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://icanhazip.com/ at /app/www/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php:941)
[stacktrace]
#0 /app/www/vendor/laravel/framework/src/Illuminate/Support/helpers.php(319): Illuminate\\Http\\Client\\PendingRequest->Illuminate\\Http\\Client\\{closure}()
#1 /app/www/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php(905): retry()
#2 /app/www/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php(772): Illuminate\\Http\\Client\\PendingRequest->send()
#3 /app/www/app/Actions/Helpers/GetExternalIpAddress.php(17): Illuminate\\Http\\Client\\PendingRequest->get()
#4 /app/www/vendor/lorisleiva/laravel-actions/src/Concerns/AsObject.php(22): App\\Actions\\Helpers\\GetExternalIpAddress->handle()
#5 /app/www/app/Jobs/Speedtests/ExecuteOoklaSpeedtest.php(51): App\\Actions\\Helpers\\GetExternalIpAddress::run()
#6 /app/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\\Jobs\\Speedtests\\ExecuteOoklaSpeedtest->handle()
#7 /app/www/vendor/laravel/framework/src/Illuminate/Container/Util.php(43): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#8 /app/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(95): Illuminate\\Container\\Util::unwrapIfClosure()
#9 /app/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod()
#10 /app/www/vendor/laravel/framework/src/Illuminate/Container/Container.php(690): Illuminate\\Container\\BoundMethod::call()
#11 /app/www/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(128): Illuminate\\Container\\Container->call()
#12 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\\Bus\\Dispatcher->Illuminate\\Bus\\{closure}()
#13 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#14 /app/www/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(132): Illuminate\\Pipeline\\Pipeline->then()
#15 /app/www/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(124): Illuminate\\Bus\\Dispatcher->dispatchNow()
#16 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\\Queue\\CallQueuedHandler->Illuminate\\Queue\\{closure}()
#17 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#18 /app/www/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(123): Illuminate\\Pipeline\\Pipeline->then()
#19 /app/www/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(71): Illuminate\\Queue\\CallQueuedHandler->dispatchThroughMiddleware()
#20 /app/www/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(102): Illuminate\\Queue\\CallQueuedHandler->call()
#21 /app/www/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(441): Illuminate\\Queue\\Jobs\\Job->fire()
#22 /app/www/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(391): Illuminate\\Queue\\Worker->process()
#23 /app/www/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(178): Illuminate\\Queue\\Worker->runJob()
#24 /app/www/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(148): Illuminate\\Queue\\Worker->daemon()
#25 /app/www/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(131): Illuminate\\Queue\\Console\\WorkCommand->runWorker()
#26 /app/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\\Queue\\Console\\WorkCommand->handle()
#27 /app/www/vendor/laravel/framework/src/Illuminate/Container/Util.php(43): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#28 /app/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(95): Illuminate\\Container\\Util::unwrapIfClosure()
#29 /app/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod()
#30 /app/www/vendor/laravel/framework/src/Illuminate/Container/Container.php(690): Illuminate\\Container\\BoundMethod::call()
#31 /app/www/vendor/laravel/framework/src/Illuminate/Console/Command.php(213): Illuminate\\Container\\Container->call()
#32 /app/www/vendor/symfony/console/Command/Command.php(279): Illuminate\\Console\\Command->execute()
#33 /app/www/vendor/laravel/framework/src/Illuminate/Console/Command.php(182): Symfony\\Component\\Console\\Command\\Command->run()
#34 /app/www/vendor/symfony/console/Application.php(1047): Illuminate\\Console\\Command->run()
#35 /app/www/vendor/symfony/console/Application.php(316): Symfony\\Component\\Console\\Application->doRunCommand()
#36 /app/www/vendor/symfony/console/Application.php(167): Symfony\\Component\\Console\\Application->doRun()
#37 /app/www/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(197): Symfony\\Component\\Console\\Application->run()
#38 /app/www/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1205): Illuminate\\Foundation\\Console\\Kernel->handle()
#39 /app/www/artisan(13): Illuminate\\Foundation\\Application->handleCommand()
#40 {main}

[previous exception] [object] (GuzzleHttp\\Exception\\ConnectException(code: 0): cURL error 6: Could not resolve host: icanhazip.com (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://icanhazip.com/ at /app/www/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:275)
[stacktrace]
#0 /app/www/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(205): GuzzleHttp\\Handler\\CurlFactory::createRejection()
#1 /app/www/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(157): GuzzleHttp\\Handler\\CurlFactory::finishError()
#2 /app/www/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php(47): GuzzleHttp\\Handler\\CurlFactory::finish()
#3 /app/www/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php(28): GuzzleHttp\\Handler\\CurlHandler->__invoke()
#4 /app/www/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php(48): GuzzleHttp\\Handler\\Proxy::GuzzleHttp\\Handler\\{closure}()
#5 /app/www/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php(1338): GuzzleHttp\\Handler\\Proxy::GuzzleHttp\\Handler\\{closure}()
#6 /app/www/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php(1304): Illuminate\\Http\\Client\\PendingRequest->Illuminate\\Http\\Client\\{closure}()
#7 /app/www/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php(1290): Illuminate\\Http\\Client\\PendingRequest->Illuminate\\Http\\Client\\{closure}()
#8 /app/www/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php(35): Illuminate\\Http\\Client\\PendingRequest->Illuminate\\Http\\Client\\{closure}()
#9 /app/www/vendor/guzzlehttp/guzzle/src/Middleware.php(38): GuzzleHttp\\PrepareBodyMiddleware->__invoke()
#10 /app/www/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php(71): GuzzleHttp\\Middleware::GuzzleHttp\\{closure}()
#11 /app/www/vendor/guzzlehttp/guzzle/src/Middleware.php(63): GuzzleHttp\\RedirectMiddleware->__invoke()
#12 /app/www/vendor/guzzlehttp/guzzle/src/HandlerStack.php(75): GuzzleHttp\\Middleware::GuzzleHttp\\{closure}()
#13 /app/www/vendor/guzzlehttp/guzzle/src/Client.php(333): GuzzleHttp\\HandlerStack->__invoke()
#14 /app/www/vendor/guzzlehttp/guzzle/src/Client.php(169): GuzzleHttp\\Client->transfer()
#15 /app/www/vendor/guzzlehttp/guzzle/src/Client.php(189): GuzzleHttp\\Client->requestAsync()
#16 /app/www/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php(1136): GuzzleHttp\\Client->request()
#17 /app/www/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php(907): Illuminate\\Http\\Client\\PendingRequest->sendRequest()
#18 /app/www/vendor/laravel/framework/src/Illuminate/Support/helpers.php(319): Illuminate\\Http\\Client\\PendingRequest->Illuminate\\Http\\Client\\{closure}()
#19 /app/www/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php(905): retry()
#20 /app/www/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php(772): Illuminate\\Http\\Client\\PendingRequest->send()
#21 /app/www/app/Actions/Helpers/GetExternalIpAddress.php(17): Illuminate\\Http\\Client\\PendingRequest->get()
#22 /app/www/vendor/lorisleiva/laravel-actions/src/Concerns/AsObject.php(22): App\\Actions\\Helpers\\GetExternalIpAddress->handle()
#23 /app/www/app/Jobs/Speedtests/ExecuteOoklaSpeedtest.php(51): App\\Actions\\Helpers\\GetExternalIpAddress::run()
#24 /app/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\\Jobs\\Speedtests\\ExecuteOoklaSpeedtest->handle()
#25 /app/www/vendor/laravel/framework/src/Illuminate/Container/Util.php(43): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#26 /app/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(95): Illuminate\\Container\\Util::unwrapIfClosure()
#27 /app/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod()
#28 /app/www/vendor/laravel/framework/src/Illuminate/Container/Container.php(690): Illuminate\\Container\\BoundMethod::call()
#29 /app/www/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(128): Illuminate\\Container\\Container->call()
#30 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\\Bus\\Dispatcher->Illuminate\\Bus\\{closure}()
#31 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#32 /app/www/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(132): Illuminate\\Pipeline\\Pipeline->then()
#33 /app/www/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(124): Illuminate\\Bus\\Dispatcher->dispatchNow()
#34 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\\Queue\\CallQueuedHandler->Illuminate\\Queue\\{closure}()
#35 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#36 /app/www/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(123): Illuminate\\Pipeline\\Pipeline->then()
#37 /app/www/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(71): Illuminate\\Queue\\CallQueuedHandler->dispatchThroughMiddleware()
#38 /app/www/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(102): Illuminate\\Queue\\CallQueuedHandler->call()
#39 /app/www/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(441): Illuminate\\Queue\\Jobs\\Job->fire()
#40 /app/www/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(391): Illuminate\\Queue\\Worker->process()
#41 /app/www/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(178): Illuminate\\Queue\\Worker->runJob()
#42 /app/www/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(148): Illuminate\\Queue\\Worker->daemon()
#43 /app/www/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(131): Illuminate\\Queue\\Console\\WorkCommand->runWorker()
#44 /app/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\\Queue\\Console\\WorkCommand->handle()
#45 /app/www/vendor/laravel/framework/src/Illuminate/Container/Util.php(43): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#46 /app/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(95): Illuminate\\Container\\Util::unwrapIfClosure()
#47 /app/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod()
#48 /app/www/vendor/laravel/framework/src/Illuminate/Container/Container.php(690): Illuminate\\Container\\BoundMethod::call()
#49 /app/www/vendor/laravel/framework/src/Illuminate/Console/Command.php(213): Illuminate\\Container\\Container->call()
#50 /app/www/vendor/symfony/console/Command/Command.php(279): Illuminate\\Console\\Command->execute()
#51 /app/www/vendor/laravel/framework/src/Illuminate/Console/Command.php(182): Symfony\\Component\\Console\\Command\\Command->run()
#52 /app/www/vendor/symfony/console/Application.php(1047): Illuminate\\Console\\Command->run()
#53 /app/www/vendor/symfony/console/Application.php(316): Symfony\\Component\\Console\\Application->doRunCommand()
#54 /app/www/vendor/symfony/console/Application.php(167): Symfony\\Component\\Console\\Application->doRun()
#55 /app/www/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(197): Symfony\\Component\\Console\\Application->run()
#56 /app/www/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1205): Illuminate\\Foundation\\Console\\Kernel->handle()
#57 /app/www/artisan(13): Illuminate\\Foundation\\Application->handleCommand()
#58 {main}

This would seem consistant with the issue raised by @ppittle
I guess that would mean that as @svenvg93 suggested, @alexjustesen your DNS must have either still been functional during your outage test or perhaps the result for icanhazip.com was cached?

@LukeAllinson
Copy link
Author

thankyou for the speedy responses

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants