简体   繁体   中英

monit: unrecognized service

I've installed monit on my Centos 5.11 server (has Webmin/Virtualmin) using YUM and all appeared to be OK. I found it wasn't starting at boot and since trying to get this to happen when I try and start the monit service I now get:

# service monit start
monit: unrecognized service

I've tried removing and reinstalling it...

# yum remove monit
Remove        1 Package(s)
Reinstall     0 Package(s)
Downgrade     0 Package(s)

Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
service monit does not support chkconfig
Error in PREUN scriptlet in rpm package m

Removed:
  monit.x86_64 0:4.10.1-9.el5
Complete!

and

# yum install monit
Finished
Setting up Install Process
Package monit-4.10.1-9.el5.x86_64 already installed and latest version
Nothing to do

So doesn't reinstall it, seems the 'remove' hasn't removed it and then the install isn't then installing it so I still get:

# service monit start
monit: unrecognized service

Can anyone advise what I need to do to resolve this issue?

I faced this issue earlier and adding the below to my monit.conf file helped as it starts its web service locally. Please make sure to bounce the monit daemon by doing "monit quit" or kill monit process and then "monit -t" and then "monit".

# Allow localhost to start and connect to monit httpd server locally
set httpd port 2812
use address localhost
allow localhost
check system localhost

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM