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

[Influxdb v2] Failed to connect to InfluxDB v2: Invalid value for name, must not be None using default configuration #9

Open
maxiride opened this issue Jan 31, 2022 · 5 comments

Comments

@maxiride
Copy link

I've tried to spin up this container with no success using the bare bone default configuration for influxdb v2.
URL, TOKEN, ORG and BUCKET replaced with my infludb 2.0 values.

docker run -d \
--name="speedtest" \
--restart="always" \
--env INFLUXV2_URL=http://example.com \
--env INFLUXV2_TOKEN=my-long-token \
--env INFLUXV2_ORG=my-org \
--env INFLUXV2_BUCKET=speedtests \
--env DELAY=5 \
barrycarey/speedmon:latest
2022-01-31 21:28:14,368 - storage_builder:init_storage_handler_from_ini:65 - INFO: No config section defined for INFLUXV1 in INI
2022-01-31 21:28:14,370 - storage_handler_base:__init__:18 - INFO: Built storage handler Influx V2
2022-01-31 21:28:14,370 - storage_builder:init_storage_handler_from_ini:65 - INFO: No config section defined for GRAPHITE in INI
2022-01-31 21:28:14,377 - influxv2_storage_handler:validate_connection:31 - ERROR: Failed to connect to InfluxDB v2: Invalid value for `name`, must not be `None`
2022-01-31 21:28:14,377 - speedmon:<module>:40 - ERROR: No active storage handlers available
@barrycarey
Copy link
Owner

That's a weird one. Name has a default value so should never be None, even if you don't supply it.

I'll check that when I'm out of work.

Can you try running it again with INFLUXV2_NAME=whatever as an environment variable?

@maxiride
Copy link
Author

maxiride commented Feb 1, 2022

The error persist with no changes in the changelog. For reference the full docker command below:

docker run -d --name='speedmon' --net='bridge' -e TZ="Europe/Berlin" -e HOST_OS="Unraid" \
-e 'INFLUXV2_URL'='192.168.0.10' -e 'INFLUXV2_TOKEN'='redacted' -e 'INFLUXV2_ORG'='tower' \
-e 'INFLUXV2_BUCKET'='speedtest' -e 'DELAY'='90' -e 'INFLUXV2_NAME'='speedmon' 'barrycarey/speedmon:latest'

@maxcerny
Copy link

Any updates on this? Trying to build a template myself.

@xuptox
Copy link

xuptox commented Dec 20, 2022

Including the port after INFLUX2_URL
http://[server]:8086
worked for me

@nodiaque
Copy link

PRoblem seems to comeback. For the past 3 weeks, both instance of this container stopped working. Even tried to put a new api token.

