System Alive Checker (Ping) not working

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
User avatar
erem
Posts: 230
Joined: Tuesday 27 March 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Amsterdam/netherlands
Contact:

System Alive Checker (Ping) not working

Post 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....
Regards,

Rob
chrispazz
Posts: 81
Joined: Friday 08 July 2016 10:38
Target OS: -
Domoticz version:
Contact:

Re: System Alive Checker (Ping) not working

Post by chrispazz »

Mine too has stopped working since last updates
lamptah
Posts: 5
Joined: Tuesday 04 September 2018 3:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: System Alive Checker (Ping) not working

Post 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.
User avatar
erem
Posts: 230
Joined: Tuesday 27 March 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Amsterdam/netherlands
Contact:

Re: System Alive Checker (Ping) not working

Post 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
Regards,

Rob
lamptah
Posts: 5
Joined: Tuesday 04 September 2018 3:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: System Alive Checker (Ping) not working

Post by lamptah »

strange, I am running on a Raspberry Pi as well, and it did not work due to the privilege dropping.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest