Tuhinga Tuhinga
Te aro turuki软件I rahua te tiimata ki te aroturuki i te tiimatanga.
Ka timata a Monit i te tukanga aroturuki, ka ngaro, ka akiaki i te monit.service faiarahi.
在Paewhiri Mana CWP (CWP7) hei whakauru i te aroturuki a MonitI muri i te whakaurunga o te rorohiko, ka ngaro te tukanga aroturuki o te whakaoho o Monit, ka puta mai he tohu: monit.service i rahua.
He mea tika kia mohio kua whakamatauria kia taea aisystemctl 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.
Ko nga korero pono e whakaatu ana/var/www/html/nfs
he kōpaki kua utaina ki te puku whatunga mā te NFS.
I timata a Monit i mua i te NFS, no reira kare ano te kōpaki i noho, na te hapa monitError opening the log file '/var/www/html/nfs/monit/stage-web-1.log' for writing -- No such file or directory
.
Me pehea te whakaoti i te ngaronga o te tukanga aroturuki whakaoho Monit monit.service i rahua.?
Ko te mahi whakatika/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
me te tapirinfs.service
到该After
Kei muri.Ko te hua whakamutunga ka penei te ahua:
[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
Ka taea e te kaitirotiro Monit te tiimata angitu i te wa whakaoho.
Hope Chen Weiliang Blog ( https://www.chenweiliang.com/ ) shared "Te Whakaoti i te Monit Startup Monitoring Process Disappearance monit.service i rahua.", he pai ki a koe.
Nau mai ki te tohatoha i te hono o tenei tuhinga:https://www.chenweiliang.com/cwl-1422.html
Nau mai ki te hongere Telegram o te blog a Chen Weiliang ki te tiki i nga korero hou!
📚 He uara nui tenei aratohu, 🌟He waahi onge tenei, kaua e ngaro! ⏰⌛💨
Tohaina me te pai ki te pai koe!
Ko to tiritiri me o hiahia ko to maatau hihiri tonu!