Ad Widget

Collapse

1.6.4: ZABBIX server is running -> No

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • maxpower
    Member
    • Jul 2007
    • 31

    #1

    1.6.4: ZABBIX server is running -> No

    Hi,

    the php frontend shows me in the dashboard (Status of Zabbix) that the zabbix server is not running, but it is !
    Please fix it.

    A part of the bug is in blocks.in.php: ($status['zabbix_server'] == S_YES ? 'off' : 'on')

    YES = on !
    Last edited by maxpower; 29-05-2009, 16:26.
  • technow0rker
    Junior Member
    • Apr 2006
    • 26

    #2
    1.6.4: ZABBIX server is running -> No (interesting details)

    I've discovered interesting thing:

    in includes/config.in.php there's a function called get_status() which attempts to connect to $ZBX_SERVER to port $ZBX_SERVER_PORT and sets and array element $status["zabbix_server"] depending on error or success. Values S_YES adn S_NO are used later in blocks.inc.php to show actual status in human-readable form.

    Now, I know that my Zabbix server is definitely running, I have no selinux enabled. Trying to log $errstr after fsockopen function gave me "Connection refused". Tried to log $ZBX_SERVER and $ZBX_SERVER_PORT variables -- and got and empty strings although they are declared via 'global' in function top.

    Tried to turn register_globals to 'on' in php -- did not help.

    Now, if I replace those $ZBX... variables to 'localhost' and '10051' directly in fsockopen call, I receive correct Zabbix status. So the problem seems to be that $ZBX_SERVER and $ZBX_SERVER_PORT are not assigned proper values.

    Any ideas?

    Regards,
    Alex.

    Comment

    • Aly
      ZABBIX developer
      • May 2007
      • 1126

      #3
      Originally posted by maxpower
      Hi,

      the php frontend shows me in the dashboard (Status of Zabbix) that the zabbix server is not running, but it is !
      Please fix it.

      A part of the bug is in blocks.in.php: ($status['zabbix_server'] == S_YES ? 'off' : 'on')

      YES = on !
      CP from ZBX-929:

      If you would done more research you would notice that 'on' and 'off' is a CSS classes, which represent green coloring for off and red for on. So when server is running we use class 'off' which is for green!!!
      Zabbix | ex GUI developer

      Comment

      • Aly
        ZABBIX developer
        • May 2007
        • 1126

        #4
        Originally posted by technow0rker
        I've discovered interesting thing:

        in includes/config.in.php there's a function called get_status() which attempts to connect to $ZBX_SERVER to port $ZBX_SERVER_PORT and sets and array element $status["zabbix_server"] depending on error or success. Values S_YES adn S_NO are used later in blocks.inc.php to show actual status in human-readable form.

        Now, I know that my Zabbix server is definitely running, I have no selinux enabled. Trying to log $errstr after fsockopen function gave me "Connection refused". Tried to log $ZBX_SERVER and $ZBX_SERVER_PORT variables -- and got and empty strings although they are declared via 'global' in function top.

        Tried to turn register_globals to 'on' in php -- did not help.

        Now, if I replace those $ZBX... variables to 'localhost' and '10051' directly in fsockopen call, I receive correct Zabbix status. So the problem seems to be that $ZBX_SERVER and $ZBX_SERVER_PORT are not assigned proper values.

        Any ideas?

        Regards,
        Alex.
        CP from ZBX-929:

        In zabbix.conf.php those two variables must be defined:

        $ZBX_SERVER = "your.zabbix.server.ip";
        $ZBX_SERVER_PORT = "port";

        They are present by default if you create zabbix.conf.php by frontend install wizard!
        Zabbix | ex GUI developer

        Comment

        • technow0rker
          Junior Member
          • Apr 2006
          • 26

          #5
          Thanks a lot, I did not manage to find this bug

          Actually I was upgrading from previous Zabbix installation (1.4.4) by just upgrading tables, maybe this played the role...

          Regards,
          Alex.

          Comment

          • swaterhouse
            Senior Member
            • Apr 2006
            • 268

            #6
            In the future when you add items like this to the configfuration files can you put a note in the release notes under the uprade section? Seems like a lot of people are getting tripped up on this one.

            Comment

            • kokomo
              Junior Member
              • Apr 2010
              • 16

              #7
              Originally posted by Aly
              CP from ZBX-929:

              In zabbix.conf.php those two variables must be defined:

              $ZBX_SERVER = "your.zabbix.server.ip";
              $ZBX_SERVER_PORT = "port";

              They are present by default if you create zabbix.conf.php by frontend install wizard!
              Execuse me Aly, this is properly configured on my PC and the status is still not running. (Of course it is running and all others are functioning fine.)

              Comment

              • Voxtech
                Junior Member
                • Jan 2011
                • 7

                #8
                Just wanted to add that Ubuntu 10.10 and Zabbix 1.8.2 status is still "No"

                "Solved!"

                Thanks to mgulin

                Last edited by Voxtech; 04-02-2011, 23:08.

                Comment

                • roelandlengers
                  Junior Member
                  • Jan 2012
                  • 2

                  #9
                  Originally posted by kokomo
                  Execuse me Aly, this is properly configured on my PC and the status is still not running. (Of course it is running and all others are functioning fine.)
                  I've had the same problem running 2 separate Zabbix instances (one for prod, one for test). Figured out that using a FQDN for the $ZBX_SERVER fixed it in one environment, but not the other (FQDN is something like servername.mydomain.com, instead of just servername). When I entered the IP-address in stead of a name it worked properly. You might want to try that.

                  Comment

                  Working...