Hi,
I recently migrated my InfluxDb setup from being direct port + DNS Name, to going through a reverse proxy on a shared port.
Updating the INFLUX_HOST variable in each *.sh file from being influx.domain.com to https://influx.domain.com yielded this error when running each script -
<urllib3.connection.HTTPConnection object at 0x7f3ae627a450>: Failed to resolve 'https' ([Errno -5] No address associated with hostname)
[2024-02-08 19:33:31] Connection Error: Could not upload data to https://influx.domain.com:8086 for host test-01
A little digging, and changing the INFLUX_HOST variable back to remove the protocol spec, then editing the following lines in each python script to be https instead of http, appears to have resolved the issue.
As a suggestion, adjusting said lines from being client = InfluxDBClient(url=f"http://{INFLUX_HOST}:{INFLUX_PORT}", token=INFLUX_TOKEN, org=INFLUX_ORGANIZATION, timeout=30000) to instead remove the http:// part, would give the flexibility to specify the protocol within the environment variable, instead of relying on python logic/code to resolve.
Hi,
I recently migrated my InfluxDb setup from being direct port + DNS Name, to going through a reverse proxy on a shared port.
Updating the
INFLUX_HOST
variable in each*.sh
file from beinginflux.domain.com
tohttps://influx.domain.com
yielded this error when running each script -A little digging, and changing the
INFLUX_HOST
variable back to remove the protocol spec, then editing the following lines in each python script to behttps
instead ofhttp
, appears to have resolved the issue.As a suggestion, adjusting said lines from being
client = InfluxDBClient(url=f"http://{INFLUX_HOST}:{INFLUX_PORT}", token=INFLUX_TOKEN, org=INFLUX_ORGANIZATION, timeout=30000)
to instead remove thehttp://
part, would give the flexibility to specify the protocol within the environment variable, instead of relying on python logic/code to resolve.Just a suggestion. :-)