Ad Widget

Collapse

Zabbix Server seems to be running but systemctl shows

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mwildam
    Member
    • Feb 2021
    • 72

    #1

    Zabbix Server seems to be running but systemctl shows

    I installed zabbix server 5.2.4 on debian 10 buster from the sources. I could not use the prepared debian packages, because the hardware architecture behind is an IBM powerpc in the particular case.

    Zabbix works fine except after creating a systemd service file to manage it via systemctl it does not come to an active state, neither after complete reboot of the machine.
    systemctl -type=service shows it in the list as "activating":
    zabbix-server.service loaded activating start start Zabbix Server

    If I run systemctl start zabbix-server, it does not return to commandline - so somehow the start process does not come to an end.

    I do not have the problem with the agent which basically has the same systemctl config file (as shown here: https://kifarunix.com/how-to-install...28-centos-7/2/ ):
    Code:
    [Unit]
    Description=Zabbix Server
    After=syslog.target network.target mariadb.service
    
    [Service]
    Type=oneshot
    User=zabbix
    ExecStart=/usr/local/sbin/zabbix_server
    ExecReload=/usr/local/sbin/zabbix_server -R config_cache_reload
    RemainAfterExit=yes
    PIDFile=/var/run/zabbix/zabbix_server.pid
    
    [Install]
    WantedBy=multi-user.target
    From the logs it looks like everything is fine and even in Reports -> System information.
    However, any attempt of restarting the service results in systemctl blocking.
  • mwildam
    Member
    • Feb 2021
    • 72

    #2
    I have solved the issue after reading carefully https://www.freedesktop.org/software...d.service.html and changed Type to "forking". My systemd configuration file, /etc/systemd/system/zabbix-server.service, now looks like this:
    Code:
    [Unit]
    Description=Zabbix Server
    After=syslog.target network.target mariadb.service
    
    [Service]
    Type=forking
    Restart=always
    User=zabbix
    ExecStart=/usr/local/sbin/zabbix_server
    ExecReload=/usr/local/sbin/zabbix_server -R config_cache_reload
    RemainAfterExit=yes
    PIDFile=/tmp/zabbix_server.pid
    
    [Install]
    WantedBy=multi-user.target
    Now it works.

    When you prepare the file, don't forget afterwards:
    Code:
    sudo systemctl enable
    sudo systemctl daemon-reload

    Comment

    Working...