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

macOS Agent Fails Due to Permission Problems

XMLWordPrintable

    • Sprint 70 (Nov 2020), Sprint 71 (Dec 2020), Sprint 72 (Jan 2021), Sprint 73 (Feb 2021), Sprint 74 (Mar 2021)
    • 1

      At least when a system update happens, the /var/log/zabbix directory gets removed. As the agent is run as the zabbix user, its stdout and stderr cannot be redirected to /var/log/zabbix/zabbix_agentd-out.log respectively /var/log/zabbix/zabbix_agentd-err.log as configured in the com.zabbix.zabbix_agentd.plist LaunchDaemon definition. It then crashes with

      com.apple.xpc.launchd[1] (com.zabbix.zabbix_agentd[96163]): Service exited with abnormal code: 78
      

      I'm not sure if this only happens during updates, but the behavior can be simulated by deleting the /var/log/zabbix directory. When modifying com.zabbix.zabbix_agentd.plist so that zabbix_agent is invoked with root permissions, the /var/log/zabbix/ directory is created, but then it drops its privileges and dies because it can't write to /var/log/zabbix/zabbix_agentd.log:

      zabbix_agentd [96289]: cannot open log: unable to open log file [/var/log/zabbix/zabbix_agentd.log]: [13] Permission denied
      

      As soon as one creates the /var/log/zabbix/ directory with user zabbix as owner, the agent works immediately, e.g.

      sudo mkdir -p /var/log/zabbix
      sudo chown -R zabbix /var/log/zabbix
      

       

        1. macos.tar.xz
          10 kB
          Andrejs Kozlovs
        2. Screenshot 2021-01-21 at 17.01.54.png
          256 kB
          Edgar Akhmetshin
        3. zabbix_agent-5.0.7-macos-amd64.pkg
          670 kB
          Andrejs Kozlovs

            ak Andrejs Kozlovs
            maxried@posteo.de Max Ried
            Team C
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: