Page 1 of 1

Error starting domoticz service on Ubuntu 22.04 on Raspberry Pi 4

Posted: Sunday 11 December 2022 18:00
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.

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

Posted: Monday 12 December 2022 20:00
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"