KBEC-00470 - Job Step Waiting for Resource on Mac OS Catalina

Article ID:360055609551
2 minute readKnowledge base
On this page

Problem

When running a job step on a CloudBees CD agent running on a Mac (which is running Mac OS Catalina), the step is hanging with "waiting for resource" and the following message is shown:

Step error [AgentFailedCreateWorkspace]: unable to run the command on the agent
The agent was unable to create the workspace directory: Error in mkdir(/net/rose/home/ec-wksp/w2017/csdk-2015/J-79608-catalina): Operation not permitted

This looks like an issue caused by not enough privilege in the workspace directory. However, the following test confirms that the user does have enough privilege:

br-mac-17:~ ecagent$ cd /net/rose/home/ec-wksp/w2017/csdk-2015/
br-mac-17:csdk-2015 ecagent$ touch abc
br-mac-17:csdk-2015 ecagent$ ls -l abc
-rw-r--r-- 1 ecagent engineering 0 Jul 16 14:31 abc
br-mac-17:csdk-2015 ecagent$
br-mac-17:~ ecagent$ ls -l /net/rose/home/ec-wksp/w2017/csdk-2015 | grep J-79608-catalina
br-mac-17:~ ecagent$ mkdir /net/rose/home/ec-wksp/w2017/csdk-2015/J-79608-catalina
br-mac-17:~ ecagent$ ls -l /net/rose/home/ec-wksp/w2017/csdk-2015 | grep J-79608-catalina
drwxr-xr-x 2 ecagent engineering 4096 Jul 17 14:56 J-79608-catalina
br-mac-17:~ ecagent$ mkdir /net/rose/home/ec-wksp/w2017/csdk-2015/J-79692-catalina
br-mac-17:~ ecagent$ ls -l /net/rose/home/ec-wksp/w2017/csdk-2015 | grep J-79692-catalina
drwxr-xr-x 2 ecagent engineering 4096 Jul 17 14:57 J-79692-catalina

Solution

One possible cause of the issue is that the privilege is missing in this case with the following details:

  1. the directory is "/net/rose/home/ec-wksp/w2017" is mounted from another machine. This is a typical setup of workspace for CloudBees CD agent running on a mac.

  2. the CloudBees CD agent is started by the default way as mentioned in Starting and Stopping Servers and Agents Manually with the command sudo launchctl load /Library/LaunchDaemons/ecmdrAgent.plist

The issue can be worked around by:

  1. stop the agent with sudo launchctl unload /Library/LaunchDaemons/ecmdrAgent.plist

  2. start the agent in a terminal with /opt/electriccloud/electriccommander/bin/ecmdrAgent.bin --config /opt/electriccloud/electriccommander/conf/agent.conf. The actual command can be found in the file "ecmdrAgent.plist".

This starts the CloudBees CD agent in interactive mode.

This article is part of our Knowledge Base and is provided for guidance-based purposes only. The solutions or workarounds described here are not officially supported by CloudBees and may not be applicable in all environments. Use at your own discretion, and test changes in a safe environment before applying them to production systems.