Ad Widget

Collapse

Failed to start Zabbix Server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Guha
    Junior Member
    • Sep 2023
    • 3

    #1

    Failed to start Zabbix Server

    [root@ip~]# systemctl status zabbix-server
    â zabbix-server.service - Zabbix Server
    Loaded: loaded (/usr/lib/systemd/system/zabbix-server.service; enabled; vendor preset: disabled)
    Active: activating (auto-restart) (Result: exit-code) since Thu 2023-09-21 11:42:01 GMT; 9s ago
    Process: 978 ExecStart=/usr/sbin/zabbix_server -c $CONFFILE (code=exited, status=1/FAILURE)
    [root@ip-~]# journalctl -xe
    -- Defined-By: systemd
    -- Support: https://support.oracle.com
    --
    -- Unit zabbix-server.service has failed.
    --
    -- The result is failed.
    : zabbix-server.service: Service RestartSec=10s expired, scheduling restart.
    : zabbix-server.service: Scheduled restart job, restart counter is at 4.
    -- Subject: Automatic restarting of a unit has been scheduled
    -- Defined-By: systemd
    -- Support: https://support.oracle.com
    --
    -- Automatic restarting of the unit zabbix-server.service has been scheduled, as the result for
    -- the configured Restart= setting for the unit.
    Stopped Zabbix Server.
    -- Subject: Unit zabbix-server.service has finished shutting down
    -- Defined-By: systemd
    -- Support: https://support.oracle.com
    --
    -- Unit zabbix-server.service has finished shutting down.
    : Starting Zabbix Server...
    -- Subject: Unit zabbix-server.service has begun start-up
    -- Defined-By: systemd
    -- Support: https://support.oracle.com
    --
    -- Unit zabbix-server.service has begun starting up.
    : zabbix_server [982]: wrong value of "CacheSize" in config file "/etc/zabbix/zabbix_server>
    : zabbix-server.service: Control process exited, code=exited status=1
    : zabbix-server.service: Failed with result 'exit-code'.
    -- Subject: Unit failed
    -- Defined-By: systemd
    -- Support: https://support.oracle.com
    --
    -- The unit zabbix-server.service has entered the 'failed' state with result 'exit-code'.
    : Failed to start Zabbix Server.
    -- Subject: Unit zabbix-server.service has failed
    -- Defined-By: systemd
    -- Support: https://support.oracle.com
    --
    -- Unit zabbix-server.service has failed.
    --
    -- The result is failed.​

    Can anyone help me fix this issue
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    Refer to server logs. There should be more info, why it fails to start...

    Comment

    • Guha
      Junior Member
      • Sep 2023
      • 3

      #3
      [root@ ~]# less /var/log/zabbix/zabbix_server.log
      1098:20230919:130829.236 Starting Zabbix Server. Zabbix 6.2.0 (revision db780895726).
      1098:20230919:130829.236 ****** Enabled features ******
      1098:20230919:130829.236 SNMP monitoring: YES
      1098:20230919:130829.236 IPMI monitoring: YES
      1098:20230919:130829.236 Web monitoring: YES
      1098:20230919:130829.236 VMware monitoring: YES
      1098:20230919:130829.236 SMTP authentication: YES
      1098:20230919:130829.236 ODBC: YES
      1098:20230919:130829.236 SSH support: YES
      1098:20230919:130829.236 IPv6 support: YES
      1098:20230919:130829.236 TLS support: YES
      1098:20230919:130829.236 ******************************
      1098:20230919:130829.236 using configuration file: /etc/zabbix/zabbix_server.conf
      1098:20230919:130829.238 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
      1098:20230919:130829.238 database is down: reconnecting in 10 seconds
      1098:20230919:130839.238 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
      1098:20230919:130839.238 database is down: reconnecting in 10 seconds
      1098:20230919:130849.239 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
      1098:20230919:130849.239 database is down: reconnecting in 10 seconds
      1098:20230919:130859.239 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
      1098:20230919:130859.239 database is down: reconnecting in 10 seconds
      1098:20230919:130909.239 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
      1098:20230919:130909.239 database is down: reconnecting in 10 seconds
      1098:20230919:130919.239 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
      1098:20230919:130919.240 database is down: reconnecting in 10 seconds
      1098:20230919:130929.240 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
      1098:20230919:130929.240 database is down: reconnecting in 10 seconds
      1098:20230919:130939.240 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
      1098:20230919:130939.240 database is down: reconnecting in 10 seconds
      1098:20230919:130949.241 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/log/zabbix/zabbix_server.log


      has context menu​

      Comment

      • vijayk
        Senior Member
        • May 2023
        • 305

        #4
        As logs said Zabbix is not able to connect to DB. Can you please check the service of MySQL is running or not?

        Comment

        • Guha
          Junior Member
          • Sep 2023
          • 3

          #5
          [2:30 PM] Mal, Rina


          [root@ ~]# systemctl status mysqld
          â mysqld.service - MySQL Server
          Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
          Active: active (running) since Fri 2023-09-22 10:37:13 GMT; 2h 49min ago
          Docs: man:mysqld(8)
          http://dev.mysql.com/doc/refman/en/using-systemd.html
          Process: 651 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
          Main PID: 694 (mysqld)
          Status: "Server is operational"
          Tasks: 35 (limit: 22685)
          Memory: 487.0M
          CGroup: /system.slice/mysqld.service
          ââ694 /usr/sbin/mysqld



          Sep 22 10:37:10 systemd[1]: Starting MySQL Server...
          Sep 22 10:37:13 systemd[1]: Started MySQL Server.
          [root@ ~]# mysqladmin -u root -p ping
          mysqld is alive

          MySQL :: MySQL 8.1 Reference Manual :: 2.5.9 Managing MySQL Server with systemd

          Comment

          • tim.mooney
            Senior Member
            • Dec 2012
            • 1427

            #6
            Originally posted by Guha
            : zabbix_server [982]: wrong value of "CacheSize" in config file "/etc/zabbix/zabbix_server>
            As cyber said, that error about "CacheSize" should also have been in the zabbix_server.log.

            When looking at systemctl status, you generally get better information if you use "status -l" rather than just status.

            Comment

            Working...