Ad Widget

Collapse

Zabbix server is not running

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • teddyg
    Junior Member
    • Mar 2018
    • 7

    #1

    Zabbix server is not running

    Hi there,

    I am new to zabbix as well as linux so I may be overlooking something very basic. Your time taking a look at this is appreciated.
    I have built a CentOS 7 server and installed Zabbix 3.4.7.
    I am able to log in to the frontend successfully but get an message saying "Zabbix server is not running: the information displayed may not be current"

    I have tried to fix this with a few things;
    First by confirming the service is actually running on the server with systemctl status zabbix-server
    I have confirmed zabbix.conf.php and zabbix_server.conf have the same settings.
    I have run setsebool to change "httpd_can_network_connect", "httpd_can_connect_zabbix" and "zabbix_can_network" to "on"
    Through firewalld I have allowed port 10051 (and can confirm it is listed using firewall-cmd --zone=public --list-all)
    When I run "nmap -sT localhost -p 10051" the STATE is closed. I think that, that is where the root of the problem is but not sure how to fix it?
    Do I need to do any sort of config for port 10050?

    Again, I apprecate the time for assistnance. Thanks in advance.
    Last edited by teddyg; 20-03-2018, 06:59. Reason: included zabbix version. Added question about port 10050
  • teddyg
    Junior Member
    • Mar 2018
    • 7

    #2
    I have checked the zabbix_server.log file and it is filled with

    [Z3001] connection to database 'zabbix_db' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
    Last edited by teddyg; 22-03-2018, 07:22.

    Comment

    • vesper1978
      Member
      • Nov 2016
      • 59

      #3
      Can you connect to the DB using the zabbix user + pass from the zabbix server?

      Comment

      • teddyg
        Junior Member
        • Mar 2018
        • 7

        #4
        Originally posted by vesper1978
        Can you connect to the DB using the zabbix user + pass from the zabbix server?
        Yes I believe so, when I enter in
        mysql -u zabbix -p zabbix_db
        and then enter in the password it connects through.
        Also want to include that I have installed everything on just the one server; frontend, db, server.
        When I check the grants for zabbix@localhost:

        GRANT ALL PRIVILEGES ON *.* TO 'zabbix'@'localhost' IDENTIFIED BY PASSWORD '*string of numbers and characters'
        GRANT ALL PRIVILEGES ON 'zabbix_db'.* TO 'zabbix'@'localhost'
        Last edited by teddyg; 22-03-2018, 02:11.

        Comment

        • teddyg
          Junior Member
          • Mar 2018
          • 7

          #5
          Figured the next step is to share my config files.

          /etc/zabbix/zannix_server.conf (these are all the uncommented entries found by

          grep -v '#' zabbix_server.conf

          Code:
          LogFile=/var/log/zabbix/zabbix_server.log
          LogFileSize=0
          PidFile=/var/run/zabbix/zabbix_server.pid
          SocketDir=/var/run/zabbix
          DBName=zabbix_db
          DBUser=zabbix
          DBPassword='zabbixdbpass'
          SNMPTrapperFile=/var/log/snmptrap/snmptrap.log
          Timeout=4
          AlertScriptsPath=/usr/lib/zabbix/alertscripts
          ExternalScripts=/usr/lib/zabbix/externalscripts
          LogSlowQueries=3000
          /etc/zabbix/web/zabbix.conf.php

          Code:
          // Zabbix GUI configuration file.
          global $DB;
          
          $DB['TYPE']     = 'MYSQL';
          $DB['SERVER']   = 'localhost';
          $DB['PORT']     = '0';
          $DB['DATABASE'] = 'zabbix_db';
          $DB['USER']     = 'zabbix';
          $DB['PASSWORD'] = 'zabbixdbpass';
          
          // Schema name. Used for IBM DB2 and PostgreSQL.
          $DB['SCHEMA'] = '';
          
          $ZBX_SERVER      = 'localhost';
          $ZBX_SERVER_PORT = '10051';
          $ZBX_SERVER_NAME = '';
          
          $IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG;
          Last edited by teddyg; 22-03-2018, 02:18.

          Comment

          • huangyingja
            Junior Member
            • Apr 2015
            • 27

            #6
            first ,
            1- check daemon zabbix-server running or not
            ps ax |grep zabbix
            2- check /var/log/zabbix/zabbix-server.log any error messages
            tail -f /var/log/zabbix/zabbix-server.log
            and start zabbix-server service
            3- check zabbix front-end config
            # cat /etc/zabbix/web/zabbix.conf.php
            $ZBX_SERVER = '10.10.10.10';
            $ZBX_SERVER_PORT = '10051';

            zabbix front-end to zabbix server should be port 10051 , not 10050

            Comment

            • teddyg
              Junior Member
              • Mar 2018
              • 7

              #7
              Originally posted by huangyingja
              first ,
              1- check daemon zabbix-server running or not
              ps ax |grep zabbix
              2- check /var/log/zabbix/zabbix-server.log any error messages
              tail -f /var/log/zabbix/zabbix-server.log
              and start zabbix-server service
              3- check zabbix front-end config
              # cat /etc/zabbix/web/zabbix.conf.php
              $ZBX_SERVER = '10.10.10.10';
              $ZBX_SERVER_PORT = '10051';

              zabbix front-end to zabbix server should be port 10051 , not 10050
              1:
              750 ? Ss 0:00 avahi-daemon: running [zabbix.local]
              1184 ? S 0:03 /usr/sbin/zabbix_server -c /etc/zabbix/zabbix_server.conf
              1986 ? Ss 0:00 sshd: zabbix [priv]
              1991 ? S 0:00 sshd: zabbix@pts/0
              5361 pts/0 S+ 0:00 grep --color=auto zabbix

              2:
              [Z3001] connection to database 'zabbix_db' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
              Zabbix-server.service is running, checked with systemctl status zabbix-server.service

              3.
              global $DB;

              $DB['TYPE'] = 'MYSQL';
              $DB['SERVER'] = 'localhost';
              $DB['PORT'] = '0';
              $DB['DATABASE'] = 'zabbix_db';
              $DB['USER'] = 'zabbix';
              $DB['PASSWORD'] = 'zabbixdbpass';

              // Schema name. Used for IBM DB2 and PostgreSQL.
              $DB['SCHEMA'] = '';

              $ZBX_SERVER = 'localhost';
              $ZBX_SERVER_PORT = '10051';
              $ZBX_SERVER_NAME = '';

              $IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG;

              -----------------------------------------------

              I also just disabled SElinux by editing /etc/sysconfig/selinux and rebooting.
              Checked sestatus and confirmed SELinux status: disabled
              Error still exists on frontend.
              I have reverted that change.


              Last edited by teddyg; 23-03-2018, 02:56.

              Comment

              • huangyingja
                Junior Member
                • Apr 2015
                • 27

                #8
                Access denied for user 'zabbix'@'localhost' (using password: YES)
                <- please allow zabbix to query " zabbix_db "

                mysql> grant all privileges on zabbix_db.* to zabbix@localhost identified by 'zabbixdbpass';

                Comment

                • teddyg
                  Junior Member
                  • Mar 2018
                  • 7

                  #9
                  Originally posted by huangyingja
                  Access denied for user 'zabbix'@'localhost' (using password: YES)
                  <- please allow zabbix to query " zabbix_db "

                  mysql> grant all privileges on zabbix_db.* to zabbix@localhost identified by 'zabbixdbpass';
                  Thanks,
                  As mentioned above those privileges have already been granted:
                  When I do show grants for zabbix@localhost;

                  | Grants for zabbix@localhost |
                  +------------------------------------------------------------------------------------------------------------------------+
                  | GRANT ALL PRIVILEGES ON *.* TO 'zabbix'@'localhost' IDENTIFIED BY PASSWORD '*4504DC3515313C63EE38C4A23A8DACA5DC306DA7' |
                  | GRANT ALL PRIVILEGES ON `zabbix_db`.* TO 'zabbix'@'localhost'

                  I removed the bottom grant and re-added it, flushing on the way and no change.

                  Have attached status on frontend incase that helps.


                  Click image for larger version

Name:	zabbix.PNG
Views:	104660
Size:	4.5 KB
ID:	355718


                  Comment

                  • belac
                    Junior Member
                    • Apr 2018
                    • 1

                    #10
                    I am experiencing what appears to be the exact same issue. I will be watching this closely. thx

                    Comment

                    • -pinguin-
                      Junior Member
                      • Jun 2018
                      • 7

                      #11
                      Hi,

                      I found a solution.

                      See here:
                      Last edited by -pinguin-; 22-06-2018, 13:16.

                      Comment

                      • jsmalisa
                        Junior Member
                        • Aug 2019
                        • 1

                        #12
                        I am getting this

                        ++++++++++++++
                        support@tpng-zabbix-nms:~$ sudo systemctl status zabbix-server.service
                        ● zabbix-server.service - Zabbix Server
                        Loaded: loaded (/lib/systemd/system/zabbix-server.service; enabled; vendor preset: enabled)
                        Active: activating (auto-restart) (Result: exit-code) since Fri 2019-08-16 18:12:33 +10; 2s ago Process: 35579 ExecStart=/usr/sbin/zabbix_server -c $CONFFILE (code=exited, status=0/SUCCESS)
                        Main PID: 35594 (code=exited, status=1/FAILURE)

                        Aug 16 18:12:33 tpng-zabbix-nms systemd[1]: zabbix-server.service: Main process exited, code=exiteAug 16 18:12:33 tpng-zabbix-nms systemd[1]: zabbix-server.service: Failed with result 'exit-code'.
                        ++++++++++++++


                        Tried restarting service but still same issue

                        Comment

                        • 1berto
                          Senior Member
                          • Sep 2018
                          • 182

                          #13
                          What is in zabbix log files?
                          journalctl -xe
                          systemctl status zabbix-server.service

                          I have a similar problem, the server was up, but no new values were read, no log change, etc. It was a permission problem (in the log file), so i recreated it and everything went ok



                          Comment

                          • OzCuRo
                            Junior Member
                            • Aug 2019
                            • 2

                            #14
                            You can test to upgrade cache size, works for me

                            Comment

                            • Acheron
                              Junior Member
                              • Feb 2020
                              • 3

                              #15
                              I do have the same issue, and it got fixed.

                              My error:
                              In the Zabbix webpage, it shows
                              No
                              I found something like below in the logs.

                              connection to database 'zabbix' failed: [1130] Host 'zabbix.server.com' is not allowed to connect to this MariaDB server.
                              connection to database 'zabbix' failed: [1045]

                              both the error was due to the DB connectivity, in the /etc/zabbix/zabbix_server.conf file I used DBHOST as my server IP.


                              GRANT ALL PRIVILEGES ON zabbix.* TO zabbix@<IP> IDENTIFIED BY 'Your Password';

                              Comment

                              Working...