InfluxDB not working anymore after installing Docker on openhabian

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?

You’re overdoing things: OH, InfluxDB+Grafana AND some Docker image to fit into just 1GB of RAM? Maybe you’re running out of swap. I’d distribute that onto two Pis and enable ZRAM on the OH one.

I think you have a point there.
Checked my System_Items and I’m using 84% of my memory.

Would you suggest to put OH, InfluxDB and Grafana on one Pi (as I had) and the Unifi controller on an other one? Or would it make sence to do something else?

Get a 4GB RPi4 ?

1033 hours to Christmas… :slight_smile:

But still when I check with Grafana I can’t acces the influxDb. seems like it’s not running.

Solved it.

I changed the openhab port to 8088. Apparently this port is also used by influxdb.
I’ve changed the openhab port to 8089 and it’s solved. I use about 80% of the RAM.