zabbix server 与数据库不在同一台服务器上面

 

 

16312:20170527:095215.225 database is down: reconnecting in 10 seconds  16312:20170527:095225.225 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through so

 

# netstat -lnutp
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:8081                0.0.0.0:*                   LISTEN      29189/java          
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      1134/sshd           
tcp        0      0 0.0.0.0:8090                0.0.0.0:*                   LISTEN      10412/java          
tcp        0      0 0.0.0.0:445                 0.0.0.0:*                   LISTEN      13806/smbd          
tcp        0      0 127.0.0.1:8000              0.0.0.0:*                   LISTEN      10412/java          
tcp        0      0 0.0.0.0:10050               0.0.0.0:*                   LISTEN      4652/zabbix_agentd  
tcp        0      0 0.0.0.0:9092                0.0.0.0:*                   LISTEN      10412/java          
tcp        0      0 127.0.0.1:8005              0.0.0.0:*                   LISTEN      29189/java          
tcp        0      0 0.0.0.0:873                 0.0.0.0:*                   LISTEN      18043/rsync         
tcp        0      0 0.0.0.0:139                 0.0.0.0:*                   LISTEN      13806/smbd          
tcp        0      0 0.0.0.0:80                  0.0.0.0:*                   LISTEN      4430/httpd          
[root@Appsrv63 proc]# /etc/init.d/zabbix-server status
zabbix_server (pid  16434) is running...

 这是因为数据库没有配在本地,所以需要在zabbix-server.conf可配置上数据库的ip

# grep DBHost /etc/zabbix/zabbix_server.conf 
### Option: DBHost
# DBHost=localhost
 DBHost=10.100.0.23  #数据库的ip地址

 

posted @ 2017-05-27 10:56  bass  阅读(1477)  评论(0编辑  收藏  举报