After 4.7.0 upgrade I get Authorization Failed
emersonsc opened this issue · 4 comments
Problem/Motivation
Since the upgrade to 4.7.0, i now get an error in my HA log saying the following:
Logger: homeassistant.components.influxdb
Source: components/influxdb/init.py:490
Integration: InfluxDB (documentation, issues)
First occurred: 7:06:28 PM (16 occurrences)
Last logged: 7:21:33 PM
InfluxDB database is not accessible due to '401: {"error":"authorization failed"}'. Please check that the database, username and password are correct and that the specified user has the correct permissions set. Retrying in 60 seconds.
Expected behavior
After the upgrade, I expected everything to work as it always have
Actual behavior
After the upgrade, InfluxDB no longer accepts the username and password i've always used in my unchanged configuration. I have verified the username and password exist within InfluxDB. I even created a new username and password with admin privileges. That does not work either.
Steps to reproduce
Below is the input in my sensor.yaml file that has worked without issue until I updated to 4.7.0
- platform: influxdb
host: 192.168.50.22
database: shop_power_monitor.autogen
username: !secret influxdb_user
password: !secret influxdb_pass
queries:- name: Shop Main 1 Power
where: '"ct" = ''1'' and time > now() - 1m'
measurement: raw_cts
field: "power"
group_function: mean
database: shop_power_monitor
unit_of_measurement: W
value_template: '{{ value | round(1) }}' - name: Shop Main 2 Power
where: '"ct" = ''2'' and time > now() - 1m'
measurement: raw_cts
field: "power"
group_function: mean
database: shop_power_monitor
unit_of_measurement: W
value_template: '{{ value | round(1) }}' - name: Plasma Cutter Power
where: '"ct" = ''3'' and time > now() - 1m'
measurement: raw_cts
field: "power"
group_function: mean
database: shop_power_monitor
unit_of_measurement: W
value_template: '{{ value | round(1) }}' - name: Air Compressor Power
where: '"ct" = ''4'' and time > now() - 1m'
measurement: raw_cts
field: "power"
group_function: mean
database: shop_power_monitor
unit_of_measurement: W
value_template: '{{ value | round(1) }}' - name: Sarah's Bench Power
where: '"ct" = ''5'' and time > now() - 1m'
measurement: raw_cts
field: "power"
group_function: mean
database: shop_power_monitor
unit_of_measurement: W
value_template: '{{ value | round(1) }}' - name: Server Circuit Power
where: '"ct" = ''6'' and time > now() - 1m'
measurement: raw_cts
field: "power"
group_function: mean
database: shop_power_monitor
unit_of_measurement: W
value_template: '{{ value | round(1) }}' - name: Shop Power Use
where: 'true and time > now() - 1m'
measurement: home_load
field: "power"
group_function: mean
database: shop_power_monitor
unit_of_measurement: W
value_template: '{{ value | round(1) }}' - name: Shop Input Voltage
where: 'true and time > now() - 1m'
measurement: voltages
field: "voltage"
group_function: last
database: shop_power_monitor
unit_of_measurement: V
value_template: '{{ value | round(1) }}' - name: Shop Main 1 Amperes
where: '"ct" = ''1'' and time > now() - 1m'
measurement: raw_cts
field: "current"
group_function: mean
database: shop_power_monitor
unit_of_measurement: A
value_template: '{{ value | round(1) }}' - name: Shop Main 2 Amperes
where: '"ct" = ''2'' and time > now() - 1m'
measurement: raw_cts
field: "current"
group_function: mean
database: shop_power_monitor
unit_of_measurement: A
value_template: '{{ value | round(1) }}' - name: Plasma Cutter Amperes
where: '"ct" = ''3'' and time > now() - 1m'
measurement: raw_cts
field: "current"
group_function: mean
database: shop_power_monitor
unit_of_measurement: A
value_template: '{{ value | round(1) }}' - name: Air Compressor Amperes
where: '"ct" = ''4'' and time > now() - 1m'
measurement: raw_cts
field: "current"
group_function: mean
database: shop_power_monitor
unit_of_measurement: A
value_template: '{{ value | round(1) }}' - name: Sarah's Bench Amperes
where: '"ct" = ''5'' and time > now() - 1m'
measurement: raw_cts
field: "current"
group_function: mean
database: shop_power_monitor
unit_of_measurement: A
value_template: '{{ value | round(1) }}' - name: Server Circuit Amperes
where: '"ct" = ''6'' and time > now() - 1m'
measurement: raw_cts
field: "current"
group_function: mean
database: shop_power_monitor
unit_of_measurement: A
value_template: '{{ value | round(1) }}'
- name: Shop Main 1 Power
Proposed changes
(If you have a proposed change, workaround or fix,
describe the rationale behind it)
This appears to be an issue with the integration, not sure what can be done here.
edit - just to add that release added a port binding and docs updates, so would assume there is something else as an issue here.
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!
I had the "error reading InfluxDB. Status Code: 401" issue as well.
I had just installed the InfluxDB and Grafana Addons for the first time.
The solution that worked for me was to go into the Configuration tabs for BOTH of the addons and disable the SSL toggle, and restart the addons.
I then deleted and recreated my datasource in Grafana.
(I'm not certain if recreating was required.)
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!