Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Monit daemon - error connecting to the monit daemon

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?

like image 777
Techie Avatar asked Jan 28 '15 08:01

Techie


People also ask

How do I restart Monit?

Stop one of the monitored services, like nginx or node-app and wait for monit to restart it. Stop nginx. Wait 2 minutes. View the end of the monit log for when it restarted nginx.

What is Monit in Linux?

Monit is a free, open-source process supervision tool for Unix and Linux. With Monit, system status can be viewed directly from the command line, or via the native HTTP(S) web server. Monit is able to do automatic maintenance, repair, and run meaningful causal actions in error situations.

How do I configure Monit?

Monit has a web interface that runs on port 2812 using a web server. To enable the web interface you need to make changes in the monit configuration file. The main configuration file of monit located at /etc/monit. conf under (RedHat/CentOS/Fedora) and /etc/monit/monitrc file for (Ubuntu/Debian/Linux Mint).

How do I monitor Monit?

How to monitor? Monit is controlled via an easy to configure control file with a simple syntax. The file is called monitrc and resides in your home directory. An example monitrc file is included with the Monit download.


2 Answers

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

like image 92
Techie Avatar answered Sep 28 '22 07:09

Techie


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

root@server:~# ifup lo 
like image 28
Omid Kosari Avatar answered Sep 28 '22 09:09

Omid Kosari