Ad Widget

Collapse

Failed to start Zabbix Server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hgarzon
    Junior Member
    • Mar 2023
    • 3

    #1

    Failed to start Zabbix Server

    we have a problem with to start zabbix-server,

    My configuration:

    LogFile=/var/zabbix/log/zabbix_server.log
    LogFileSize=1024
    DebugLevel=3
    ​PidFile=/var/run/zabbix/zabbix_server.pid
    SocketDir=/var/run/zabbix
    DBHost=localhost
    DBName=zabbix
    DBUser=zabbix
    DBPassword= **********
    CacheSize=12G
    ValueCacheSize=4096M

    It shows me the following information and logs​:

    [root@XXXXX]# 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 Wed 2023-03-15 17:38:08 -05; 448ms ago
    Process: 4648 ExecStart=/usr/sbin/zabbix_server -c $CONFFILE (code=exited, status=1/FAILURE)

    [root@XXXX# systemctl start zabbix-server
    Job for zabbix-server.service failed because the control process exited with error code.
    See "systemctl status zabbix-server.service" and "journalctl -xe" for details.


    Mar 15 17:58:57 SRVZAB01 systemd[1]: zabbix-server.service: Scheduled restart job, restart counter is at 650.
    -- 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.
    Mar 15 17:58:57 SRVZAB01 systemd[1]: 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.
    Mar 15 17:58:57 SRVZAB01 systemd[1]: 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.
    Mar 15 17:58:57 SRVZAB01 zabbix_server[5162]: zabbix_server [5162]: invalid entry "q" (not following "parameter=value" notation) in config file "/etc/>
    Mar 15 17:58:57 SRVZAB01 systemd[1]: zabbix-server.service: Control process exited, code=exited status=1
    Mar 15 17:58:57 SRVZAB01 systemd[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'.
    Mar 15 17:58:57 SRVZAB01 systemd[1]: 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.​



    Thanks
  • hgarzon
    Junior Member
    • Mar 2023
    • 3

    #2
    Now this problem, what did happen?
    Click image for larger version

Name:	image.png
Views:	16437
Size:	37.1 KB
ID:	461191

    Comment

    • hgarzon
      Junior Member
      • Mar 2023
      • 3

      #3
      The database works for me with the configured username and password:

      MariaDB [(none)]> SHOW GRANTS;
      +---------------------------------------------------------------------------------------------------------------+
      | Grants for zabbix@localhost |
      +---------------------------------------------------------------------------------------------------------------+
      | GRANT USAGE ON *.* TO `zabbix`@`localhost` IDENTIFIED BY PASSWORD '*DD8A41DE64DF36D9AF13492AA738738F858A39BB' |
      | GRANT ALL PRIVILEGES ON `zabbix`.* TO `zabbix`@`localhost` |
      +---------------------------------------------------------------------------------------------------------------+
      2 rows in set (0.001 sec)

      Comment

      • Atsushi
        Senior Member
        • Aug 2013
        • 2028

        #4
        Please check the Zabbix server log for any output.

        Comment


        • hgarzon
          hgarzon commented
          Editing a comment
          Hi

          This output for zabbix server logs


          [root@SRVZAB01 ]# tail -30 /var/zabbix/log/zabbix_server.log
          3194:20230316:122108.208 required mandatory version: 06020000
          3194:20230316:122108.210 database could be upgraded to use primary keys in history tables
          3195:20230316:122108.215 starting HA manager
          3195:20230316:122108.219 HA manager started in active mode
          3194:20230316:122108.220 cannot initialize configuration cache: cannot get private shared memory of size 12884901888 for configuration cache: [12] Cannot allocate memory
          3195:20230316:122108.220 HA manager has been paused
          3195:20230316:122108.223 HA manager has been stopped
          3194:20230316:122108.226 Zabbix Server stopped. Zabbix 6.2.8 (revision 575ac11425f).
          3199:20230316:122120.648 Starting Zabbix Server. Zabbix 6.2.8 (revision 575ac11425f).
          3199:20230316:122120.649 ****** Enabled features ******
          3199:20230316:122120.649 SNMP monitoring: YES
          3199:20230316:122120.649 IPMI monitoring: YES
          3199:20230316:122120.649 Web monitoring: YES
          3199:20230316:122120.649 VMware monitoring: YES
          3199:20230316:122120.649 SMTP authentication: YES
          3199:20230316:122120.649 ODBC: YES
          3199:20230316:122120.649 SSH support: YES
          3199:20230316:122120.650 IPv6 support: YES
          3199:20230316:122120.650 TLS support: YES
          3199:20230316:122120.650 ******************************
          3199:20230316:122120.650 using configuration file: /etc/zabbix/zabbix_server.conf
          3199:20230316:122120.701 current database version (mandatory/optional): 06020000/06020014
          3199:20230316:122120.701 required mandatory version: 06020000
          3199:20230316:122120.705 database could be upgraded to use primary keys in history tables
          3200:20230316:122120.715 starting HA manager
          3200:20230316:122120.724 HA manager started in active mode
          3199:20230316:122120.724 cannot initialize configuration cache: cannot get private shared memory of size 12884901888 for configuration cache: [12] Cannot allocate memory
          3200:20230316:122120.725 HA manager has been paused
          3200:20230316:122120.730 HA manager has been stopped
          3199:20230316:122120.739 Zabbix Server stopped. Zabbix 6.2.8 (revision 575ac11425f).
      • cyber
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Dec 2006
        • 4807

        #5
        -- Unit zabbix-server.service has begun starting up.
        Mar 15 17:58:57 SRVZAB01 zabbix_server[5162]: zabbix_server [5162]: invalid entry "q" (not following "parameter=value" notation) in config file "/etc/>
        Mar 15 17:58:57 SRVZAB01 systemd[1]: zabbix-server.service: Control process exited, code=exited status=1
        Mar 15 17:58:57 SRVZAB01 systemd[1]: zabbix-server.service: Failed with result 'exit-code'.
        -- Subject: Unit failed​
        Check your config files for typos....

        Comment


        • hgarzon
          hgarzon commented
          Editing a comment
          hi, this is configuration:

          grep -v '^#' /etc/zabbix/zabbix_server.conf | grep .
          LogFile=/var/zabbix/log/zabbix_server.log
          LogFileSize=1024
          DebugLevel=3
          PidFile=/var/run/zabbix/zabbix_server.pid
          SocketDir=/var/run/zabbix
          DBHost=localhost
          DBName=zabbix
          DBUser=zabbix
          DBPassword=C0l0mb14*
          SNMPTrapperFile=/var/log/snmptrap/snmptrap.log
          CacheSize=12G
          Timeout=4
          AlertScriptsPath=/usr/lib/zabbix/alertscripts
          ExternalScripts=/usr/lib/zabbix/externalscripts
          LogSlowQueries=3000
          StatsAllowedIP=127.0.0.1
      • pcsi88
        Junior Member
        • Mar 2023
        • 5

        #6
        New to Zabbix - Running into the same problem. Fresh rollout of Zabbix, got alert stating Zabbix Server was not running. Attempted to start service, get error below. What other conf file should I be checking for typos? Also, there are no server log files present.

        Thanks

        Click image for larger version

Name:	image.png
Views:	16338
Size:	67.5 KB
ID:	461394

        Comment

        • markfree
          Senior Member
          • Apr 2019
          • 868

          #7
          A good way I find to verify the configuration file, is to reverse grep the comments. That might also display some typos that are not commented.
          Code:
          $ grep -v '^#' /etc/zabbix/zabbix_server.conf | grep .
          Last edited by markfree; 21-03-2023, 03:03.

          Comment

          • pcsi88
            Junior Member
            • Mar 2023
            • 5

            #8
            Thanks markfree - I ended up dropping the db and rebuilding. Server service is not starting, i now get a message stating its activating.. ??

            Once again - thank you very much for the assist.

            Click image for larger version

Name:	image.png
Views:	16339
Size:	33.0 KB
ID:	461492

            Comment

            • Atsushi
              Senior Member
              • Aug 2013
              • 2028

              #9
              The following message is output in the Zabbix server log.

              Code:
              3199:20230316:122120.724 cannot initialize configuration cache: cannot get private shared memory of size 12884901888 for configuration cache: [12] Cannot allocate memory
              Your environment seems to be running out of memory, so try adjusting the CacheSize to a smaller value for your environment.​

              Comment


              • hgarzon
                hgarzon commented
                Editing a comment
                dear

                After adjusting the CacheSize to a smaller value it worked !! I will increase the memory of the server, thanks !!

              • angelovic
                angelovic commented
                Editing a comment
                I was in same situation: Zabbix 6.4 stops to work after I imported over 50 hosts (switches). Increasing of CacheSize fixed it.
            • Ahmed520
              Junior Member
              • Feb 2025
              • 1

              #10
              systemctl restart zabbix-server
              Job for zabbix-server.service failed because the service did not take the steps required by its unit configuration.
              See "systemctl status zabbix-server.service" and "journalctl -xe" for details.
              [root@appliance ~]# systemctl restart zabbix-server

              Comment

              Working...