Zabbix Unable to monitor the native server

Source: Internet
Author: User

I installed Zabbix on the virtual machine and installed both the server and the agent side, but failed to

[Email protected] ~]# NETSTAT-NALPTU | grep Zabbix
TCP 0 0 0.0.0.0:10050 0.0.0.0:* LISTEN 2176/zabbix_agentd

Monitoring to listen to 10051 ports, the service side is not up, by viewing the Zabbix log zabbix_server.conf (in the directory/tmp/zabbix_server.log) found an error

73415:20181011:184245.845 [Z3001] connection to database ' Zabbix ' failed: [2002] Can ' t connect to local MySQL server Throu GH socket '/var/lib/mysql/mysql.sock ' (2)

Because the/var/lib/mysql/mysql.sock file does not exist,Mysql.sock the correct directory is/tmp/mysql.sock,The Final Solution is:MY.CNF inside the socket path is changed to/tmp/mysql.sock, while Mkdir-p/var/lib/mysql; Touch/var/lib/mysql/mysql.sock,

and made a soft link: ln-s/tmp/mysql.sock/var/lib/mysql/mysql.sock after the normal

Then restart the zabbix_server and zabbix_agentd to properly listen on port 10051

/etc/init.d/zabbix_server restart

/etc/init.d/zabbix_agentd restart

[Email protected] ~]# NETSTAT-NALPTU | grep Zabbix
TCP 0 0 0.0.0.0:10050 0.0.0.0:* LISTEN 2588/zabbix_agentd
TCP 0 0 0.0.0.0:10051 0.0.0.0:* LISTEN 2499/zabbix_server

Zabbix Unable to monitor the native server

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.