CWP7 への対処 モニタリングの監視エラー問題: nginx 接続 faiモントで導かれた

前回チェン・ウェイリアンでMonitモニタリングをインストールするためのCWPコントロールパネル(CWP7)ソフトウェアとき、Monit起動監視プロセスの消失を解決しましたmonit.serviceが失敗しました。
今、私は新しい問題を抱えています-Nginx接続の監視に失敗しました...
monitで失敗したnginx接続を解決するには?
nginx Connection failed in monit エラーの問題を解決する方法:
まず、以下のコマンドにSSHで接続▼
ps -ef|grep nginxnginx 構成ファイルが見つかりました。
[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 timeoutMonit監視プログラムを再起動します▼
systemctl restart monit.serviceMonitモニタリングプログラムのステータスを表示する▼
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.serviceMonitモニタリングプログラムのステータスを表示する▼
systemctl status monit.servicemonitでnginx接続が失敗する問題がついに解決されました!
Hope Chen Weiliang ブログ ( https://www.chenweiliang.com/ )共有された「CWP7はmonitエラーでnginx接続が失敗する問題を解決します」、これはあなたに役立ちます。
この記事のリンクを共有することを歓迎します。https://www.chenweiliang.com/cwl-1423.html
さらに多くの隠されたトリックのロックを解除するには、Telegram チャンネルにぜひご参加ください。
気に入ったらシェアして「いいね!」してください!あなたのシェアと「いいね!」が私たちの継続的なモチベーションです。