Tutorial — Troubleshooting failed Jenkins jobs

Edit on GitHub

A Jenkins job failed.

1. Check the console output of the failed Jenkins job

  1. In the Jenkins dashboard, select the name of the failed job.

jenkins_dashboard

This takes you to the page of the job.

  1. In the Build History section, select the latest failed build number > Console Output.

jenkins_failed_job_menu

  1. In the Console Output, search the log for errors.

jenkins_console_output

If the log contains AMQPProtocolChannelException, the issue can be related to RabbitMQ virtual host or queue.

Error message examples:

Zed.CRITICAL: PhpAmqpLib\Exception\AMQPProtocolChannelException - NOT_FOUND no queue 'sync.storage.content' in vhost 'de_queue'
Zed.CRITICAL: PhpAmqpLib\Exception\AMQPConnectionClosedException - NOT_ALLOWED - vhost at_queue not found

In this case, Check RabbitMQ status.

2. Check RabbitMQ status

To check RabbitMQ status, do the following.

Check RabbitMQ connection details

To connect to the RabbitMQ Management interface, you need to check the following details:

  • SPRYKER_BROKER_API_USERNAME
  • SPRYKER_BROKER_API_PASSWORD
  • SPRYKER_BROKER_API_HOST
  • SPRYKER_BROKER_API_PORT

Check the details as follows:

  1. In the AWS Management Console, go to Services > Elastic Container Service.
  2. In the navigation pane, select Task Definitions.
  3. Select the service you want to get the configuration for.
  4. Select the latest revision of the definition. For example, if the available definitions are {ENVIRONMENT_NAME}-zed:1 and {ENVIRONMENT_NAME}-zed:2, select {ENVIRONMENT_NAME}-zed:2.
  5. On the page of the definition, switch to the JSON tab.
  6. Search by the desired service name. For example, to find the connection configuration of the broker, search by broker. You should be able to find the following information:
    • SPRYKER_BROKER_API_USERNAME
    • SPRYKER_BROKER_API_PASSWORD
    • SPRYKER_BROKER_API_HOST
    • SPRYKER_BROKER_API_PORT

task-definition

Check RabbitMQ node status and errors

  1. Using the login details you’ve checked in the Check RabbitMQ connection details, log into the RabbitMQ Management interface at http://rabbitmq.{ENVIRONMENT_NAME}.{SPRYKER_BROKER_API_HOST}:{SPRYKER_BROKER_API_PORT}
  2. In the Nodes section of the Overview tab, check the node status. If all the columns are green, the node is working properly.

status-of-nodes

  1. Switch to the Queues tab.
  2. Check the State of queues.
  3. Check if there are messages in the queues postfixed with error. For example, publish.error.

rabbitmq-queue-messages

  1. If the error count is above zero for an error queue, check the errors as follows: a. Select the queue with the error. b. On the page of the queue, select Get messages > Get message(s).

rabbitmq-get-messages