Watchcat: modus "ping reboot" is not working correctly


I have configured Watchcat for (single) modus "ping reboot":

config watchcat
	option mode 'ping_reboot'
	option period '5m'
	option pinghosts ''
	option pingperiod '1m'
	option forcedelay '2m'
	option pingsize 'standard'
	option interface 'wan'

For unknown reason Watchcat cannot ping and consequently reboots the router.
However is pingable.

Can you please advise how to fix this issue?


my guess is that 'wan' isn't an actual interface as far as the ping command goes.
To test you need to use
ping -I wan -c 3
expect it to fail as 'wan' isn't the underlying interface name. From within luci go Network->interfaces and look under the 'wan' interface icon and use the actual interface name, something like 'eth0' or similar in the watchcat config

Watchcat uses the configured interface name in the ping command (see above)
[edit] luci-app-watchcat has a dropdown list of the actual interface names to ensure correct naming

This solution sounds simple, but it's not working:

root@eddie:~# ping -I wan -c 3
PING ( 56 data bytes
64 bytes from seq=0 ttl=56 time=22.098 ms
64 bytes from seq=1 ttl=56 time=15.569 ms
64 bytes from seq=2 ttl=56 time=14.231 ms

--- ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 14.231/17.299/22.098 ms

root@eddie:~# ping -I eth0 -c 3
PING ( 56 data bytes

--- ping statistics ---
3 packets transmitted, 0 packets received, 100% packet loss

This confirms that I configured correct interface wan.

Solution provided here.

I have the same problem:

config watchcat
option period '1h'
option pingsize 'standard'
option mode 'restart_iface'
option pinghosts ''
option interface 'eth0'
option pingperiod '3m'

and in logs I have

Wed Jul 27 20:51:06 2022 watchcat[14595]: Could not reach via "eth0" for "3420" seconds. Restarting "eth0" after reaching "3600" seconds"

"ping -I eth0" works. Before that I tried and the problem was the same. I have internet but rebooting router/interface is pointless if connection is fine.

My openwrt version is "SNAPSHOT, r20156-0f301b0b1d" with watchcat - 1-16.
On other openwrt (the same hardware) router I have watchcat - 1-14 and there are no issues at all.

IMHO that is a problem:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.