Ad Widget

Collapse

Installed server starts up fine but dashboard says ut's not running

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • caspersgrin
    Junior Member
    • Jul 2013
    • 5

    #1

    Installed server starts up fine but dashboard says ut's not running

    Hi,

    I build Zabbix from source and installed it on a Redhat server for evaluation. I started the server from the command line (./zabbix_server) and it certainly is running, but according to the Dashboard it's not running. Is there some connector that I missed when I built it?

    Thanks,

    Rob Tanner
    Linfield College
  • tchjts1
    Senior Member
    • May 2008
    • 1605

    #2
    See this thread... I think it is what you are experiencing. Alexei gives a suggestion in the last post.

    Comment

    • caspersgrin
      Junior Member
      • Jul 2013
      • 5

      #3
      Thanks for the quick reply but the suggestion is the post you referred me to was to make sure KeepAlive is off, and it was already off. In addition I went and commented out all the various KeepAlive parameters which should be unnecessary since KeepAlive itself is set to off. And it made no difference.

      What I've ben able to determine so far is that whether or not the server is running is determined in the get_status() function in config.inc.php. The line in question is:

      Code:
      $status['zabbix_server'] = zabbixIsRunning() ? _('Yes') : _('Nope');
      (note that I changed 'No' to 'Nope' to see if that was the status reported and confirm I was looking at the right spot.

      The line call the zabbixIsRunning() function below:

      Code:
      function zabbixIsRunning() {
      	global $ZBX_SERVER, $ZBX_SERVER_PORT;
      
      	if (empty($ZBX_SERVER) || empty ($ZBX_SERVER_PORT)) {
      		return false;
      	}
      
      	$result = (bool) fsockopen($ZBX_SERVER, $ZBX_SERVER_PORT, $errnum, $errstr, ZBX_SOCKET_TIMEOUT);
      	if (!$result) {
      		clear_messages();
      	}
      
      	return $result;
      }
      This function attempts to open a socket to, I presume, port 10051. The way I test access to a socket is to telnet to it and see if I get a connection. In this case I get access denied:

      Code:
      telnet localhost 10051
      Trying 127.0.0.1...
      telnet: connect to address 127.0.0.1: Connection refused
      telnet: Unable to connect to remote host: Connection refused
      Also, netstat doesn't show that socket open and listening. If the zabbix_server is supposed to be listening on socket 10051, it appers not to be doing so.

      Any ideas?

      Thanks,
      Rob

      Comment

      • tchjts1
        Senior Member
        • May 2008
        • 1605

        #4
        Originally posted by caspersgrin

        This function attempts to open a socket to, I presume, port 10051. The way I test access to a socket is to telnet to it and see if I get a connection. In this case I get access denied:

        Rob
        Hi Rob. Excellent research. I don't know the answer to your issue, but $ZBX_SERVER_PORT is defined in zabbix.conf.php

        Comment

        • caspersgrin
          Junior Member
          • Jul 2013
          • 5

          #5
          The port is defined as 10051. I suppose I can rebuild the server but I don't see any options in configure to enable or not enable the port listener in the server.

          I built and installed from source, version 2.0.6. Are there any known issues with that version that might be causing my problem?

          ~ Rob

          Comment

          • tchjts1
            Senior Member
            • May 2008
            • 1605

            #6
            I am also on 2.0.6 installed on RHEL. I don't have the frequency of "Zabbix server is not running" that you have, but I will occasionally see that message for 10 or 15 seconds maybe once every week or two.

            Comment

            • vintagegamingsystems
              Member
              • Jun 2013
              • 57

              #7
              service zabbix-server start

              Try to kill your zabbix server process that is running

              Try the command.

              This will work if you have the zabbix server setup in chkconfig.

              Code:
              $ service zabbix-server stop
              Code:
              $ service zabbix-server start
              You can also check the zabbix_server.log file to see if there is anything strange in there.

              I suggest trying an installation via the RHL repositories instead of building it from source.
              Last edited by vintagegamingsystems; 27-07-2013, 15:32.

              Comment

              • trikke76
                Member
                Zabbix Certified Trainer

                • Apr 2013
                • 42

                #8
                it's probably an selinux problem


                semanage port -a -t http_port_t -p tcp 10051


                if u want to use ping u will also have to create a selinux rule to allow zabbix to talk with ping as root
                Last edited by trikke76; 29-07-2013, 11:19.

                Comment

                • caspersgrin
                  Junior Member
                  • Jul 2013
                  • 5

                  #9
                  Actually, I think it's a database issue (assuming that if it doesn't begin to listen on 10051 until it connects to the database). It can't connect and in the zabbix log I get the following:

                  Code:
                  Access denied for user 'root'@'localhost' (using password: NO)
                  But in zabbix.conf.php, I have the following:

                  Code:
                  $DB['TYPE']     = 'MYSQL';
                  $DB['SERVER']   = 'localhost';
                  $DB['PORT']     = '3306';
                  $DB['DATABASE'] = 'zabbix';
                  $DB['USER']     = 'zabbix';
                  $DB['PASSWORD'] = 'secret';
                  As you can see, it's not configured to go to root@localhost, so where is it getting that? Any ideas?

                  Comment

                  • caspersgrin
                    Junior Member
                    • Jul 2013
                    • 5

                    #10
                    'Tis up!!!

                    Found my own answer. The file where the server get's its configuration is /usr/local/etc/zabbix_server.conf. While the PHP file was correct, the server obviously doesn't read that one. With the correct database user and password, it connected to the database and fully came up. It's now listening on port 10051 and the dashboard reports that it's up.

                    Comment

                    • trikke76
                      Member
                      Zabbix Certified Trainer

                      • Apr 2013
                      • 42

                      #11
                      ok great u found it

                      enjoy zabbix.

                      Comment

                      Working...