zoukankan      html  css  js  c++  java
  • zabbix server is not running: the information displayed may not be current

    正常安装完zabbix后,登录后zabbix监控报错zabbix server is not running: the information displayed may not be current

    下面的几种情况都有可能引起这个错误,

    1. selinux是否关闭。一定要关闭这个,开启selinux会引起一连串问题,甚至zabbix的discovery功能也不能正常使用

    关闭SELinux的方法:
    修改/etc/selinux/config文件中的SELINUX="" 为 disabled ,然后重启。
    如果不想重启系统,使用命令setenforce 0
    注:
    setenforce 1 设置SELinux 成为enforcing模式
    setenforce 0 设置SELinux 成为permissive模式 
    在lilo或者grub的启动参数中增加:selinux=0,也可以关闭selinux
    常见访问首页报错:

    2. zabbix web目录下面  $ZBX_SERVER 是否为ip,如果是localhost,ping下localhost是否能解析。如果不能,需要在/etc/hosts文件里增加相应的项目

    3.查看php的fsockopen模块是否启用。

    方法一:

      第一步:

      php.ini文件中查找

      allow_url_fopen = On

      使其值为On

      第二步:

      php.ini文件中查找

      extension=php_openssl.dll

      如果前面有分号,去掉分号

      第三步:

      重启web服务器,apache或IIS

      还有一种情况,也就是方法二:

      1. vi php.ini

      找到 allow_url_fopen 这个参数设置成 On,即

      allow_url_fopen = On

      2. 让你的php支持 opensll扩展。

      默认,是没有openssl扩展的,只能重新编译安装。

      yum install openssl openssl-devel

      cd /usr/local/src/php-5.2.14/ext/openssl

      /usr/local/php/bin/phpize

      ./configure –with-openssl –with-php-config=/usr/local/bin/php-config

      make && make install

      看提示,把编译成的openssl.so 拷贝到你在php.ini 中指定的 extension_dir 下

      3. vi php.ini

      加入

      extension=openssl.so

      4. 重启web server

    ===============

    其它方面的修改:

    1、zabbix服务器客户端接口改为真实的IP地址:

    2、Mysql服务器zabbix用户要开启远程访问:

    grant all PRIVILEGES on zabbix.* to zabbix@'%' identified by '密码';  --使用授权方式允许zabbix用户远程访问。

    mysql -uzabbix -p -h192.168.1.123  ----zabbix用户可使用-h参数指定ip登录,则远程登录正常。  

    3、修改配置文件:

    -------zabbix_server.conf配置文件检查以下参数是否正确:DBHost设置成IP地址; DBUser、DBName、DBPassword、DBPort是否正确。

    -------zabbix_agentd.conf配置文件:Server及ServerActive设置为服务器IP。

    -------/usr/sbin/setsebool  -P httpd_can_network_db on  --设置selinux这两个参数为on,如果selinux已设置为disabled,并重启,则可不用设置。

    ------/usr/sbin/setsebool -P httpd_can_network_connect_db on

    4、 zabbix.conf.php配置文件

    修改该配置文件如下:

    [root@zabbix-server]# find / -name zabbix.conf.php
    /etc/zabbix/web/zabbix.conf.php
    [root@zabbix-server]# vi /etc/zabbix/web/zabbix.conf.php

    <?php
    // Zabbix GUI configuration file.
    global $DB;
    
    $DB['TYPE']     = 'MYSQL';
    $DB['SERVER']   = '192.168.1.123';
    $DB['PORT']     = '0';
    $DB['DATABASE'] = 'zabbix';
    $DB['USER']     = 'zabbix';
    $DB['PASSWORD'] = 'zabbix';
    
    // Schema name. Used for IBM DB2 and PostgreSQL.
    $DB['SCHEMA'] = '';
    
    $ZBX_SERVER      = '192.168.1.123';
    $ZBX_SERVER_PORT = '10051';
    $ZBX_SERVER_NAME = '';
    
    $IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG;

    常见错误日志:

    [root@zabbix]# find / -name zabbix_server.log
    /tmp/zabbix_server.log
    /var/log/zabbix/zabbix_server.log

    cannot send list of active checks to [127.0.0.1]: host [Zabbix server] not monitored。

    zabbix_server [13238]: Is this process already running? Could not lock PID file [/var/run/zabbix/zabbix_server.pid]: [11] Resource temporarily unavailable

    注意:修改完配置文件后须重启对应服务,如zabbix-server,zabbix-agent,httpd,mysql等。

  • 相关阅读:
    响应式笔记(1)
    javascript复制文章加版权声明代码
    div的水平和垂直居中
    javascript随机打乱数组
    javascript操作字符串的方法
    《Javascript高级程序设计》读书笔记(1-3章)
    一个将 footer 保持在底部的最好方法
    Python内置的字符串处理函数整理
    c c++怎么判断一个字符串中是否含有汉字
    shell的if判断
  • 原文地址:https://www.cnblogs.com/rusking/p/4441362.html
Copyright © 2011-2022 走看看