I’m using Openhabian 2.5.0.M4 with InfluxDB and Grafana installed via the openhabian-config tool on a RPi3. This all was working perfect, untill I installed Docker to run a Unifi controller on the same pi next to Openhab. Openhab is working and so is de Unify controller.
However, I have an error with data not being stored in the InfluxDB.
[ERROR] [org.influxdb.impl.BatchProcessor ] - Batch could not be sent. Data will be lost
It looks like I can’t acces my InfluxDB anymore.
I installed the container using:
sudo docker run -d --restart=unless-stopped --init -p 8080:8080 -p 8443:8443 -p 3478:3478/udp -p 10001:10001/udp -e TZ='Europe/Amsterdam' -v ~/unifi:/unifi --name unifi jacobalberty/unifi:arm32v7
To prevent port conflicts I’ve adjusted /etc/default/openhab2
## PORTS
## The ports openHAB will bind its HTTP/HTTPS web server to.
#
OPENHAB_HTTP_PORT=8088
OPENHAB_HTTPS_PORT=8444
Here’s my influxdb.cfg. I’ve been playing around with the url to see if this would change something.
url=http://localhost:8086
#url=http://192.168.2.130:8086
user=openhab
password=<xxx>
db=openhab_db
retentionPolicy=autogen
When saving the file my log shows an entry
2019-11-11 21:28:07.578 [ERROR] [.internal.InfluxDBPersistenceService] - database connection error Connection refused (Connection refused)
2019-11-11 21:28:07.587 [ERROR] [.internal.InfluxDBPersistenceService] - database connection does not work for now, will retry to use the database.
2019-11-11 21:28:29.825 [ERROR] [org.influxdb.impl.BatchProcessor ] - Batch could not be sent. Data will be lost
Any suggestions to find what’s going wrong?