博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
zabbix监控报错zabbix server is not running解决方法
阅读量:4658 次
发布时间:2019-06-09

本文共 1552 字,大约阅读时间需要 5 分钟。

这几天为了做监控在ubuntu服务器上部署了zabbix做监控。过程还是遇到了一些问题,把他记录下来。希望对大家有帮助吧。原文来源:

这里千万记住,zabbix 不建议用最新版本,唉~~~~找个稍微次级版本即可。

这次安装过程过程出现了报错:

zabbix红色弹出报错:zabbix server is not running: the information displayed may not be current       

 

 

网页中不停地有以下红色提示:

zabbix server is not running: the information displayed may not be current.

zabbix server is running | No.

查看/tmp/zabbix_server.log和/tmp/zabbix_agent.log无任何异常。看zabbix_server和zabbix_agent进程、端口都正常

 

从网上查找了很多的资料,众说纷纭,浪费了我大量的时间。

查找问题:

后来还是决定从zabbix的php文件着手,毕竟弹出是zabbix的php系统里面的嘛。

系统会post数据到:zabbix/jsrpc.php?output=json-rpc

返回json数据。代码约在164行开始:

 

case 'zabbix.status':$session = Z::getInstance()->getSession();if (!isset($session['serverCheckResult']) || ($session['serverCheckTime'] + SERVER_CHECK_INTERVAL) <= time()) {	$zabbixServer = new CZabbixServer($ZBX_SERVER, $ZBX_SERVER_PORT, ZBX_SOCKET_TIMEOUT, 0);	$session['serverCheckResult'] = $zabbixServer->isRunning();	$session['serverCheckTime'] = time();}#http://www.jincon.com$result = array(	'result' => (bool) $session['serverCheckResult'],	'message' => $session['serverCheckResult'] ? '' : _('Zabbix server is not running: the information displayed may not be current.'));break;

 

   

 

是的,就这里,首先实例化类:CZabbixServer,然后执行里面的方法:isRunning();

继续跟踪到文件是在:

zabbix/include/classes/server/CZabbixServer.php

最后跟踪方法是在 connect 执行了,

问题出在268行:

            if (!$socket = @fsockopen($this->host, $this->port, $errorCode, $errorMsg, $this->timeout)) {

是的,就在这里,fsockopen为空了。

怎么会为空呢,突然想到是不是被禁用了,phpinfo看了下果然。

 

当然问题找到了,就简单了,解决方法就是:

开启fsockopen函数就可以了。

 

原文来源:    转载请注明出处哈。。。

转载于:https://www.cnblogs.com/jincon/p/3755996.html

你可能感兴趣的文章
DockerToolbox在Win7上的安装和设置
查看>>
【洛谷 1168】动态中位数
查看>>
DNS安装配置
查看>>
bootstrap-treeview 树形菜单带复选框以及级联选择
查看>>
读《大道至简》第一章有感
查看>>
bzoj3238:[Ahoi2013]差异
查看>>
Easy-ARM IMX283 移植RTL8192CU驱动
查看>>
javascript-装饰者模式
查看>>
最近的几个任务
查看>>
去哪儿网2015校园招聘产品经理笔试(时间:2014-9-23)
查看>>
java默认继承
查看>>
关闭 禁用 Redis危险命令
查看>>
三年工作总结
查看>>
MySQL数据库实验:任务二 表数据的插入、修改及删除
查看>>
asp.net网站前台通过DataList展示信息的代码
查看>>
【SAS ADVANCE】Performing Queries Using PROC SQL
查看>>
Hive新功能 Cube, Rollup介绍
查看>>
webpack:(模块打包机)
查看>>
程序员不得不知的座右铭(世界篇)
查看>>
表格-鼠标经过单元格变色(暂不支持IE6)
查看>>