CWP7 monitor xətasında nginx bağlantısının uğursuzluğu problemini həll edir

Ünvan CWP7 Monitorinqi izləyinXəta problemi: nginx Bağlantısı faimonitədə rəhbərlik etmişdir

CWP7 monitor xətasında nginx bağlantısının uğursuzluğu problemini həll edir

sonuncu dəfəChen WeiliangMonit monitorinqini quraşdırmaq üçün CWP İdarəetmə Paneli (CWP7).Proqram təminatı时 ,Monit başlanğıc monitorinq prosesinin yoxa çıxması həll edildi monit.service uğursuz oldu.

İndi yeni problemim var - monitorinq Nginx bağlantısı uğursuz oldu...

Monitdə nginx bağlantısı uğursuzluğunu necə həll etmək olar?

Monit xətası problemində nginx Bağlantısını həll etmək üsulu uğursuz oldu:

Əvvəlcə aşağıdakı əmrə SSH daxil edin ▼

ps -ef|grep nginx

Nginx konfiqurasiya faylı tapıldı:

[root@ten ~]# ps -ef|grep nginx
root 11550 1 0 02:12 ? 00:00:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
nobody 11551 11550 0 02:12 ? 00:00:04 nginx: worker process
nobody 11552 11550 0 02:12 ? 00:00:08 nginx: worker process
nobody 11553 11550 0 02:12 ? 00:00:02 nginx: worker process
nobody 11554 11550 0 02:12 ? 00:00:01 nginx: worker process
nobody 11555 11550 0 02:12 ? 00:00:00 nginx: cache manager process
root 19827 9820 0 02:37 pts/0 00:00:00 grep --color=auto nginx

işə salnginx konfiqurasiya faylı:

/etc/nginx/nginx.conf

Nginx.pid yolunun yerini tapdı:

pid /var/run/nginx.pid;

Monit monitorinq proqramının konfiqurasiya faylında nginx monitorinqi üçün aşağıdakı konfiqurasiyanı daxil edin▼

check process nginx with pidfile /var/run/nginx.pid
start program "/usr/bin/systemctl start nginx.service"
stop program "/usr/bin/systemctl stop nginx.service"
if failed port 8181 protocol http then restart
if 4 restarts within 8 cycles then timeoutif 4 restarts within 8 cycles then timeout

Monitor monitorinq proqramını yenidən başladın▼

systemctl restart monit.service

Monitorinq proqramının statusuna baxın▼

systemctl status monit.service

Bu addıma çatsanız, səhv mesajı hələ də görünür:nginx Connection failed in monit

Lütfən, monitorinq nginx konfiqurasiyasının port nömrəsini "8181" və ya "80" olaraq dəyişməyə cəhd edin:

if failed port 8181 protocol http then restart
if failed port 80 protocol http then restart

Sonra Monitor monitorinq proqramını yenidən başladın▼

systemctl restart monit.service

Monitorinq proqramının statusuna baxın▼

systemctl status monit.service

Monitdə uğursuz nginx Connection problemi nəhayət həll olundu!

发表 评论

E-poçt ünvanınız dərc olunmayacaq. Zəruri sahələrdən istifadə olunur * Etiket

Top gedin