Information for: DEVELOPERS   PARTNERS

Troubleshooting pipelines feature issues

Troubleshooting Acquia Cloud pipelines

This page describes some approaches you can take in determining the causes of error messages or other problems with the Acquia Cloud pipelines feature. It includes the following sections:

Note

After you fix any detected issues with any pipeline jobs, run the start command again to restart the build.

Script failures

By default, the pipelines feature prepends build scripts with set -e, which causes the script to exit if any command has a non-zero exit code. You can override the behavior by including set +e in your build script.

Be aware that if you use set +e, the script does not fail when a command fails. Your script must manage its own exit strategy and exit codes.

GitHub issues

If you encounter an error running pipelines init-github, ensure that you can view the GitHub Webhooks page for the repository by using the following procedure:

  1. Sign in to GitHub.
  2. Go to your repository, and then click Settings.
  3. In the menu on the left side, click Webhooks.

If you cannot view the Webhooks page, you may not have the necessary permissions in GitHub. Contact your organization’s GitHub administrator for access.

Another possible cause is you may have used an incorrect GitHub personal access token. In GitHub, you can revoke your old personal access token, create a new one, and then try again to run pipelines init-github.

Webhook issues

If you experience a failed code-deploy task due to a webhook connection failure, the following error displays:

Acquia can't reach the webhook destination: #{webhook.url}
Expected([200, 201, 202, 204]) <=> Actual(403 Forbidden)

The error occurs if the Acquia Cloud pipelines feature isn’t responding. Acquia recommends checking the Acquia Status page and trying again later. If the issue persists, contact Acquia Support.

Key issues

If you cannot connect to external resources (such as GitHub) but your GitHub permissions are correct, use the following procedure to test your SSH key:

Note

In the following commands, replace [/path/to/key] with the full path to your SSH key.

  1. Determine if the encrypted file in your acquia-pipelines.yaml file can access your GitHub repository with the following command:

    ssh -i [/path/to/key] -vvv [email protected]
    

    The -vvv switch forces verbose output, which can indicate if GitHub accepted your SSH key.

  2. Confirm if your SSH key requires a passphrase because the key is encrypted. Although newer encrypted SSH keys are indistinguishable from non-encrypted keys, use the following command to test older SSH keys:

    head -n2 /path/to/key
    

    After you execute the command, review its output, which will appear similar to the following:

    -----BEGIN RSA PRIVATE KEY-----
    Proc-Type: 4,ENCRYPTED
    

Terminating a job

You can terminate a job in progress. You might do this if the job appears stuck and unable to complete on its own, or if you realize there is a problem with the job you need to fix. To terminate a job, use the terminate-job command:

pipelines terminate-job [job ID]

The terminate-job command terminates the most recent job, if it has not yet completed. The command has an optional argument (job ID), which you can use if you want to terminate a job other than the most recently started one. Retrieve the job ID from the pipelines status command or from the output of the pipelines start command.

User permission issues

Cause User interface error CLI error
A job started manually by a user who is part of the organization but does not have the “execute pipelines” permission
Failed to start pipeline:
Error message: You do not have permission to run pipelines.
[Acquia\Pipeline\Exception\PipelineClientException]
There was a server error.
Please try your request again in a few minutes.
A job started manually by a user who is no longer part of the organization Not applicable, as the user cannot access the user interface.
[Acquia\Pipeline\Exception\PipelineClientException]
There was a server error.
Please try your request again in a few minutes.
A job started through a webhook with a stored credential of a user who is currently part of the organization but does not have the “execute pipelines” permission. Not applicable, as the job cannot start.
webhook start failed to start pipeline for app [UUID].
Operation failed with the following details:
Error message: You do not have permission to run pipelines
A job started through a webhook with a stored credential of a user who is no longer part of the organization Not applicable, as the job cannot start.
webhook start failed to start pipeline for app [UUID].
Operation failed with the following details:
Error message: You do not have permission to run pipelines

The pipelines feature executes jobs using the credentials of the user who first executes a pipelines build. If this user leaves your organization, or the user’s credentials are revoked, you may be able to start a manual build, but automated builds may fail with errors like the following:

The application you are trying to access does not exist, or you do not have
permission to access it.

Contact Acquia support to request your subscription be updated with the credentials of another user with the Execute Pipelines permission.