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