# InfluxDB Persistence, reconnection if connection lost

**URL:** <https://community.openhab.org/t/influxdb-persistence-reconnection-if-connection-lost/116607>\
**Category:** Persistence Services\
**Tags:** influxdb, connection, openhab3\
**Created:** [February 9, 2021, 7:57pm UTC](https://community.openhab.org/t/influxdb-persistence-reconnection-if-connection-lost/116607 "2021-02-09T19:57:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![fredo](https://community.openhab.org/user_avatar/community.openhab.org/fredo/32/64257_2.png) [@fredo](https://community.openhab.org/u/fredo)\
**Post date:** [February 9, 2021, 7:57pm UTC](https://community.openhab.org/t/influxdb-persistence-reconnection-if-connection-lost/116607/1 "2021-02-09T19:57:48Z")

</div>

Hi  
I setup the persistence service influxdb (openHAB 3).  
It works basically.  
However, my database is on another server and the connection may be interrupted.  
After that, no more data will be recorded. The service does not seem to want to reconnect.  
Is this by design? Do I have to (or can I) do anything so that the service regularly checks the connection and reconnects if it is disconnected?  
Thank you

---

<div class="post-metadata">

**Author:** ![sequarell](https://community.openhab.org/letter_avatar_proxy/v4/letter/s/58956e/32.png) [@sequarell](https://community.openhab.org/u/sequarell)\
**Post date:** [June 17, 2021, 7:06am UTC](https://community.openhab.org/t/influxdb-persistence-reconnection-if-connection-lost/116607/2 "2021-06-17T07:06:32Z")

</div>

I got the same problem.. every now and then it looses the connection and does not reconnect. Did you find a solution?

---

<div class="post-metadata">

**Author:** ![fredo](https://community.openhab.org/user_avatar/community.openhab.org/fredo/32/64257_2.png) [@fredo](https://community.openhab.org/u/fredo)\
**Post date:** [June 17, 2021, 8:14am UTC](https://community.openhab.org/t/influxdb-persistence-reconnection-if-connection-lost/116607/3 "2021-06-17T08:14:18Z")

</div>

Hi Florian. I searched further myself and tried various things. Also without success.  
Finally, I came up with the idea that it could be due to the authentication (that’s a guess). I used the token instead of the password in the configuration and it works.  
github issue: [[influxdb] try to reconnect if connection lost · Issue #10129 · openhab/openhab-addons · GitHub](https://github.com/openhab/openhab-addons/issues/10129)  
Further you can check the advanced version of J-N-K ([GitHub - smarthomej/addons: SmartHome/J addons for openHAB](https://github.com/smarthomej/addons)). He has also added something in this regard. With me, however, I saw no improvement. Maybe it helps with you.

---

<div class="post-metadata">

**Author:** ![sequarell](https://community.openhab.org/letter_avatar_proxy/v4/letter/s/58956e/32.png) [@sequarell](https://community.openhab.org/u/sequarell)\
**Post date:** [June 17, 2021, 8:25am UTC](https://community.openhab.org/t/influxdb-persistence-reconnection-if-connection-lost/116607/4 "2021-06-17T08:25:11Z")

</div>

very nice, thank you!

---

<div class="post-metadata">

**Author:** ![ruebox](https://community.openhab.org/user_avatar/community.openhab.org/ruebox/32/28809_2.png) [@ruebox](https://community.openhab.org/u/ruebox)\
**Post date:** [March 14, 2022, 9:13pm UTC](https://community.openhab.org/t/influxdb-persistence-reconnection-if-connection-lost/116607/5 "2022-03-14T21:13:19Z")

</div>

Hi there,

I do also have this issue although my influx db is running on the same server.

Did you create a token with:  
influx auth create --all-access

Thx
