Information for: DEVELOPERS   PARTNERS   SUPPORT

FAQs and troubleshooting

This page describes some approaches you can take in determining the causes of error messages or other problems with the Cloud Platform 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, Pipelines 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.

YAML failures

When running Pipelines jobs, you might run into the following YAML parsing error:

Failed to parse the acquia-pipelines.yml file.
The build definition file contains a syntax error.

This means your acquia-pipelines.yml file is malformed. Navigate to yamllint.com to check your YAML syntax and fix any issues found.

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 Pipelines 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
    

Timeout issues

Pipelines jobs time out after 60 minutes. The system displays the following error message if your job exceeds this timeframe:

Execution exceeded allowed time of 60 minutes.

If your build fails to complete within this timeframe, you must refactor your application to get the build completed faster.

The following are a few examples of timeouts that we have seen:

  • Twig validation for a large number of files

  • Database backup scripts

  • Commands that do testing on the application without echoing anything out

Disk usage issues

Pipelines containers have designated disk utilization. The system displays the following error message if you exceed the allocated disk utilization:

Disk usage exceeded the <maximum-permissible-usage>GB limit. Usage is <actual-usage>GB.

For more information on Pipelines disk space and resource limits, see Specifications and resource limits.

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

Pipelines 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.

You can manually reset the credentials for the application.

Any user with the Execute Pipelines permission can reconfigure automated builds. For additional assistance, contact Acquia Support.

How can I manually reset the credentials for the application?

To manually reset the credentials for the application, install pipeline-cli and run the following command:

pipelines reset-credentials --application-id <uuid>

How can I change the Pipelines owner for a subscription?

To change the Pipelines owner:

  1. Reset the Pipelines credentials using the Pipelines CLI tool.

  2. Ensure that the new user is the first user to log in to Pipelines.

  3. On the dialog box that prompts to associate the token of the new user with Pipelines, click Yes.

Why cannot I manually start jobs on tags?

Manually starting jobs only works with branches. Tags are not supported. To manually start a job, ensure that you do it from a branch instead.

Why is my job not triggered automatically?

When both branches and tags do not trigger your Pipelines jobs automatically, then it might indicate that you need to reset your Pipelines credentials.

Contact Acquia Support if you cannot reset your Pipelines credentials.

Why cannot I use RVM?

If your YAML build definition invokes rvm (Ruby Version Manager), you will run into errors. To work around the issue, you need to switch your build to using rbenv instead. Rbenv is a lightweight and more developer-friendly option to switch between Ruby versions.

To continue using different versions of Ruby, replace any instances of rvm in your YAML build definition with equivalent rbenv commands.

  • rvm install x.x.x becomes rbenv install x.x.x.

  • rvm use x.x.x becomes rbenv global x.x.x or rbenv local x.x.x depending on the desired behavior.

Why am I getting a Webhook creation failed error when trying to connect my Bitbucket repository?

When connecting your Bitbucket repository with Acquia Pipelines, you might run into the following error:

Danger! 400 : {"success":false,"message":"Webhook creation failed for app [\"ff312a79-a73b-4d51-b770-f298292907db\"], repo mybitbucketnamespace/mybitbucketrepo,
reason: User unauthorized to create deployment key","error":"Webhook creation failed for app [\"ff312a79-a73b-4d51-b770-f298292907db\"], repo mybitbucketnamespace/mybitbucketrepo,
reason: User unauthorized to create deployment key"}

This is a known limitation with the Bitbucket service. Only Bitbucket account owners can connect to repositories created under the default workspace of the Bitbucket account.