[2023-06-20 14:27:38.208] [error] Configuration - SSL connect error (UnknownException)
[2023-06-20 14:27:38.208] [error] Configuration - Cannot retrieve configuration document (0)
[2023-06-20 14:27:38.208] [error] ConfigurationError - Could not retrieve or read configuration (Configuration)
[2023-06-20 14:27:38.208] [error] ConfigurationError - Could not retrieve or read configuration (Configuration)
[error] Configuration - Could not retrieve or read configuration (ConfigurationError)
[2023-06-20 14:27:38.227] [error] Configuration - SSL connect error (UnknownException)
[2023-06-20 14:27:38.227] [error] Configuration - Cannot retrieve configuration document (0)
[2023-06-20 14:27:38.227] [error] ConfigurationError - Could not retrieve or read configuration (Configuration)
[2023-06-20 14:27:38.227] [error] ConfigurationError - Could not retrieve or read configuration (Configuration)
[error] Configuration - Could not retrieve or read configuration (ConfigurationError)
[2023-06-20 14:27:38.252] [error] Configuration - SSL connect error (UnknownException)
[2023-06-20 14:27:38.252] [error] Configuration - Cannot retrieve configuration document (0)
[2023-06-20 14:27:38.252] [error] ConfigurationError - Could not retrieve or read configuration (Configuration)
[2023-06-20 14:27:38.252] [error] ConfigurationError - Could not retrieve or read configuration (Configuration)
{"type":"log","timestamp":"2023-06-20T18:27:38Z","message":"Configuration - Could not retrieve or read configuration (ConfigurationError)","level":"error"}
Traceback (most recent call last):
File "/src/speedmon.py", line 46, in
run_speedtest_with_default_server(storage_handlers)
File "/src/speedmon/common/utils.py", line 36, in run_speedtest_with_default_server
results = run_speed_test()
File "/src/speedmon/common/utils.py", line 69, in run_speed_test
results = json.loads(process_result.stdout)
File "/usr/local/lib/python3.9/json/init.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.9/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.9/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
[2023-06-20 14:28:24.886] [error] Configuration - SSL connect error (UnknownException)
[2023-06-20 14:28:24.886] [error] Configuration - Cannot retrieve configuration document (0)
[2023-06-20 14:28:24.886] [error] ConfigurationError - Could not retrieve or read configuration (Configuration)
[2023-06-20 14:28:24.886] [error] ConfigurationError - Could not retrieve or read configuration (Configuration)
[error] Configuration - Could not retrieve or read configuration (ConfigurationError)
[2023-06-20 14:28:24.906] [error] Configuration - SSL connect error (UnknownException)
[2023-06-20 14:28:24.906] [error] Configuration - Cannot retrieve configuration document (0)
[2023-06-20 14:28:24.906] [error] ConfigurationError - Could not retrieve or read configuration (Configuration)
[2023-06-20 14:28:24.906] [error] ConfigurationError - Could not retrieve or read configuration (Configuration)
[error] Configuration - Could not retrieve or read configuration (ConfigurationError)
[2023-06-20 14:28:24.931] [error] Configuration - SSL connect error (UnknownException)
[2023-06-20 14:28:24.931] [error] Configuration - Cannot retrieve configuration document (0)
[2023-06-20 14:28:24.931] [error] ConfigurationError - Could not retrieve or read configuration (Configuration)
[2023-06-20 14:28:24.931] [error] ConfigurationError - Could not retrieve or read configuration (Configuration)
{"type":"log","timestamp":"2023-06-20T18:28:24Z","message":"Configuration - Could not retrieve or read configuration (ConfigurationError)","level":"error"}
Traceback (most recent call last):
File "/src/speedmon.py", line 46, in
run_speedtest_with_default_server(storage_handlers)
File "/src/speedmon/common/utils.py", line 36, in run_speedtest_with_default_server
results = run_speed_test()
File "/src/speedmon/common/utils.py", line 69, in run_speed_test
results = json.loads(process_result.stdout)
File "/usr/local/lib/python3.9/json/init.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.9/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.9/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2023-06-20 14:27:38,172 - config_manager:init:27 - INFO: Configuration Successfully Loaded
2023-06-20 14:27:38,228 - storage_builder:init_storage_handler_from_ini:65 - INFO: No config section defined for INFLUXV1 in INI
2023-06-20 14:27:38,228 - storage_handler_base:init:18 - INFO: Built storage handler influx
2023-06-20 14:27:38,228 - storage_builder:init_storage_handler_from_ini:65 - INFO: No config section defined for GRAPHITE in INI
2023-06-20 14:28:24,859 - config_manager:init:27 - INFO: Configuration Successfully Loaded
2023-06-20 14:28:24,907 - storage_builder:init_storage_handler_from_ini:65 - INFO: No config section defined for INFLUXV1 in INI
2023-06-20 14:28:24,908 - storage_handler_base:init:18 - INFO: Built storage handler influx
2023-06-20 14:28:24,908 - storage_builder:init_storage_handler_from_ini:65 - INFO: No config section defined for GRAPHITE in INI

No change to influxdb
image

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

5 participants