CWP7 ແກ້ໄຂບັນຫາຂອງການເຊື່ອມຕໍ່ nginx ລົ້ມເຫລວໃນ monit error

ການແກ້ໄຂບັນຫາຄວາມຜິດພາດໃນການຕິດຕາມກວດກາ CWP7 Monit : ການເຊື່ອມຕໍ່ nginx ລົ້ມເຫລວ ໃນການຕິດຕາມກວດກາ

CWP7 ແກ້ໄຂບັນຫາຂອງການເຊື່ອມຕໍ່ nginx ລົ້ມເຫລວໃນ monit error

ຄັ້ງສຸດທ້າຍ, ເມື່ອ Chen Weiliang ຕິດຕັ້ງ ຊອບແວ ຕິດຕາມກວດກາ Monit ໃນ ແຜງຄວບຄຸມ CWP (CWP7) , ລາວໄດ້ແກ້ໄຂບັນຫາຂອງຂະບວນການຕິດຕາມກວດກາ Monit ທີ່ຫາຍໄປເມື່ອເລີ່ມຕົ້ນ (monit.service ລົ້ມເຫລວ).

ຕອນນີ້ຂ້ອຍມີບັນຫາໃຫມ່ - ການກວດສອບການເຊື່ອມຕໍ່ Nginx ລົ້ມເຫລວ ...

ວິທີການແກ້ໄຂການເຊື່ອມຕໍ່ nginx ລົ້ມເຫລວໃນ monit?

ວິທີການແກ້ໄຂບັນຫາການເຊື່ອມຕໍ່ nginx ລົ້ມເຫລວໃນການຕິດຕາມບັນຫາ:

ທໍາອິດ, SSH ເຂົ້າໄປໃນຄໍາສັ່ງຕໍ່ໄປນີ້ ▼

ps -ef|grep nginx

ພົບໄຟລ໌ການຕັ້ງຄ່າ nginx:

[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

ເປີດ ໄຟລ໌ການຕັ້ງຄ່າ nginx :

/etc/nginx/nginx.conf

ພົບສະຖານທີ່ເສັ້ນທາງຂອງ nginx.pid:

pid /var/run/nginx.pid;

ໃນໄຟລ໌ການຕັ້ງຄ່າຂອງໂປລແກລມຕິດຕາມ Monit, ໃສ່ການຕັ້ງຄ່າຕໍ່ໄປນີ້ເພື່ອກວດສອບ nginx▼

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

ເລີ່ມໂຄງການຕິດຕາມ Monit ຄືນໃໝ່▼

systemctl restart monit.service

ເບິ່ງສະຖານະໂຄງການຕິດຕາມ Monit ▼

systemctl status monit.service

ຖ້າ​ຫາກ​ວ່າ​ຂັ້ນ​ຕອນ​ນີ້​ແມ່ນ​ບັນ​ລຸ​ໄດ້​, ຂໍ້​ຄວາມ​ຜິດ​ພາດ​ຍັງ​ປະ​ກົດ​ວ່າ​:nginx Connection failed in monit

ກະ​ລຸ​ນາ​ພະ​ຍາ​ຍາມ​ປັບ​ປຸງ​ແກ້​ໄຂ​ຕົວ​ເລກ​ພອດ​ຂອງ​ການ​ຕັ້ງ​ຄ່າ nginx ການ​ຕິດ​ຕາມ​ກວດ​ກາ​ເປັນ "8181​" ຫຼື "80​"​:

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

ຈາກນັ້ນ, ເລີ່ມໂຄງການຕິດຕາມ Monit ຄືນໃໝ່▼

systemctl restart monit.service

ເບິ່ງສະຖານະໂຄງການຕິດຕາມ Monit ▼

systemctl status monit.service

ບັນຫາຂອງການເຊື່ອມຕໍ່ nginx ລົ້ມເຫລວໃນ monit ໄດ້ຖືກແກ້ໄຂໃນທີ່ສຸດ!

ຫວັງວ່າ ບົດຄວາມ "ການແກ້ໄຂການເຊື່ອມຕໍ່ nginx ລົ້ມເຫລວໃນຄວາມຜິດພາດຂອງ monit" ທີ່ແບ່ງປັນໃນ ບລັອກຂອງ Chen Weiliang ( https://www.chenweiliang.com/ ) ຈະເປັນປະໂຫຍດຕໍ່ທ່ານ.

ຮູ້ສຶກວ່າບໍ່ເສຍຄ່າທີ່ຈະແບ່ງປັນລິ້ງຂອງບົດຄວາມນີ້: https://www.chenweiliang.com/cwl-1423.html

ເພື່ອປົດລັອກເຄັດລັບທີ່ເຊື່ອງໄວ້ເພີ່ມເຕີມ🔑, ຍິນດີຕ້ອນຮັບເຂົ້າສູ່ຊ່ອງ Telegram ຂອງພວກເຮົາ!

Share and like ຖ້າທ່ານມັກມັນ! ການແບ່ງປັນ ແລະຖືກໃຈຂອງເຈົ້າເປັນແຮງຈູງໃຈຢ່າງຕໍ່ເນື່ອງຂອງພວກເຮົາ!

 

评论评论

您的邮箱地址不会被公开。必填项已用*标注

ເລື່ອນໄປທາງເທີງ