Context : I’m using influxDb on a server.
I recently (~2 weeks ago) have upgraded node version and my nodejs code didn’t changed.
The current stack in prod :
- nodejs : v17.3.0
- using require(“influx”) to read and select from InfluxDb → v5.9.2
- using require("@influxdata/influxdb-client") + telegraf, to write into influxDb (don’t ask why such weird configuration) ; it was working recently.
- influxDb v1.8.10 (oss)
- /etc/influxdb/influxdb.conf :
- bind-address = “:8086” < the port I’m using for selecting data
Today, writing points to influx is still fine.
But reading (SELECT) points are failing with an error ‘ServiceNotAvailableError: No host available’ coming from module :
Pool.stream (/node_modules/influx/lib/src/pool.js:235:29) + InfluxDB.queryRaw
journalctl -fu influxdb.service I can only see log about
POST /write which are success (status 204)
I don’t understand why from node, any SELECT are failing with this connection error.
influx command line the SELECT query is working well ; and the select itself is very simple : eg:
SELECT time, valueBoolean as value FROM retention.meas WHERE eng_var='7' ORDER BY time DESC LIMIT 4 OFFSET 0
Both nodejs and Influxdb (and telegraf) are on the same server.
Any idea how I can debug ?