Page 1 of 1

System Alive Checker (Ping) not working

Posted: Tuesday 27 March 2018 12:46
by erem
L.S.

As a new user of Domoticz I am trying to use the system alive checker to keep track of the status of some devices.
I have setup the hardware in Domoticz, added the device, the host can ping the IP address fine, but the (read only) switch never turns on in Domoticz.
I did "program" a script to toggle a switch to check if that would work (many examples out there... using ping) and that turns the switch on/off based on the ping result.

how can I check that Domoticz is executing the system alive checker? I believe there is an issue there, maybe in the installation (already reinstalled, twice!!) or maybe with some permissions.

I see some entries in the Domoticz log leading me to believe the process is being executed

2018-03-27 10:54:59.617 Pinger: Worker stopped...
2018-03-27 10:54:59.630 Pinger: Started

I am in the latest stable version V3.8153, running on lubuntu 16.04 on an Oracle VM Virtualbox.

Any help is greatly appreciated.

UPDATE: I got it working by Running Domoticz as Root. It seems root privs are necessary for pinger to work (totally unnecessary, IMHO)

update 2: spoke too soon. System alive checker works if I start it manually from the Domoticz directory using sudo ./Domoticz
when trying to use systemctl and start it as a service, it still does not work. (probably because of some permissions issue.

here is the domoticsz.service file
Spoiler: show
[Unit]
Description=domoticz_service
[Service]
ExecStart=/home/rob/domoticz/domoticz -www 8080 -sslwww 443
WorkingDirectory=/home/rob
# Give the right to open priviliged ports. This allows you to run on a port <1024 without root permissions (user/group setting above)
# The below works on ubuntu 16 LTS.
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
Restart=on-failure
RestartSec=1m
[Install]
WantedBy=multi-user.target
not sure what I am doing wrong here....

Re: System Alive Checker (Ping) not working

Posted: Saturday 07 April 2018 14:24
by chrispazz
Mine too has stopped working since last updates

Re: System Alive Checker (Ping) not working

Posted: Monday 15 October 2018 5:19
by lamptah
Hi, struggled with this today. I was able to solve it by replacing

Code: Select all

CapabilityBoundingSet=CAP_NET_BIND_SERVICE
with

Code: Select all

AmbientCapabilities=CAP_NET_RAW CAP_NET_ADMIN CAP_NET_BIND_SERVICE
in the domoticz.service file. Theoretically, only CAP_NET_RAW should be needed if you want to tighten it down.

Re: System Alive Checker (Ping) not working

Posted: Monday 15 October 2018 12:42
by erem
@lamptah,

thanks, i will give this a try on my VM.
I have switch to an Rpi now, and it works there.

thanks anyway,
Rob

Re: System Alive Checker (Ping) not working

Posted: Tuesday 16 October 2018 1:53
by lamptah
strange, I am running on a Raspberry Pi as well, and it did not work due to the privilege dropping.