Error starting domoticz service on Ubuntu 22.04 on Raspberry Pi 4

On various Hardware and OS systems: pi / windows / routers / nas, etc

Moderator: leecollings

Post Reply
Khurram
Posts: 4
Joined: Sunday 14 April 2019 12:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Error starting domoticz service on Ubuntu 22.04 on Raspberry Pi 4

Post by Khurram »

I was able to install Domoticz 2022.2 on Ubuntu 22.04 on a Raspberry Pi 4 after reading through https://github.com/domoticz/domoticz/issues/5233 but am unable to start the service. Doing so gives the following error:
unable to set CAP_SETFCAP effective capability: Operation not permitted
From what I have read, granting this to the user pi is a security risk. Right now, I start domoticz from the user pi's cron when the system starts; I also have another cron job running which keeps on checking if Domoticz is running and restarts it if not. Is there no way to fix the above problem?

Thanks.
Khurram
Posts: 4
Joined: Sunday 14 April 2019 12:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Error starting domoticz service on Ubuntu 22.04 on Raspberry Pi 4

Post by Khurram »

I guess I am stuck with running Domoticz from the command line till this is resolved in a future version. For anyone interested, I am now running domoticz from a shell script 'startdomoticz.sh' as follows:
#!/bin/sh
/home/pi/domoticz/domoticz -www 8080 -sslwww 4430 -log /home/pi/domoticz/domoticz.log -daemon -pidfile /home/pi/domoticz/domoticz.pid
And I am using monit to monitor (and start/restart) it as follows:
##Domoticz monitoring
check process domoticz with pidfile /home/pi/domoticz/domoticz.pid
start program = "/home/pi/domoticz/startdomoticz.sh"
as uid "pi" and gid "pi"
stop program = "/bin/bash -c '/bin/kill `/bin/cat /home/pi/domoticz/domoticz.pid`'"
if failed
url http://127.0.0.1:8080/json.htm?type=com ... getversion
and content = '"status" : "OK"'
for 2 cycles
then restart
if 5 restarts within 5 cycles then exec "/sbin/reboot"
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest