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

Fix /var/run directory creation in init.d scripts

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Duplicate
    • Icon: Trivial Trivial
    • None
    • 2.4.7
    • Installation (I)
    • None

      On a systemd host like Debian Jessie, if you install the proxy and the agent, the agent can fail to start :

      Dec 17 10:40:45 zabbix-proxy zabbix-agent[487]: mkdir: cannot create directory ‘/var/run/zabbix’: File exists
      Dec 17 10:40:45 zabbix-proxy systemd[1]: zabbix-agent.service: control process exited, code=exited status=1
      Dec 17 10:40:45 zabbix-proxy systemd[1]: Failed to start LSB: Start zabbix-agent daemon.
      Dec 17 10:40:45 zabbix-proxy systemd[1]: Unit zabbix-agent.service entered failed state.
      

      The directory /var/run/zabbix is probably created by the proxy after the test check in the agent init script and the mkdir fails :

      if test ! -d "$DIR"; then
        mkdir "$DIR"
        chown -R zabbix:zabbix "$DIR"
      fi
      

      To fix it add the option -p to mkdir command.

        1. patch-zabbix_agent_initd.gz
          0.2 kB
          Boris HUISGEN
        2. patch-zabbix_proxy_initd.gz
          0.2 kB
          Boris HUISGEN
        3. patch-zabbix_server_initd.gz
          0.2 kB
          Boris HUISGEN

            Unassigned Unassigned
            bhuisgen Boris HUISGEN
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: