Issue
After upgrading or restarting CloudBees CI, the controller or operations center fails to start with the Messaging.afterExtensionsAugmented
error:
SEVERE jenkins.InitReactorRunner$1#onTaskFailed: Failed Messaging.afterExtensionsAugmented java.lang.IndexOutOfBoundsException: Index 4 out of bounds for length 4 at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:100) at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106) at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302) at java.base/java.util.Objects.checkIndex(Objects.java:385) at java.base/java.util.ArrayList.get(ArrayList.java:427) at PluginClassLoader for mapdb-api//org.mapdb.SerializerPojo.deserializeUnknownHeader(SerializerPojo.java:480) ... at PluginClassLoader for operations-center-context//com.cloudbees.opscenter.context.MapDBMessagingStore.openStore(MapDBMessagingStore.java:88) ... SEVERE hudson.util.BootFailure#publish: Failed to initialize Jenkins java.lang.IndexOutOfBoundsException: Index 4 out of bounds for length 4
The operations center could also fail with this OperationsCenter.afterExtensionsAugmented
error:
SEVERE jenkins.InitReactorRunner$1#onTaskFailed: Failed OperationsCenter.afterExtensionsAugmented java.lang.IndexOutOfBoundsException: Index 6 out of bounds for length 6 at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:100) at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106) at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302) at java.base/java.util.Objects.checkIndex(Objects.java:385) at java.base/java.util.ArrayList.get(ArrayList.java:427) at PluginClassLoader for mapdb-api//org.mapdb.SerializerPojo.deserializeUnknownHeader(SerializerPojo.java:480) Caused: java.lang.RuntimeException: Could not instantiate class ... at PluginClassLoader for operations-center-server//com.cloudbees.opscenter.server.messaging.Transport.openStore(Transport.java:160) ... SEVERE hudson.util.BootFailure#publish: Failed to initialize Jenkins java.lang.IndexOutOfBoundsException: Index 6 out of bounds for length 6
Or
Resolution
This issue is currently being investigated as a bug, and does not have a permanent fix. If you encounter this issue:
-
Capture the startup logs from the failed instance, and if possible, the latest support bundle from
JENKINS_HOME/support
-
Follow the workaround steps below to recover the instance.
-
If the error message encountered was
Messaging.afterExtensionsAugmented
(controller or operations center)-
Enable a custom logger for
com.cloudbees.opscenter.context.MapDBMessagingStore
andcom.cloudbees.opscenter.context.Messaging
theFINE
level
-
-
If the error message encountered was
OperationsCenter.afterExtensionsAugmented
(operations center only)-
Enable a custom logger for
com.cloudbees.opscenter.server.messaging.Transport
at theFINE
level on the operations center instance
-
-
See if the issue can be reproduced
-
Contact CloudBees Support and attach the logs and support bundle from the affected instance, and share how you reproduced the issue
Workaround
For instances encountering this issue:
-
Move the corrupt messaging database files to a different directory:
mkdir ~/corrupt-messaging-files/ cd JENKINS_HOME mv messaging messaging.p messaging.t cluster-messaging* ~/corrupt-messaging-files/
-
Restart the instance