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

macOS Agent Fails Due to Permission Problems

    XMLWordPrintable

Details

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

    Description

      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
      

       

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: