Ad Widget

Collapse

Zabbix server is not running

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • usao
    Junior Member
    • Jan 2015
    • 13

    #1

    Zabbix server is not running

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

    Installed Zabbix 2.4.3

    httpd (pid 1702) is running...
    mysqld (pid 1451) is running...
    zabbix_agentd is stopped
    zabbix_server (pid 1768) is running...

    # grep ZBX_SERVER /etc/zabbix/web/zabbix.conf.php
    $ZBX_SERVER = 'localhost';
    $ZBX_SERVER_PORT = '10051';
    $ZBX_SERVER_NAME = 'zabbix';

    # telnet localhost 10051
    Trying ::1...
    telnet: connect to address ::1: Connection refused
    Trying 127.0.0.1...
    telnet: connect to address 127.0.0.1: Connection refused

    Disabled SELinux, did not fix issue, so I re-enabled SELinux as it "should" be on in principal, and there should be a "acceptable" configuration for Zabbix to work with SELinux, although I have not yet found what that is...
  • tchjts1
    Senior Member
    • May 2008
    • 1605

    #2
    Perhaps this post may help you:

    Comment

    • usao
      Junior Member
      • Jan 2015
      • 13

      #3
      Originally posted by tchjts1
      Error still shows on webpage, and still cannot telnet to port.
      [root@zabbix ~]# getsebool httpd_can_network_connect
      httpd_can_network_connect --> on
      [root@zabbix ~]# telnet localhost 10051
      Trying ::1...
      telnet: connect to address ::1: Connection refused
      Trying 127.0.0.1...
      telnet: connect to address 127.0.0.1: Connection refused

      Comment

      • usao
        Junior Member
        • Jan 2015
        • 13

        #4
        I also added the following 2 iptables rules just before the REJECT line in /etc/sysconfig/iptables and rebooted the server just to make sure, but it's still not working. Still getting the error on the web page...

        -A INPUT -m state --state NEW -m tcp -p tcp --dport 10050 -j ACCEPT
        -A INPUT -m state --state NEW -m tcp -p tcp --dport 10051 -j ACCEPT

        Comment

        • tchjts1
          Senior Member
          • May 2008
          • 1605

          #5
          What do you see when you do ps -ef|grep zabbix?

          Also, take zabbix.conf.php into your editor and make sure all the settings look correct. Additionally, as a troubleshooting step you may want to make the entries for $DB["SERVER"] =; and $ZBX_SERVER = ; the actual IP's of your DB server and Zabbix server, instead of using 'localhost'

          Also look at your zabbix_server.log and your Apache log for any obvious errors.

          Comment

          • usao
            Junior Member
            • Jan 2015
            • 13

            #6
            [root@zabbix ~]# ps -ef | grep zabbix
            zabbix 1371 1 0 14:21 ? 00:00:00 zabbix_server -c /etc/zabbix/zabbix_server.conf
            root 1454 1428 0 16:24 pts/0 00:00:00 grep zabbix

            Both the variables are 'localhost', are you suggesting I put in 127.0.0.1 instead of 'localhost'?

            $DB['SERVER'] = 'localhost';
            $ZBX_SERVER = 'localhost';

            From logs:
            1371:20150120:162825.537 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)
            1371:20150120:162825.537 database is down: reconnecting in 10 seconds
            Last edited by usao; 21-01-2015, 01:29.

            Comment

            • tchjts1
              Senior Member
              • May 2008
              • 1605

              #7
              You could try 127.0.0.1, but I was referring to using the actual IP of that server . I have never used localhost, nor the localhost IP (127.0.0.1)

              Comment

              • usao
                Junior Member
                • Jan 2015
                • 13

                #8
                Update. I tried the IP address, but no change in behavior.

                All the processes seem to be running:
                httpd (pid 1327) is running...
                mysqld (pid 1221) is running...
                zabbix_server (pid 1340) is running...

                Ive made sure the firewall is not an issue:
                ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:zabbix-agent
                ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:zabbix-trapper
                httpd_can_network_connect --> on

                but front-end website still complains that Zabbix is not running.

                Comment

                • ingus.vilnis
                  Senior Member
                  Zabbix Certified Trainer
                  Zabbix Certified SpecialistZabbix Certified Professional
                  • Mar 2014
                  • 908

                  #9
                  Hi,

                  Can you also check this one?
                  Code:
                  zabbix_can_network --> on
                  And maybe temporary turn off SELinux?
                  Code:
                  setenforce 0
                  Best Regards,
                  Ingus

                  Comment

                  • tchjts1
                    Senior Member
                    • May 2008
                    • 1605

                    #10
                    He already tried it with SELinux off.

                    When you do ps -ef|grep zabbix, you should see multiples instances of the Zabbix server process running. Like a dozen or more. The fact that you are only seeing the one instance of the cmd you used to launch the Zabbix server process is a clear indicator Zabbix server is not running.

                    Comment

                    • usao
                      Junior Member
                      • Jan 2015
                      • 13

                      #11
                      What im seeing is the following:

                      root 1119 1 0 08:17 ? 00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock --pid-file=/var/run/mysqld/mysqld.pid --basedir=/usr --user=mysql
                      mysql 1221 1119 0 08:17 ? 00:00:06 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/lib/mysql/mysql.sock
                      root 1327 1 0 08:17 ? 00:00:00 /usr/sbin/httpd
                      zabbix 1340 1 0 08:17 ? 00:00:00 zabbix_server -c /etc/zabbix/zabbix_server.conf
                      apache 1350 1327 0 08:17 ? 00:00:08 /usr/sbin/httpd
                      apache 1351 1327 0 08:17 ? 00:00:08 /usr/sbin/httpd
                      apache 1352 1327 0 08:17 ? 00:00:08 /usr/sbin/httpd
                      apache 1353 1327 0 08:17 ? 00:00:07 /usr/sbin/httpd
                      apache 1354 1327 0 08:17 ? 00:00:08 /usr/sbin/httpd
                      apache 1355 1327 0 08:17 ? 00:00:07 /usr/sbin/httpd
                      apache 1357 1327 0 08:17 ? 00:00:07 /usr/sbin/httpd
                      apache 1358 1327 0 08:17 ? 00:00:07 /usr/sbin/httpd
                      apache 1819 1327 0 08:28 ? 00:00:07 /usr/sbin/httpd
                      apache 1839 1327 0 08:29 ? 00:00:07 /usr/sbin/httpd
                      apache 3152 1327 0 09:45 ? 00:00:02 /usr/sbin/httpd

                      Comment

                      • ingus.vilnis
                        Senior Member
                        Zabbix Certified Trainer
                        Zabbix Certified SpecialistZabbix Certified Professional
                        • Mar 2014
                        • 908

                        #12
                        Hi,

                        tchjts1, thank you for noticing it! I must have missed some lines while reading this.

                        I wonder what can we do about the database?

                        How did you install the database? What manual did you follow and what steps did you execute.

                        What OS are you running here, btw?

                        I might have some setp-by-step notes on how to configure all that on CentOS 6 and Ubuntu by using packages. I can post them here if you like.

                        Best Regards,
                        Ingus

                        Originally posted by tchjts1
                        He already tried it with SELinux off.

                        When you do ps -ef|grep zabbix, you should see multiples instances of the Zabbix server process running. Like a dozen or more. The fact that you are only seeing the one instance of the cmd you used to launch the Zabbix server process is a clear indicator Zabbix server is not running.

                        Comment

                        • usao
                          Junior Member
                          • Jan 2015
                          • 13

                          #13
                          These are the exact steps/sequence I used to install Zabbix on CentOS 6.6. The only part I missed was setting the DBPassword, after I set that, things started working, although I still only see 1 zabbix process at the unix level. All seems to be working now.
                          Always looking for improvements in the process though, so happy to accept suggestions.

                          == Zabbix Server ================================================== =============
                          # Install MySQL
                          yum install -y mysql mysql-server
                          chkconfig --levels 235 mysqld on
                          service mysqld start
                          mysql_secure_installation # Accept ALL defaults, enter NEW password when requested

                          # Install Apache
                          yum install -y httpd
                          chkconfig --levels 235 httpd on
                          service httpd start

                          # Adjust IPTables/SELinux
                          vi /etc/sysconfig/iptables # In FRONT of first REJECT line
                          -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
                          -A INPUT -m state --state NEW -m tcp -p tcp --dport 10050 -j ACCEPT
                          -A INPUT -m state --state NEW -m tcp -p tcp --dport 10051 -j ACCEPT
                          service iptables restart
                          setsebool -P httpd_can_network_connect on

                          # Install PHP
                          yum install -y php php-cli php-common php-devel php-pear php-gd php-mbstring php-mysql php-xml

                          # Install Zabbix 2.4
                          rpm -ivh http://repo.zabbix.com/zabbix/2.4/rh...el6.noarch.rpm
                          yum install -y zabbix-server-mysql zabbix-web-mysql zabbix-agent zabbix-javagateway

                          # Adjust CONFIG files
                          vi /etc/php.ini
                          date.timezone = America/Phoenix
                          vi /etc/httpd/conf.d/zabbix.conf
                          php_value date.timezone America/Phoenix
                          vi /etc/zabbix/zabbix_server.conf
                          DBPassword=abc123
                          service httpd restart

                          # Create Zabbix database
                          mysql -u root -p
                          Enter password: <password>
                          mysql> CREATE DATABASE zabbix CHARACTER SET UTF8;
                          mysql> GRANT ALL PRIVILEGES on zabbix.* to 'zabbix'@'localhost' IDENTIFIED BY 'abc123';
                          mysql> FLUSH PRIVILEGES;
                          mysql> quit

                          # Restore the default Zabbix MySQL database files
                          mysql -u zabbix -p zabbix -D zabbix < /usr/share/doc/zabbix-server-mysql-2.4.3/create/schema.sql
                          mysql -u zabbix -p zabbix -D zabbix < /usr/share/doc/zabbix-server-mysql-2.4.3/create/images.sql
                          mysql -u zabbix -p zabbix -D zabbix < /usr/share/doc/zabbix-server-mysql-2.4.3/create/data.sql
                          chkconfig --levels 235 zabbix-server on
                          service zabbix-server start
                          WEB: http://zabbix/zabbix/setup.php

                          Comment

                          • tchjts1
                            Senior Member
                            • May 2008
                            • 1605

                            #14
                            Originally posted by usao
                            although I still only see 1 zabbix process at the unix level.
                            I suppose it is possible that on a bare-bones system with all default values in place in the zabbix_server.conf and no hosts yet reporting in, that you may only see one instance of Zabbix server process running. It has probably been 8 years since I have had such a setup though.

                            Once you start incrementing your pollers and trappers and the like, you will start seeing multiples instances of the process running.

                            Glad it is now working for you.

                            You asked about configuration tuning. One of the first things I do on a new install is to increment the Timeout= value in zabbix_server.conf. I don't know what the default is in 2.4, but in previous versions it is set to 3. I personally think they should make the default set to 10 as we see a fair number of issues in the forums with it being set so low.

                            It will be worth your time to have a look at this post as well: https://www.zabbix.com/forum/showthread.php?t=47781

                            The information that those graphs provide is invaluable as your Zabbix installation matures and grows. Get into a habit of looking at those regularly. It is a good idea to build a screen ( Configuration --> Screens ) and put those graphs in it along with other pertinent graphs about your Zabbix App and DB server.

                            Comment

                            • alesantana7
                              Junior Member
                              • Apr 2017
                              • 3

                              #15
                              Solved !

                              I had the same problem with my Zabbix 3.2 on Ubuntu 16.04:

                              zabbix-server is not running the information displayed may not be current


                              SELinux = disabled


                              I just edited the file zabbix-server.conf uncomented CacheSize = 8M and increased de Cache to 32M.

                              Alexandre Santana

                              Comment

                              Working...