Ad Widget

Collapse

Zabbix server is not running

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • skritek
    Junior Member
    • Jul 2024
    • 7

    #1

    Zabbix server is not running

    Hello,

    Please help. I'm not a Linux expert. After restarting the Linux server on the Zabbix website, I got the message: "Zabbix server is not running". I read a lot of guides to fix this problem but none helped. The server has been running for almost a year without a reboot and Ubuntu has been updated several times in the meantime.
    Zabbix 6.2 runs on Ubuntu 22.04.4.
    The zabbix-server service is active (exited). It doesn't even create a log file. The zabbix-agent service is running.

    Thanks in advance for any suggestions.

    Good day Miroslav
  • Markku
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Sep 2018
    • 1781

    #2
    sudo systemctl restart zabbix-server
    sudo tail -100 /var/log/zabbix/zabbix_server.log


    Markku

    Comment

    • skritek
      Junior Member
      • Jul 2024
      • 7

      #3
      Hello Markku,

      thank you for answer. I have tried these commands before. The zabbix-server service is still active (exited). The Zabbix-server starts and immediately stops. Even creating a log file is not enough.

      Miroslav

      Comment

      • Markku
        Senior Member
        Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
        • Sep 2018
        • 1781

        #4
        sudo journalctl -u zabbix-server

        If the Zabbix log file stays empty, I don't think the service even starts.

        Markku

        Comment

        • millnet-maho
          Junior Member
          • Nov 2022
          • 5

          #5
          The .deb packages published by Zabbix themselves run zabbix_server as a forking daemon, which means that if it immediately exits with a non-zero status (or if systemd fails to execute it at all), systemd should consider it to have failed to start, but if it exists with a zero status, but without forking off any child process, or the child process(es) exit(s) with a zero status, systemd will show it as "active (exited)". But in that case I'd expect it to have written something to its log.

          Comment

          • skritek
            Junior Member
            • Jul 2024
            • 7

            #6
            Hallo,

            Thanks for both answers.

            I did:
            sudo systemctl restart zabbix-server
            sudo journalctl -u zabbix-server
            Result:
            Jun 31 12:12:59 COS-LS1 systemd[1]: Stopping LSB: Start zabbix-server daemon...
            Jun 31 12:12:59 COS-LS1 systemd[1]: zabbix-server.service: Deactivated successfully.
            Jun 31 12:12:59 COS-LS1 systemd[1]: Stopped LSB: Start zabbix-server daemon.
            Jun 31 12:12:59 COS-LS1 systemd[1]: Starting LSB: Start zabbix-server daemon...
            Jun 31 12:12:59 COS-LS1 systemd[1]: Started LSB: Start zabbix-server daemon.

            Log file is still without update:
            -rw-r----- 1 zabbix zabbix 3099395 čec 28 13:21 zabbix_server.log
            Last rows:
            1322:20240728:132128.014 Got signal [signal:15(SIGTERM),sender_pid:1,sender_uid:0,reaso n:0]. Exiting ...
            1419:20240728:132128.015 HA manager has been paused
            1536:20240728:132128.015 syncing history data in progress...
            1536:20240728:132128.015 syncing history data done
            1527:20240728:132128.016 [2] thread stopped [preprocessing worker #2]
            1527:20240728:132128.016 [1] thread stopped [preprocessing worker #1]
            1527:20240728:132128.017 [3] thread stopped [preprocessing worker #3]
            1419:20240728:132129.084 HA manager has been stopped
            1322:20240728:132129.090 syncing trend data...
            1322:20240728:132129.177 syncing trend data done
            1322:20240728:132129.185 Zabbix Server stopped. Zabbix 6.4.11 (revision fb6439a26e3).

            ​Best regards Miroslav

            Comment

            • Markku
              Senior Member
              Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
              • Sep 2018
              • 1781

              #7
              So journalctl just shows that the service (apparently 6.4.11, not 6.2, but anyway) has been started, and no output in the log file. Please show the full output of "sudo systemctl status zabbix-server"

              Markku

              Comment

              • millnet-maho
                Junior Member
                • Nov 2022
                • 5

                #8
                What language is "Jun 31"? Surely not the same as "čec 28"? There are no languages where July is abbreviated "Jun", are there? But there are only 30 days in June...
                Regardless, are you showing the most recent journal entries?

                Comment

                • skritek
                  Junior Member
                  • Jul 2024
                  • 7

                  #9
                  root@COS-LS1:/var/log/zabbix# sudo systemctl status zabbix-server
                  ● zabbix-server.service - LSB: Start zabbix-server daemon
                  Loaded: loaded (/etc/init.d/zabbix-server; generated)
                  Active: active (exited) since Wed 2024-07-31 12:12:59 CEST; 2h 46min ago
                  Docs: man:systemd-sysv-generator(8)
                  Process: 17471 ExecStart=/etc/init.d/zabbix-server start (code=exited, status=0/SUCCESS)
                  CPU: 1ms

                  čec 31 12:12:59 COS-LS1 systemd[1]: Starting LSB: Start zabbix-server daemon...
                  čec 31 12:12:59 COS-LS1 systemd[1]: Started LSB: Start zabbix-server daemon.
                  root@COS-LS1:/var/log/zabbix#

                  Thank you.

                  Miroslav

                  Comment

                  • Markku
                    Senior Member
                    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
                    • Sep 2018
                    • 1781

                    #10
                    That "/etc/init.d/zabbix-server; generated" looks strange. I don't use Ubuntu, but it just smells something that was not-Zabbix-provided, and is very different from the config files on Debian.

                    Since you have an existing installation (and not a newly setup one), you may want to be careful, but I would just make relevant backups, then "sudo apt purge zabbix\*" (to remove any existing packages about Zabbix), and install Zabbix 6.4 from the official Zabbix download page instructions (except the database of course, use the existing settings for it).

                    Markku

                    Comment

                    • skritek
                      Junior Member
                      • Jul 2024
                      • 7

                      #11
                      Hello Markku,

                      Thank you for your answer. I assumed a Zabbix fix.
                      After uninstalling "sudo apt purge zabbix\*" can I use the upgrade steps: "https://www.zabbix.com/documentation/6.4/en/manual/installation/upgrade/packages/debian_ubuntu" ?

                      Best regards, Miroslav

                      Comment

                      • Markku
                        Senior Member
                        Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
                        • Sep 2018
                        • 1781

                        #12
                        You need to follow the new install instructions (except to create new Zabbix database) because after purging the packages there aren't any Zabbix packages to upgrade anymore.

                        Markku

                        Comment

                        • skritek
                          Junior Member
                          • Jul 2024
                          • 7

                          #13
                          Hallo Markku,

                          thank You. I will try it.

                          Best regards. Miroslav

                          Comment

                          • skritek
                            Junior Member
                            • Jul 2024
                            • 7

                            #14
                            Hallo Makku,

                            all happened well.

                            Many thanks.

                            Miroslav

                            Comment

                            Working...