hello i got mysql down problem evrytime i install monit and i open port 2812 but i cant access to my http://ipaddress:2812 i already open 2812 port but not work ? help please or give me any solution to make mysql restart automaticly when down
sudo netstat -ntulp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 834/dovecot
tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN 834/dovecot
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1132/apache2
tcp 0 0 188.226.192.232:53 0.0.0.0:* LISTEN 853/named
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 853/named
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 753/sshd
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 1021/master
tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN 853/named
tcp 0 0 127.0.0.1:2812 0.0.0.0:* LISTEN 3390/monit
tcp 0 0 0.0.0.0:4190 0.0.0.0:* LISTEN 834/dovecot
tcp 0 0 127.0.0.1:10025 0.0.0.0:* LISTEN 1021/master
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 893/mysqld
tcp6 0 0 :::21 :::* LISTEN 1076/proftpd: (acce
tcp6 0 0 :::22 :::* LISTEN 753/sshd
tcp6 0 0 :::25 :::* LISTEN 1021/master
udp 0 0 188.226.192.232:53 0.0.0.0:* 853/named
udp 0 0 127.0.0.1:53 0.0.0.0:* 853/named
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
In your
netstat
output, we can see that port 2812 is listening on localhost (127.0.0.1):In order to make it accessible from the outside, we must edit the file
/etc/monit/monitrc
and find the section that looks like:and change it to look like:
For the changes to take effect, run
sudo reload monit
In your
netstat
output, we can see that port 2812 is listening on localhost (127.0.0.1):In order to make it accessible from the outside, we must edit the file
/etc/monit/monitrc
and find the section that looks like:and change it to look like:
For the changes to take effect, run
sudo reload monit
Hi,
The problem here is that monit is listening on the loopback interface (127.0.0.1) so it’s not accessible externally. To fix that, you need to configure it to listen on the public interface (your droplet’s public IP address) instead.
Edit /etc/monit/monitrc and replace
use address 127.0.0.1
withuse address 12.34.56.789
where12.34.56.789
is your droplet’s IP address.Then, reload monit: