• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

Watchdog and Nginx

abdi

Platinum Pleskian
Anybody seen this error before while enabling Watchdog (This comes if you have recent MUs):

Code:
Error: Unable to process /usr/local/psa/etc/modules/watchdog/monitrc.tpl configuration file: 
/tmp/monitrc.chk:111: Error: the executable does not exist '<nginx_start>'
/tmp/monitrc.chk:112: Error: the executable does not exist '<nginx_stop>'
/tmp/monitrc.chk:113: Error: syntax error '<nginx_connection_timeout>'

I tried analyzing that /tmp/monitrc.chk & /usr/local/psa/etc/modules/watchdog/monitrc.tpl file and I noticed the following lines:

Code:
# Nginx
check process nginx
        with pidfile /var/run/nginx.pid
        start = "<nginx_start>"
        stop = "<nginx_stop>"
        if failed host 85.123.123.123 port 80 send "GET / HTTP/1.1\r\nHost: 85.123.123.123\r\n\r\n" expect "HTTP/1\.[01x] ([1-4][0-9]{2}|502) .*\r\n" with timeout <nginx_connection_timeout> seconds then restart
        if <nginx_timeout_restarts> restarts within <nginx_timeout_cycles> cycles then timeout
        every <nginx_cycles> cycles
        mode <nginx_mode>

Did the dev team leave out something on Nginx?
 
BTW, do you have this record in psa database:

mysql> select * from module_watchdog_service where name='nginx'\G
*************************** 1. row ***************************
id: 14
name: nginx
label: Web Proxy Server (Nginx)
sort_val: 130
mon_status: notmonitored
save_stats: on
timeout: on
timeout_restart_num: 5
timeout_cycles_num: 5
connection_timeout: 5
start_cmd: /usr/local/psa/admin/bin/nginx_control --start
stop_cmd: /usr/local/psa/admin/bin/nginx_control --stop
start_time: 60
1 row in set (0.00 sec)


?
 
I actually don't have it ..

mysql> select * from module_watchdog_service where name='nginx';
Empty set (0.00 sec)
 
Try to reinstall watchdog module or add these records manually.
 
Thanks alot Igor,

Adding that record resolved the error ...For the record, here are the exact instructions:

Code:
mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa

Then,
Code:
insert into `module_watchdog_service` set
`name`="nginx",
`label`="Web Proxy Server (Nginx)",
`sort_val`=130,
`mon_status`="notmonitored",
`save_stats`="on",
`timeout`="on",
`timeout_restart_num`=5,
`timeout_cycles_num`=5,
`connection_timeout`=5,
`start_cmd`="/usr/local/psa/admin/bin/nginx_control --start",
`stop_cmd`="/usr/local/psa/admin/bin/nginx_control --stop",
`start_time`=60;
 
Back
Top