bb-Ricardo/fritzinfluxdb

FritzInfluxDB does not run as systemd service, only as a script

Closed this issue · 4 comments

Hi, installed latest version on my Ubuntu 22.04 LTS server with InfluxDB2 and Grafana on the same server. Running the script with "sudo ./fritzinfluxdb.py" shows no error and I can see data being written in my InfluxDB and graphed in Grafana. Fritz Box is 7530 version 7.57.
When installing as systemd service and starting the service I have this error:
"● fritzinfluxdb.service - Fritz to InfluxDB daemon
Loaded: loaded (/etc/systemd/system/fritzinfluxdb.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Mon 2024-05-03 15:25:44 UTC; 3s ago
Process: 56620 ExecStart=/opt/fritzinfluxdb/.venv/bin/python /opt/fritzinfluxdb/fritzinfluxdb.py -d (code=exited, status=1/FAILURE)
Main PID: 56620 (code=exited, status=1/FAILURE)
CPU: 1.360s
"
and data is not written in DB anymore.
No logs that can help from journal, anyone who had the same experience? Tips to try?
Thanks,
jg

Hi, this looks very similar to #104

Have you checked all your permissions?

Hi, this looks very similar to #104

Have you checked all your permissions?

Hi Ricardo, I think yes, I mean I checked and changed with chmod the folders regarding the service and the script and also owneship with the user with I log-on with chown, what else could I check?

Solved replacing in /etc/systemd/fritzinfluxdb.service:
ExecStart=/opt/fritzinfluxdb/.venv/bin/python /opt/fritzinfluxdb/fritzinfluxdb.py -d
to ExecStart= python3 /opt/fritzinfluxdb/fritzinfluxdb.py -d

Good point, will check to improve the documentation.

Thank you