Recently I realised that my Node-Red installation no longer is talking with my InfluxDB.
I mainly use influxDB to collect data about power consumption taking with HA.
At Node-RED logs I can see:
at IncomingMessage.Create.res.on (/data/node_modules/influx/lib/src/pool.js:49:38)
at IncomingMessage.emit (events.js:203:15)
at endReadableNT (_stream_readable.js:1145:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
13 Apr 11:42:05 - [error] [influxdb out:4077c97b.57676] Error: A 401 Unauthorized error occurred: {"error":"authorization failed"}
So I bought that in any way my connection from Node-Red and InfluxDB was broken.
Then I updated again the influxDB user password I use in Node-RED updating Node-RED configuration too but I had not lucky.
The InfluxDB docs looks to bee enough clear telling:
Authentication and authorization HTTP errors
Requests with no authentication credentials or incorrect credentials yield the
HTTP 401 Unauthorized
response.
I tried to connect with same user using CLI and it works fine:
root@europa:/# influx -username <myuser> -password <mypassword>
Connected to http://localhost:8086 version 1.7.10
InfluxDB shell version: 1.7.10
> show databases
name: databases
name
----
power
> exit
I double checked the password and the user both in influxDB and in Node-RED
I’m running both Node-RED and InfluxDB on docker container on a Pi.
What am I missing?
Thank You