By khammassi89
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
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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 with use address 12.34.56.789 where 12.34.56.789 is your droplet’s IP address.
Then, reload monit:
sudo reload monit
In your netstat output, we can see that port 2812 is listening on localhost (127.0.0.1):
tcp 0 0 127.0.0.1:2812 0.0.0.0:* LISTEN 3390/monit
In order to make it accessible from the outside, we must edit the file /etc/monit/monitrc and find the section that looks like:
## Monit has an embedded web server which can be used to view status of
## services monitored and manage services from a web interface. See the
## Monit Wiki if you want to enable SSL for the web server.
#
# set httpd port 2812 and
# use address localhost # only accept connection from localhost
# allow localhost # allow localhost to connect to the server and
# allow admin:moinit # require user 'admin' with password 'monit'
and change it to look like:
set httpd port 2812 and
use address your.ip.address # only accept connection from localhost
allow 0.0.0.0/0.0.0.0 # allow localhost to connect to the server and
allow admin:a_password # require user 'admin' with password 'monit'
For the changes to take effect, run sudo reload monit
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.