Monit daemon - error connecting to the monit daemon
Asked Answered
A

2

46

I installed monit and tried to check the status using below command.

monit status

But end up with below error.

monit: error connecting to the monit daemon

How can I fix this?

Appetitive answered 28/1, 2015 at 8:36 Comment(1)
Please note there's a delay when starting up the daemon. I watched monit log till I saw everything was up. Then I did not get that error for status. There is also some editing you need to do (at least for Apache PID location in config file and probably others) on Ubuntu repo default install. You also need to copy the conf's you are using to conf dir.Lawford
A
92

edit vim /etc/monit/monitrc, starting from line 118 and uncomment below lines

 set httpd port 2812
    use address localhost  # only accept connection from localhost
    allow localhost        # allow localhost to connect to the server and
    allow admin:monit

sudo monit reload to take affect

Read more

Appetitive answered 28/1, 2015 at 8:36 Comment(1)
This is already already the case with me, and I was able to control monit earlier, but I no longer can.Novgorod
D
1

Sometimes the problem appears because loopback interface is down . We should bring up the lo interface as follow

root@server:~# ifup lo
Doge answered 1/5, 2017 at 7:29 Comment(3)
Really? Why would lo ever be down? If your loopback interface is down you probably have other problems.Nyx
NO. sudo ifconfig shows interfaces up or down. If down, then run what you have in answer. But: I have never witnessed loopback going down in all my years w/ Linux. (since ~'93)Lawford
@bshea Maybe I was agree with you before this happens . But my experience says everything may happen .Doge

© 2022 - 2024 — McMap. All rights reserved.