Skip to content

Undefined array key "ping" after setting up InfluxDB whilst having ISP issues #549

@shalak

Description

@shalak

To Reproduce
I deployed influxdb withing speedtest-tracker's docker-compose like so:

  influxdb:
    image: influxdb:2.7.0
    container_name: influxdb
    volumes:
      - /srv/fast/services/influxdb:/var/lib/influxdb2
    restart: unless-stopped
  1. Created a speedtest bucket in it, with dedicated RW token for this bucket

  2. Configured speedtest tracker as following:

image

  1. Queued one test, went OK

  2. Renamed the bucket to speedtest-tracker using InfluxDB GUI

  3. Changed the bucket name to speedtest-tracker in Speedtest Tracker GUI

  4. Queued another 2 tests, with another scheduled one in the meantime.

The tests failed, speedtest tracker's docker logs show the following every time:

[2023-04-18 23:01:32] production.ERROR: Undefined array key "ping" {"exception":"[object] (ErrorException(code: 0): Undefined array key \"ping\" at /var/www/html/app/Models/Result.php:86)
[stacktrace]
#0 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(266): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError()
#1 /var/www/html/app/Models/Result.php(86): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->Illuminate\\Foundation\\Bootstrap\\{closure}()
#2 /var/www/html/app/Jobs/SendDataToInfluxDbV2.php(65): App\\Models\\Result->formatForInfluxDB2()
#3 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\\Jobs\\SendDataToInfluxDbV2->handle()
#4 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#5 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure()
#6 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\\Container\\BoundMethod::callBoundMethod()
#7 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(661): Illuminate\\Container\\BoundMethod::call()
#8 /var/www/html/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(128): Illuminate\\Container\\Container->call()
#9 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\\Bus\\Dispatcher->Illuminate\\Bus\\{closure}()
#10 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#11 /var/www/html/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(132): Illuminate\\Pipeline\\Pipeline->then()
#12 /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(124): Illuminate\\Bus\\Dispatcher->dispatchNow()
#13 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\\Queue\\CallQueuedHandler->Illuminate\\Queue\\{closure}()
#14 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#15 /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(126): Illuminate\\Pipeline\\Pipeline->then()
#16 /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(70): Illuminate\\Queue\\CallQueuedHandler->dispatchThroughMiddleware()
#17 /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(98): Illuminate\\Queue\\CallQueuedHandler->call()
#18 /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(425): Illuminate\\Queue\\Jobs\\Job->fire()
#19 /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(375): Illuminate\\Queue\\Worker->process()
#20 /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(173): Illuminate\\Queue\\Worker->runJob()
#21 /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(147): Illuminate\\Queue\\Worker->daemon()
#22 /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(130): Illuminate\\Queue\\Console\\WorkCommand->runWorker()
#23 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\\Queue\\Console\\WorkCommand->handle()
#24 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#25 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure()
#26 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\\Container\\BoundMethod::callBoundMethod()
#27 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(661): Illuminate\\Container\\BoundMethod::call()
#28 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(183): Illuminate\\Container\\Container->call()
#29 /var/www/html/vendor/symfony/console/Command/Command.php(312): Illuminate\\Console\\Command->execute()
#30 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(153): Symfony\\Component\\Console\\Command\\Command->run()
#31 /var/www/html/vendor/symfony/console/Application.php(1022): Illuminate\\Console\\Command->run()
#32 /var/www/html/vendor/symfony/console/Application.php(314): Symfony\\Component\\Console\\Application->doRunCommand()
#33 /var/www/html/vendor/symfony/console/Application.php(168): Symfony\\Component\\Console\\Application->doRun()
#34 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Application.php(102): Symfony\\Component\\Console\\Application->run()
#35 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(155): Illuminate\\Console\\Application->run()
#36 /var/www/html/artisan(37): Illuminate\\Foundation\\Console\\Kernel->handle()
#37 {main}
"}
  1. I disabled and enabled InfluxDB in Speedtest Tracker GUI
  2. Queued another test - it works OK

I'm not sure if renaming the bucket took part in any of this. But i did experience some ISP issues during those tests. The results show:

{"type":"log","timestamp":"2023-04-18T23:00:13Z","message":"Configuration - Could not retrieve or read configuration (ConfigurationError)","level":"error"}
{"type":"log","timestamp":"2023-04-18T23:00:47Z","message":"Error: [111] Connection refused","level":"error"}
{"type":"log","timestamp":"2023-04-18T23:01:32Z","message":"Error: [101] Network unreachable","level":"error"} 

Expected behavior
Not sure what went wrong, but it appears, that Speedtest Tracker doesn't handle the influxdb issues gracefully.

Environment (please complete the following information):

  • OS: Ubuntu 22.04.2 LTS
  • Architecture: amd64
  • Browser: N/A
  • Version: v0.11.12

Additional context
I'm using fixed speedtest server ID for all tests.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions