Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-18489

Setting custom PID file path in Server or Agent config file causes specified service cannot be started

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 5.0.3, 5.0.4
    • Agent (G), Server (S)
    • CentOS 7, CentOS 8.1 in VMWare environment

      Steps to reproduce:

      1. Create a new directory anywhere on your system: mkdir /tmp/zabbix
      2. Set rights on this directory: chown -R zabbix:zabbix /tmp/zabbix
      3. Set rights on this directory: chmod -R 777 /tmp/zabbix
      4. Edit Zabbix agent configuration file: vim /etc/zabbix/zabbix_agentd.conf
      5. Change this line (comment out the original) PidFile=/tmp/zabbix/zabbix_agentd.pid
      6. Try to restart agent or server service: systemctl restart zabbix-agent
      7. After timeout you can read this in systemctl status zabbix-agent.service: Can't open PID file /run/zabbix/zabbix_agentd.pid (yet?)
      8. With original settings you can ran agent
      9. It happens also with Zabbix Server

      Result:

      systemctl status zabbix-agent.service

      ● zabbix-agent.service - Zabbix Agent
      Loaded: loaded (/usr/lib/systemd/system/zabbix-agent.service; enabled; vendor preset: disabled)
      Active: activating (start) since Tue 2020-10-13 10:51:10 CEST; 13s ago
      Process: 112891 ExecStop=/bin/kill -SIGTERM $MAINPID (code=exited, status=0/SUCCESS)
      Process: 114998 ExecStart=/usr/sbin/zabbix_agentd -c $CONFFILE (code=exited, status=0/SUCCESS)
      Main PID: 112549 (code=exited, status=0/SUCCESS)
      Tasks: 6
      CGroup: /system.slice/zabbix-agent.service
      ├─115000 /usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf
      ├─115001 /usr/sbin/zabbix_agentd: collector [idle 1 sec]
      ├─115002 /usr/sbin/zabbix_agentd: listener #1 [waiting for connection]
      ├─115003 /usr/sbin/zabbix_agentd: listener #2 [waiting for connection]
      ├─115004 /usr/sbin/zabbix_agentd: listener #3 [waiting for connection]
      └─115005 /usr/sbin/zabbix_agentd: active checks #1 [idle 1 sec]

      Oct 13 10:51:10 myhost.tst.local systemd[1]: Starting Zabbix Agent...
      Oct 13 10:51:10 myhost.tst.local systemd[1]: Can't open PID file /run/zabbix/zabbix_agentd.pid (yet?) a...tory
      Hint: Some lines were ellipsized, use -l to show in full.

      Expected:

            zabbix.support Zabbix Support Team
            znagy Zoltan Nagy
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: