2

I just recently tried to install 'monit' on a server which runs Ubuntu, though when I try to run monit it will always popup the following errors:

test:~$ sudo monit restart all

/etc/monit/monitrc:289: Include failed -- Success '/etc/monit/conf.d/*'

/etc/monit/monitrc:290: Include failed -- Success '/etc/monit/conf-enabled/*'

Cannot create socket to [SERVERIP]:8080 -- Connection refused

Below is the command I used to forward the port 8080 since I changed that in the /etc/monit/monitrc

sudo iptables -A INPUT -p tcp -m tcp --dport 8080 -j ACCEPT 

#printed out when I save my IPtable 
-A INPUT -p tcp -m tcp --dport 8080 -j ACCEPT

I'm not entirely expecting the refused connection being my biggest worries here since I'm apperantly also missing 2 files, I have followed the installation instructions as per their own website.

Monit wiki for installation So right now I'm kinda at my end trying to get this to work.

killstreet
  • 83
  • 1
  • 9

2 Answers2

1

why are you installing it from the source code and not from the ubuntu provided package ? is there is any specific raison for this ?

Did you create the referenced folders ?

Matching line in monitrc like include /etc/monit/conf.d/*

Referenced installation procedure is for M/Monit which is not Monit.

monit is the client tool to interact with monit deamon, so command monit restart all is a bit strange here.

DevOps
  • 720
  • 3
  • 15
0

The issue is with allow and use address in your "vim /etc/monit/monitrc"

set httpd port 2812 and
     use address localhost  # only accept connection from localhost
     allow localhost 

Try to uncomment these lines. Restart the monit service.

mohit
  • 181
  • 8