# Error while connecting to Influx DB

**URL:** <https://discourse.nodered.org/t/error-while-connecting-to-influx-db/27376>\
**Category:** General\
**Created:** [27 May 2020 15:08 UTC](https://discourse.nodered.org/t/error-while-connecting-to-influx-db/27376 "2020-05-27T15:08:24Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![vraghu1983](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/vraghu1983/32/22815_2.png) [@vraghu1983](https://discourse.nodered.org/u/vraghu1983)\
**Post date:** [27 May 2020 15:08 UTC](https://discourse.nodered.org/t/error-while-connecting-to-influx-db/27376/1 "2020-05-27T15:08:24Z")

</div>

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:

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [27 May 2020 15:39 UTC](https://discourse.nodered.org/t/error-while-connecting-to-influx-db/27376/2 "2020-05-27T15:39:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![vraghu1983](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/vraghu1983/32/22815_2.png) [@vraghu1983](https://discourse.nodered.org/u/vraghu1983)\
**Post date:** [27 May 2020 15:50 UTC](https://discourse.nodered.org/t/error-while-connecting-to-influx-db/27376/3 "2020-05-27T15:50:57Z")

</div>

Local DB and local node-red instance

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [27 May 2020 16:42 UTC](https://discourse.nodered.org/t/error-while-connecting-to-influx-db/27376/4 "2020-05-27T16:42:06Z")

</div>

Please read this t[hread](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506) and repost your flow - it currently can not be imported.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [27 May 2020 21:18 UTC](https://discourse.nodered.org/t/error-while-connecting-to-influx-db/27376/5 "2020-05-27T21:18:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![vraghu1983](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/vraghu1983/32/22815_2.png) [@vraghu1983](https://discourse.nodered.org/u/vraghu1983)\
**Post date:** [28 May 2020 03:40 UTC](https://discourse.nodered.org/t/error-while-connecting-to-influx-db/27376/6 "2020-05-28T03:40:16Z")

</div>

```auto
[{"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}]

```

---

<div class="post-metadata">

**Author:** ![vraghu1983](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/vraghu1983/32/22815_2.png) [@vraghu1983](https://discourse.nodered.org/u/vraghu1983)\
**Post date:** [28 May 2020 03:41 UTC](https://discourse.nodered.org/t/error-while-connecting-to-influx-db/27376/7 "2020-05-28T03:41:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [28 May 2020 10:03 UTC](https://discourse.nodered.org/t/error-while-connecting-to-influx-db/27376/8 "2020-05-28T10:03:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [28 May 2020 12:14 UTC](https://discourse.nodered.org/t/error-while-connecting-to-influx-db/27376/9 "2020-05-28T12:14:58Z")

</div>

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](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.

---

<div class="post-metadata">

**Author:** ![vraghu1983](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/vraghu1983/32/22815_2.png) [@vraghu1983](https://discourse.nodered.org/u/vraghu1983)\
**Post date:** [28 May 2020 12:25 UTC](https://discourse.nodered.org/t/error-while-connecting-to-influx-db/27376/10 "2020-05-28T12:25:42Z")

</div>

Ok let me try that as well

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [21 June 2020 18:12 UTC](https://discourse.nodered.org/t/error-while-connecting-to-influx-db/27376/11 "2020-06-21T18:12:19Z")

</div>

@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?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [20 August 2020 18:25 UTC](https://discourse.nodered.org/t/error-while-connecting-to-influx-db/27376/12 "2020-08-20T18:25:20Z")

</div>

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