Lack of influx service post RasberryPI reboot - (openhab 3.1/3.2)

Hi,

I have a problem that I can’t really solve myself and I didn’t manage to find any clue.

I’m running openhabian on Raspberry (now 3.2 with all the latest packages). Post every PI reboot influxd is not running and openhab is throwing thousands of errors about lack of ability to save data.

I tried reinstalling influx according to this

sudo zram-config "stop"
sudo apt reinstall influxdb
sudo systemctl start zram-config.service
sudo systemctl restart influxdb
sudo reboot

I tried modifying influxd service to start post zram service - no luck.

I tried today upgrading OH to 3.2 , upgraded all the packages.
In the past, I have run the privileges fix script - this didn’t helped either.

No advice really worked.

I can try to disable zram but honestly, I would like to run vanilla setup as much as I can (not to mention about wear on SD card).

Any advice on what I can try and how can I debug it would be really helpful.

The problem I have is that my Raspberry is overheating for some reason and I can’t track why - either my rules are not optimal or something else is causing CPU hogging.

When it happens I can’t connect by ssh and the only way to bring it alive is to pull the plug.
Then I have to start influx manually again ( sudo systemctl restart influxdb) to make things work.

PS. I guess that even random power loss and thousands of long log lines are not helping CPU.

Check /etc/systemd/system/zram-config.service if it has influxdb.service in the Before=... line,
eventually add it then do not forget systemctl daemon-reload.

If that doesn’t work, you should stop trial & erroring around and proceed systematically like this:

First, you won’t have any problem unless you reboot your box.
As long as you’re still searching for the root cause of your problems, any reboot, intended or not, has the potential to destroy log information you would need to get your debugging done, worsening your situation.
So if your Pi is really overheating (are you just guessing or is that confirmed by a log entry?) and you really have power outages more than average, you should start with getting your hardware right: get a UPS and a well-vented enclosure FIRST.

ONLY NEXT, go for the software.
You run openhabian but did not use it to install influx but did manually. Bad idea as noone will then set it up to start after ZRAM which is what openhabian-config would have done if you had used it for that purpose.
Given you might already have messed up your openHABian OS by this and more moves like this, it’s very hard for any helper you address here to help you - as noone but you can lookup anything on your system, we have to guess and ask lots of questions. That is very inefficient and frustrating to everybody.
So your best bet is to reinstall openHABian and import your config so both, you and helpers, have a fixed starting point.
Might solve your problem in the first place, but even if not, it’s way easier to proceed from there.

Hi, thanks for the advice. Few things to confirm.

The CPU is getting hot for some reason I have heatsinks/bigger enclosure. Normally Pi should be warm - when everything will slow down then it’s so hot that you can’t put finger on it. I don’t have data logged to check what was the temp but knowing how it was vs how it behaves I know I have an issue somewhere.

I suspect that PID controller and frequent calculations/events sent to devices that might be causing it but I don’t have any proof.

Next thing - Influx was installed using openhabian-config. It wasn’t working properly from the very beggining. I found other users having similar problems. I did that post full system whipe/reinstall on OH 3.1 and this step was performed by config.

When I was earlier on OH 2.5 I installed everything manually (with data on SD card) and I never had such issues. The mentioned manual reinstall was because something is wrong with the way openhabian-config sets it up.

The loost power was due to renovation and need to cut off power for some time but in the same time “it just happened” that workers weren’t carefull enough. Like I said - the only way to get out from “slownes” is also to cut of powere to Pi.

Now this is relatively fresh 3.1 install with 3.2 upgrade. This is Z-Ram config.

Don’t mix issues and work on more than one front at a time.

If you think it is not hardware but CPU load is due to some OH misconfiguration or bug then 1) confirm (use CPU monitoring tool) and 2) strip your OH down until you have identified the culprit.

Get your influxDB setup right. As I said install openHABian from scratch, InfluxDB install should then.