Ad Widget

Collapse

Zabbix Server Hangs at shutdown: "A Stop Job is Running for Zabbix Server"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • patrick.thomas
    Junior Member
    • Nov 2019
    • 5

    #1

    Zabbix Server Hangs at shutdown: "A Stop Job is Running for Zabbix Server"

    Hello Everyone,

    I am running Zabbix 4.2.8 on Ubuntu 18.04.3

    I've had a new Zabbix install working on site here for a month or so now, but whenever I try to reboot or shut it down the above error occurs. Can anyone advise on how best to troubleshoot this? I'm a novice when it comes to Linux, and installed the above following a guide that has otherwise resulted in a successful install.

    Any advice is appreciated.

    Many Thanks
  • patrick.thomas
    Junior Member
    • Nov 2019
    • 5

    #2
    Just to add, from my searches it looks like similar problem was reported here, and that it is because MySQL is stopped before the Zabbix Server is, and so Zabbix won't quit because it's trying to find the MySQL instance. But other than this, I don't understand how to resolve this.

    Comment

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

      #3
      In https://support.zabbix.com/browse/ZBX-15602 there is some info about the solution. In my Zabbix 4.4.4 (which should be fixed according to the case) there is:

      Code:
      $ cat /lib/systemd/system/zabbix-server.service
      [Unit]
      Description=Zabbix Server
      After=syslog.target
      After=network.target
      After=mysql.service
      After=mysqld.service
      After=mariadb.service
      ...
      If you have a specific reason why you cannot upgrade to a supported Zabbix version, you may want to try editing the service file manually.

      Markku

      Comment


      • Markku
        Markku commented
        Editing a comment
        And I believe something like "sudo systemctl daemon-reload" is needed after editing the service file.

        Markku
    • patrick.thomas
      Junior Member
      • Nov 2019
      • 5

      #4
      Hi Markku

      Have now upgraded to 4.4 from 4.2 and can now confirm that the services stop as expected, with shutdowns and reboots working correctly.

      Thanks for your advice, and for pointing me in the right direction.

      Pat

      Comment

      • darkfire
        Junior Member
        • May 2023
        • 6

        #5
        On the test server, when restarting the server, the problem "A stop job is running for Zabbix Server no limit" appears. If for example MySQL stopped working.

        The solution to this inconvenience. In the file /lib/systemd/system/zabbix-server.service
        Change the value

        TimeoutSec=infinity to TimeoutSec=240s

        Update the settings

        systemctl daemon-reload​

        Comment

        Working...