Comments (26)
Hi @barrycarey - Just checking in on whether you're still planning to fix this to save those of us with user permissions in InfluxDB from having to manually edit the line 41 of InfluxdbSpeedtest.py that's causing the issue?
Thanks!
from speedtest-for-influxdb-and-grafana.
Same here without container. Script simply finishes after "Configuration Successfully Loaded". No other output, no error.
from speedtest-for-influxdb-and-grafana.
I upgraded the image 2 days ago (also on a Synology NAS), and I am encountering exactly the same issue: the container is stuck restarting. Here's a sample from the logs, obtained using Portainer:
Loading Configuration File config.ini
Configuration Successfully Loaded
2019-02-13 22:42:22,980 - DEBUG: Testing connection to InfluxDb using provided credentials
Loading Configuration File config.ini
Configuration Successfully Loaded
2019-02-13 22:42:50,590 - DEBUG: Testing connection to InfluxDb using provided credentials
Loading Configuration File config.ini
Configuration Successfully Loaded
2019-02-13 22:43:44,746 - DEBUG: Testing connection to InfluxDb using provided credentials
Loading Configuration File config.ini
Configuration Successfully Loaded
2019-02-13 22:44:47,671 - DEBUG: Testing connection to InfluxDb using provided credentials
If the speed test is even run at all, the results are certainly not being saved to InfluxDB.
from speedtest-for-influxdb-and-grafana.
I don't maintain the Docker image currently. If I have time this weekend I'll setup an officially supported on.
from speedtest-for-influxdb-and-grafana.
Not sure why this is causing an issue for you two. For what it's worth, I'm running the atribe/speedtest-for-influxdb-and-grafana:latest
docker image chart definition here and the config file at runtime looks like this:
/src # cat config.ini
[GENERAL]
Delay = 7200
[INFLUXDB]
Address = influxdb-influxdb
Port = 8086
Database = speedtests
Username =
Password =
Verify_SSL = False
[SPEEDTEST]
Server =
[LOGGING]
Level = debug
sample log output is:
Loading Configuration File config.ini
Configuration Successfully Loaded
2019-02-15 14:06:39,683 - DEBUG: Testing connection to InfluxDb using provided credentials
2019-02-15 14:06:39,816 - DEBUG: Successful connection to InfluxDb
2019-02-15 14:06:39,816 - INFO: Starting Speed Test For Server None
2019-02-15 14:06:39,892 - DEBUG: Setting up SpeedTest.net client
2019-02-15 14:06:40,505 - DEBUG: Picking the closest server
2019-02-15 14:06:41,207 - INFO: Selected Server 1767 in Atlanta, GA
2019-02-15 14:06:41,208 - INFO: Starting download test
2019-02-15 14:06:51,237 - INFO: Starting upload test
2019-02-15 14:07:01,860 - DEBUG: [{'measurement': 'speed_test_results', 'fields': {'download': 269215505.17997843, 'upload': 23655377.193265762, 'ping': 18.512}, 'tags': {'server': '1767'}}]
2019-02-15 14:07:01,886 - DEBUG: Data written to InfluxDB
2019-02-15 14:07:01,887 - INFO: Download: 269.22Mbps - Upload: 23.66Mbps - Latency: 18.512ms
2019-02-15 14:07:01,887 - INFO: Waiting 7200 seconds until next test
from speedtest-for-influxdb-and-grafana.
It's not only the Docker Container. The latest bare Script also does not work on my Debian Stretch Machine:
Loading Configuration File config.ini Configuration Successfully Loaded 2019-02-18 19:34:43,188 - DEBUG: Testing connection to InfluxDb using provided credentials root@cybstretch1:~/Speedtest-for-InfluxDB-and-Grafana#
from speedtest-for-influxdb-and-grafana.
@cyablo I just did a pull straight from the Repo on Ubuntu and it worked no issue. Can you post your config? Just leave out username/password stuff.
from speedtest-for-influxdb-and-grafana.
Ok, pretty sure I know what's going on. If it fails to connect to InfluxDB it was failing silently with a sys.exit(). Looks like each time this happens the container restarts the script so it just loops.
I just updated the repo to output an error if it fails to connect to Influx.
For any of you having this issue, ensure your InfluxDB connection details are correct.
from speedtest-for-influxdb-and-grafana.
I just pulled that change into the docker image and it is rebuilding right now.
from speedtest-for-influxdb-and-grafana.
You are right:
2019-02-18 19:59:33,803 - CRITICAL: Failed to connect to InfluxDB for unknown reason
But my InfluxDB Credentials are 100% correct. I even did reset the password to be sure and I'm using the same credentials in Grafana. Here is my config:
[GENERAL]
Delay = 300
[INFLUXDB]
Address = localhost
Port = 8086
Database = speedtests
Username = speedtests
Password = ******
Verify_SSL = False
[SPEEDTEST]
Leave blank to auto pick server
Server =
[LOGGING]
Valid Options: critical, error, warning, info, debug
Level = debug
from speedtest-for-influxdb-and-grafana.
Are you influx with or without SSL?
from speedtest-for-influxdb-and-grafana.
I'm not using SSL on Influx.
from speedtest-for-influxdb-and-grafana.
If you have python on your machine pip install influxdb and then try running this (either save as .py or do it in the Python console):
influx = InfluxDBClient(
'111.111.111.111,
8086,
database=DATABASE,
ssl=False,
verify_ssl=False,
username=Username,
password=Password,
timeout=5
)
influx.get_list_users()
Trying to figure out if this is an issue with my script or just a failure connect to Influx in general.
from speedtest-for-influxdb-and-grafana.
I have a few own Scripts, FHEM & LibreNMS pushing data to Influx without Problems. An older Version of your Script was also working fine.
THERE WAS CRAP HERE
from speedtest-for-influxdb-and-grafana.
My bad, forgot to add '' to my database name, username etc...
influxdb.exceptions.InfluxDBClientError: 403: {"error":"error authorizing query: speedtests not authorized to execute statement 'SHOW USERS', requires admin privilege"}
from speedtest-for-influxdb-and-grafana.
Do you have restricted permissions on that user?
Currently, to test if the Influx Connection is working I'm sending a show users command. If the command throws and exception the script exists. I didn't do this prior to the major updates I did recently which would explain why it worked before.
I never explored what level of permissions were required for that command. It might require root. You may need to use a user with more permissions until I can explore a better way to verify the Influx credentials.
from speedtest-for-influxdb-and-grafana.
Sure, the user only has permission to read and write to it's own DB.
I just commented out the lines to test the connection, it's working now and I'll take it as a workaround.
from speedtest-for-influxdb-and-grafana.
Glad to hear that worked. Admittedly not an ideal work around. When I have some time I'll see if I can come up with a better way to verify the credentials.
from speedtest-for-influxdb-and-grafana.
Thanks for looking into this - I can confirm I also use a user which only has read/write to the specific speedtest DB in influxdb so assume this is the cause of the issue. Rather than granting that user admin rights, I’d also like to comment out the access test if possible as a workaround so am keen to understand:
(1) Which files / lines need commenting out?
(2) How are you commenting these lines out since I only expose the container’s /src (the config files, no code) at present and cant get into the container quick enough after starting it to make the amendments before the container errors and stops?
Thanks!
from speedtest-for-influxdb-and-grafana.
It's line 41 in InfluxdbSpeedtest.py that's causing the issue.
The easiest solution would be using a user with root permissions temporary. I'll get it fixed this weekend.
from speedtest-for-influxdb-and-grafana.
In the Home Assistant project, they recently introduced a similar bug. They fixed it by using the following query: SHOW SERIES LIMIT 1;
I'm not sure if that would work in this case, but I just thought I'd share 😉
from speedtest-for-influxdb-and-grafana.
Nice! Thanks for the heads up. I'll mess with it this weekend.
from speedtest-for-influxdb-and-grafana.
Hi @barrycarey - Were you able to fix the "show users" error stopping the container?
from speedtest-for-influxdb-and-grafana.
Hi @barrycarey - Do you plan to release a fix for this? The only way i can get the docker to run currently is to manually comment out the "show users" test in the script inside the container...
from speedtest-for-influxdb-and-grafana.
Welp, this is a shame....
My user only has access to the db, and not admin rights, so of course that fails.
from speedtest-for-influxdb-and-grafana.
So, it is just a one-line change right? Would you will to do it?
I will just fork the project and do it myself, but I'm using a helm chart that uses this image, so many levels of indirection...
from speedtest-for-influxdb-and-grafana.
Related Issues (20)
- Ping 30 minutes HOT 1
- Failing on startup HOT 2
- Devel branch to match speedtest-cli upstream
- change to more performant cli HOT 6
- without docker? HOT 1
- Unable to start container HOT 1
- How to loop it forever HOT 1
- Unable to use certain server
- Results much lower than actuals HOT 2
- SSL Config Option isn't included in documentation.
- Running Docker periodically crashing on "CRITICAL: Failed to get speedtest.net configuration. Aborting" HOT 1
- python3.4 issues
- Add additional fields/tags to write to InfluxDB
- Invalid URL HOT 1
- Licencing HOT 1
- Python error if password contains ceratain characters
- Docker container crashes due to unhandled error HOT 1
- ValueError: invalid literal for int() with base 10: '' HOT 16
- Grafana login - password
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from speedtest-for-influxdb-and-grafana.