Influx db node throws RequestTimesOut error

I am trying to get data from influxdb but i get request timed out error.
Could you kindly help

[{"id":"66b9a2774e39b79b","type":"http in","z":"95c455e1841b6220","name":"","url":"/api/getP1LastOneHrData/:chipID/","method":"get","upload":false,"swaggerDoc":"","x":230,"y":640,"wires":[["038f0a51a45ffd06","c8cf01b3b751a339"]]},{"id":"038f0a51a45ffd06","type":"change","z":"95c455e1841b6220","name":"","rules":[{"t":"set","p":"params","pt":"msg","to":"req.params.chipID","tot":"msg","dc":true}],"action":"","property":"","from":"","to":"","reg":false,"x":480,"y":640,"wires":[["dde4efb6605fdb6a","c68ea5b74fa2739d"]]},{"id":"dde4efb6605fdb6a","type":"function","z":"95c455e1841b6220","name":"","func":"msg.payload={\n"params": {\n "chipID": msg.params\n \n}}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":,"x":640,"y":640,"wires":[["f557815bba7e6257","dbd701e40a65496c"]]},{"id":"f557815bba7e6257","type":"function","z":"95c455e1841b6220","name":"Query","func":"var chipID = msg.payload.params.chipID\n\nmsg.query =from(bucket: \"sensorcommunity\")\n |> range(start: -1h)\n |> filter(fn: (r) => r[\"_measurement\"] == \"datapoints\")\n |> filter(fn: (r) => r[\"_field\"] == \"SDS_P1\")\n |> filter(fn: (r) => r[\"node\"] == \"${chipID}\")\n |> yield();\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":,"x":790,"y":640,"wires":[["8ab701228c25b75f","c1b943296dde3f20"]]},{"id":"8ab701228c25b75f","type":"influxdb in","z":"95c455e1841b6220","influxdb":"ecb180858f6fa706","name":"Influx_Read","query":"","rawOutput":false,"precision":"","retentionPolicy":"","org":"3fab497f8770d3ed","x":950,"y":640,"wires":[["4962b18d68d25d61","af452db43ee79675"]]},{"id":"4962b18d68d25d61","type":"function","z":"95c455e1841b6220","name":"","func":"\n// msg.payload=[{\n// "series": [msg.payload[0]._field],\n// "data":[ msg.payload.map(obj => {\n// return {\n// x: obj._time,\n// y: obj._value\n// }\n// })\n// ],\n// "labels": [msg.payload[0].node] \n// }];\nmsg.payload = [{\n \n "channel": [msg.payload[0]._field],\n "color": "Black",\n "dataset": [msg.payload.map(obj => {\n return {\n x: obj._time,\n y: obj._value\n }\n })\n ]\n }] \nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":,"x":1120,"y":640,"wires":[["cfb7dcbdf680023f"]]},{"id":"cfb7dcbdf680023f","type":"http response","z":"95c455e1841b6220","name":"","statusCode":"","headers":{},"x":1270,"y":640,"wires":},{"id":"ecb180858f6fa706","type":"influxdb","hostname":"127.0.0.1","port":"8086","protocol":"http","database":"database","name":"Influx_Read","usetls":false,"tls":"","influxdbVersion":"2.0","url":"http://20.234.100.130:8086/","rejectUnauthorized":true,"credentials":{}}]

image

@Steve-Mcl, Could you kindly suggest a solution here.

Did you set in the influxdb.conf file on you influx server the line

auth-enabled = true

@edje11 , Hi And Thanks for your reply. I am not sure about it. How do i know if it is set or not?

Hi, Where do i find influxdb.conf file.Could you kindly guide me here @edje11

In Raspberry Pi OS...

whereis influxdb

influxdb: /usr/lib/influxdb /etc/influxdb

So, /etc/influxdb/influxdb.conf

Don't know if that helps.

I don't have any config file. its a windows VM. I have tried to print the config, I dont see auth-enabled=true here. How do i set it ?

I am no expert and can only point you do do a Google search.

It does seem to depend upon which version of InfluxDB you are using.

Are you able to write to the database from node red?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.