מדריך מאמרים
מוניטור ניטורתוכנההתחלת המעקב בעת ההפעלה נכשלה.
מוניט מתחיל את תהליך הניטור ונעלם, מה שמבקש מ-monit.service faiלד.
在לוח הבקרה של CWP (CWP7) להתקנת ניטור Monitלאחר התקנת התוכנה, תהליך הניטור של הפעלת Monit נעלם, ומופיעה הנחיה: monit.service נכשל.
ראוי לציין שנעשה ניסיון לאפשרsystemctl enable monit
[root@stage-web-1 vagrant]# systemctl status monit
monit.service - Pro-active monitoring utility for unix systems
Loaded: loaded (/usr/lib/systemd/system/monit.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2017-06-01 16:37:00 UTC; 6min ago
Process: 1131 ExecStop=/usr/bin/monit quit (code=exited, status=1/FAILURE)
Process: 1079 ExecStart=/usr/bin/monit -I (code=exited, status=1/FAILURE)
Main PID: 1079 (code=exited, status=1/FAILURE)
Jun 01 16:37:00 stage-web-1 systemd[1]: Started Pro-active monitoring utility for unix systems.
Jun 01 16:37:00 stage-web-1 systemd[1]: Starting Pro-active monitoring utility for unix systems...
Jun 01 16:37:00 stage-web-1 monit[1079]: Error opening the log file '/var/www/html/nfs/monit/stage-web-1.log' for writing -- No such file or directory
Jun 01 16:37:00 stage-web-1 systemd[1]: monit.service: main process exited, code=exited, status=1/FAILURE
Jun 01 16:37:00 stage-web-1 monit[1131]: Error opening the log file '/var/www/html/nfs/monit/stage-web-1.log' for writing -- No such file or directory
Jun 01 16:37:00 stage-web-1 systemd[1]: monit.service: control process exited, code=exited status=1
Jun 01 16:37:00 stage-web-1 systemd[1]: Unit monit.service entered failed state.
Jun 01 16:37:00 stage-web-1 systemd[1]: monit.service failed.
עובדות מראות שכן/var/www/html/nfs
היא תיקיה המותקנת לכונן רשת באמצעות NFS.
Monit הופעל לפני NFS, כך שהתיקיה עדיין לא הייתה קיימת, מה שגרם לשגיאת המוניטError opening the log file '/var/www/html/nfs/monit/stage-web-1.log' for writing -- No such file or directory
.
כיצד לפתור את היעלמות תהליך ניטור ההפעלה של מוניט monit.service נכשל.?
הדרך לעקיפת הבעיה היא עריכה/lib/systemd/system/monit.service
:
[Unit] Description=Pro-active monitoring utility for unix systems After=network.target [Service] Type=simple ExecStart=/usr/bin/monit -I ExecStop=/usr/bin/monit quit ExecReload=/usr/bin/monit reload [Install] WantedBy=multi-user.target
ותוסיףnfs.service
אל הAfter
מֵאָחוֹר.התוצאה הסופית נראית כך:
[Unit]
Description=Pro-active monitoring utility for unix systems
After=network.target nfs.service
[Service]
Type=simple
ExecStart=/usr/bin/monit -I
ExecStop=/usr/bin/monit quit
ExecReload=/usr/bin/monit reload
[Install]
WantedBy=multi-user.target
צג ה-Monit יכול כעת להתחיל בהצלחה בזמן האתחול.
Hope Chen Weiliang בלוג ( https://www.chenweiliang.com/ ) שיתף את "פתרון תהליך ניטור ההפעלה של Monit. ההעלמה monit.service נכשל.", וזה מועיל לך.
מוזמנים לשתף את הקישור של מאמר זה:https://www.chenweiliang.com/cwl-1422.html
ברוכים הבאים לערוץ הטלגרם של הבלוג של Chen Weiliang כדי לקבל את העדכונים האחרונים!
📚 המדריך הזה מכיל ערך עצום, 🌟זו הזדמנות נדירה, אל תפספסו אותה! ⏰⌛💨
שתפו ותעשו לייק אם בא לכם!
השיתוף והלייקים שלך הם המוטיבציה המתמשכת שלנו!