Error while connecting to Influx DB

Hi - I am using node-red version 12.16.2 and Influx DB version 1.8.0.
Trying a sample flow as attached - and get this error.

[{"id":"3cac3d42.79d3c2","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"e74d3985.15fbf8","type":"function","z":"3cac3d42.79d3c2","name":"multiple measurement points","func":"msg.payload = [\n {\n measurement: "weather_sensor",\n fields: {\n temp: 5.5,\n light: 678,\n humidity: 51\n },\n tags:{\n location:"garden"\n },\n timestamp: new Date()\n },\n {\n measurement: "alarm_sensor",\n fields: {\n proximity: 999,\n temp: 19.5\n },\n tags:{\n location:"home"\n },\n timestamp: new Date()\n }\n];\nreturn msg;","outputs":1,"noerr":0,"x":460,"y":180,"wires":[["5409e649.290688"]]},{"id":"977a6fcc.aa7f6","type":"inject","z":"3cac3d42.79d3c2","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":200,"y":120,"wires":[["e74d3985.15fbf8"]]},{"id":"5409e649.290688","type":"influxdb batch","z":"3cac3d42.79d3c2","influxdb":"b3241d97.412a3","precision":"","retentionPolicy":"","name":"","x":720,"y":120,"wires":},{"id":"b3241d97.412a3","type":"influxdb","z":"","hostname":"localhost","port":"8086","protocol":"https","database":"test","name":"","usetls":false,"tls":"96179232.45d6c"},{"id":"96179232.45d6c","type":"tls-config","z":"","name":"local-tls","cert":"","key":"","ca":"","certname":"","keyname":"","caname":"","verifyservercert":false}]

Can someone help me on this

Error: write EPROTO 31628:error:1408F10B:
SSL routines:ssl3_get_record:wrong version number:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:332:

Are you trying to access an influxdb behind a proxy? or is it a local database?

Local DB and local node-red instance

Please read this thread and repost your flow - it currently can not be imported.

Your flow is not importable, but I can see that the influxdb is trying to use https, which I suspect is causing the problem. I also notice that although you have usetls false it does have an attached tls node. Did you at some stage configure tls for the db and then change your mind? It might be worth creating a new influxdb config for the influx out node. It may be that there is a bug that does not detach the tls config when you uncheck usetls.

[{"id":"3cac3d42.79d3c2","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"e74d3985.15fbf8","type":"function","z":"3cac3d42.79d3c2","name":"multiple measurement points","func":"msg.payload = [\n    {\n        measurement: \"weather_sensor\",\n        fields: {\n            temp: 5.5,\n            light: 678,\n            humidity: 51\n        },\n        tags:{\n            location:\"garden\"\n        },\n        timestamp: new Date()\n    },\n    {\n        measurement: \"alarm_sensor\",\n        fields: {\n            proximity: 999,\n            temp: 19.5\n        },\n        tags:{\n            location:\"home\"\n        },\n        timestamp: new Date()\n    }\n];\nreturn msg;","outputs":1,"noerr":0,"x":460,"y":180,"wires":[["5409e649.290688"]]},{"id":"977a6fcc.aa7f6","type":"inject","z":"3cac3d42.79d3c2","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":200,"y":120,"wires":[["e74d3985.15fbf8"]]},{"id":"5409e649.290688","type":"influxdb batch","z":"3cac3d42.79d3c2","influxdb":"b3241d97.412a3","precision":"","retentionPolicy":"","name":"","x":720,"y":120,"wires":[]},{"id":"b3241d97.412a3","type":"influxdb","z":"","hostname":"localhost","port":"8086","protocol":"https","database":"test","name":"","usetls":false,"tls":"96179232.45d6c"},{"id":"96179232.45d6c","type":"tls-config","z":"","name":"local-tls","cert":"","key":"","ca":"","certname":"","keyname":"","caname":"","verifyservercert":false}]

I will check with http as well and let you know - I did disconnect the https port - but let me try with http and let you know the results

I have been able to reproduce this issue. It looks like the 'batch' influxdb node no longer works. I'm going to try something so stay tuned.

Well what I tried did not work so I have opened an issue on GitHub (https://github.com/mblackstock/node-red-contrib-influxdb/issues/58)

Meanwile I would suggest you change your flow to use the 'Influxdb out' node which does work.

1 Like

Ok let me try that as well

@vraghu1983 - while testing this again for the node developer, I discovered that the error occurs for me when the database named in the configuration section of the influx node, does not exist.

Coud you try the batch mode again pointing at an existing DB?

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