• Dear Pleskians! The Plesk Forum will be undergoing scheduled maintenance on Monday, 7th of July, at 9:00 AM UTC. The expected maintenance window is 2 hours.
    Thank you in advance for your patience and understanding on the matter.

Watchdog can't monitor apache server

N

nk111

Guest
Watchdog doesn't seem to be able to monitor my apache server. I alway get those messages which say "your webserver is down" and "webserver released from monitoring" even if the apache runs fine...

I'm using psa v8.6.0_build86080822.20 os_Ubuntu 6.06

I searched around in the forums but did not find a solution until now.

I guess this could be the reason:
here is a part of the file /opt/psa/etc/modules/watchdog/monitrc

Code:
# Apache
check process apache
        with pidfile "/var/run/apache2.pid"
        start = "/opt/psa/admin/bin/websrvmng --start"
        stop = "/opt/psa/admin/bin/websrvmng --stop"
        if failed host 192.168.0.181 port 80 send "GET / HTTP/1.1\r\nHost: 192.168.0.181\r\n\r\n" expect "HTTP/1\.[01x] [1-4][0-9]{2} .*\r\n" with timeout 5 seconds then restart
        if 5 restarts within 5 cycles then timeout
        every 1 cycles
        mode active

It seems like watchdog tries to monitor the apache server on an internal ip where apache is not listening.
Here is a snippet of /opt/psa/etc/modules/watchdog/monitrc.tpl :

Code:
# Apache
check process apache
        with pidfile "/var/run/apache2.pid"
        start = "<apache_start>"
        stop = "<apache_stop>"
        if failed host <default_apache_ip> port 80 send "GET / HTTP/1.1\r\nHost: <default_apache_ip>\r\n\r\n" expect "HTTP/1\.[01x] [1-4][0-9]{2} .*\r\n" with timeout <apache_connection_timeout> seconds then restart
        if <apache_timeout_restarts> restarts within <apache_timeout_cycles> cycles then timeout
        every <apache_cycles> cycles
        mode <apache_mode>

So it looks like default_apache_ip is a wrong one in my installation.

In the control panel under server / ip addresses I have 2 ip addresses listet. The external one which is assigned to my only customer and all domains and those internal one which is in the monitrc file too. This second one shows a red exclamation mark and is NOT the standard ip. But I cant delete it. When I try to delete this ip I get "access denied".

I even deleted and re-installed the watchdog module - I still have this wrong ip in the monitrc file.

Any ideas?

nico
 
YES! Solved...

I found this solution:
http://kb.swsoft.com/en/2149

to delete the old not working ip... Then I deleted the watchdog module and re-installed it. After that, the monitc file now holds the correct ip and service state is "running".

maybe this helps
 
Ever since upgrading, this also is an issue with my server. Watchdog says Apache is constantly down when it is running fine.

So this must be a bug right?
 
Back
Top