robinmanuelthiel / speedtest

Check internet bandwidth from a Docker container and save the results to an InfluxDB
MIT License
176 stars 47 forks source link

Restart when we don`t have connection to internet #10

Closed liske310 closed 1 year ago

liske310 commented 1 year ago

When we don`t have connection to internet, then we have error:

Running a Speed Test...
[2023-05-31 11:12:13.422] [error] Trying to get interface information on non-initialized socket.
[2023-05-31 11:12:18.435] [error] Configuration - Couldn't resolve host name (HostNotFoundException)
[2023-05-31 11:12:18.435] [error] Configuration - Cannot retrieve configuration document (0)
[2023-05-31 11:12:18.435] [error] ConfigurationError - Could not retrieve or read configuration (Configuration)
[2023-05-31 11:12:18.436] [error] ConfigurationError - Could not retrieve or read configuration (Configuration)
{"type":"log","timestamp":"2023-05-31T11:12:18Z","message":"Configuration - Could not retrieve or read configuration (ConfigurationError)","level":"error"}
./speedtest.sh: 22: arithmetic expression: expecting primary: "  / 125000 "

and container is down and nothing in graphana... Please add "restart always" to you docker-compose file for this container to restart and test again when the internet came back :)

robinmanuelthiel commented 1 year ago

Good catch, thx