Pivotal Knowledge Base


Bosh Errand VM Missing 'jobs' and 'packages' Folders


Pivotal Cloud Foundry (PCF) 1.11 and above


When attempting to run an errand, an error message is seen which indicates that the packages required for the errand are missing and the errand fails.

If the errand is run manually with the '--keep-alive' option as described in this article, it is evident that the symlinks for the '/var/vcap/jobs/' and '/var/vcap/packages/' directories are not present.

Note: The example below shows the error when running the 'multitenant-smoke-tests' errand for RabbitMQ tile for PCF

Error Message

15:47:58 | Running errand: multitenant-smoke-tests/0 (00:00:01)

Error: Action Failed get_task: Task ca1da71c-2c1c-4a64-5bac-b2c8fg3d1422 result: Running errand script: Starting command '/var/vcap/jobs/smoke-tests/bin/run': fork/exec /var/vcap/jobs/smoke-tests/bin/run: no such file or directory 


The missing symlinks lead to the error shown above as the relevant file cannot be found in the expected directory. The symptoms and error described are caused if the BOSH job's state for the errand is 'stopped' when the errand is run. When a job is in the 'stopped' state, BOSH will not create the assets required by the errand correctly, including creating the symlinks for the errand job to run.


To resolve the issue, the following steps can be completed:

  1. First, check that the Bosh job is stopped by running the following command. This will give details of the deployment's VMs and show the 'state' of the Bosh job.

    bosh2 -e <environment-name> -d <deployment-name> instances -i

  2. If the errand VM is running, proceed to step 3. Otherwise, start the errand manually with the 'keep-alive' option. This should fail as the problem will be fixed in step 3, but the VM must first be running. For example, continuing the sample scenario above:

    bosh2 -e <environment-name> -d <deployment-name> run-errand multitenant-smoke-tests --keep-alive

  3. Start the Bosh job for the errand VM instance with this command (the <instance-id> can be retrieved by re-running the command from step 1 if necessary):

    bosh2 -e <environment-name> -d <deployment-name> start multitenant-smoke-tests/<instance-id>

Running the errand again should allow it to complete successfully as the directory symlinks will have now been created. 

Additional Information

Refer to this section of the BOSH documentation for information on jobs and lifecycles 


Powered by Zendesk