High Availability (active/active) installation troubleshooting

2 minute read

If CloudBees High Availability (HA) is not working as expected, use this page to troubleshoot.

High Availability (HA) developer mode

The High Availability (HA) feature provides a developer mode to troubleshoot HA problems in controllers running in HA mode.

To enable the developer mode in a controller.

  • Navigate to Manage Jenkins  CloudBees CI High Availability.

  • Select Status on the left navigation pane. This is the default view when accessing the CloudBees CI High Availability screen.

  • Select the Enable developer mode field and select Save or Apply.

Enable developer mode
Figure 1. Enable developer mode

Developer mode is a powerful tool to troubleshoot and understand High Availability. When enabled, the controller provides additional information about the High Availability mode:

  • A button with the current replica name appears in the page footer.

  • The background color for the replica button changes from one replica to another.

  • When selected, the replica button on the footer redirects to the CloudBees CI High Availability screen.

    Footer in developer mode
    Figure 2. Footer in developer mode.
  • The consolidated queue widget displays the queue items in all the replicas.

  • In developer mode, CloudBees CI adds the replica name to those items queued in other replicas.

  • Names for items queued in the current replica remain the same.

Build name in developer mode
Figure 3. Build name in developer mode

In addition to enabling developer mode, also from the CloudBees CI High Availability screen, users can change the replica they are using by selecting the Reset sticky session button.

Switch to another replica
Figure 4. Switch to another replica

When the Reset sticky session is selected, CloudBees CI randomly assigns a new replica to the user. If there is no change and they are assigned to the same replica, users can reload the page and try again until a new replica is assigned.

High Availability (HA) Script Console

In addition to the previous tools, the CloudBees CI High Availability screen provides a High Availability Script Console. This console allows CloudBees CI users to run scripts across all the current controller replicas and displays the results. To access the HA Script Console select Script Console on the left.

HA Script Console
Figure 5. HA Script Console
  1. Select Script Console to access the HA Script Console.

  2. Type your scripts in the scripts area.

  3. Run your HA scripts. When selected, the script will be executed in all the controller replicas.

Results for the HA Script Console
Figure 6. Results for the HA Script Console

Problems with a CloudBees CI on modern cloud platforms installations

Controller configuration is not set to Deployment

If the controller fails to provision with the error:

ERROR: Failed to provision controller ... StatefulSet is only for non-replicated controllers

The issue was caused by including kind: StatefulSet when configuring the controller under Advanced configurationYAML. To resolve the issue, select Acknowledge error, Free snapshot, then go to the configuration page and change kind: StatefulSet to kind: Deployment in the YAML field.