Issue
All the jobs using the same credential started failing simultaneously. The failing jobs are showing errors like the one shown below:
java.lang.NullPointerException
at jenkins.security.ConfidentialStore.get(ConfidentialStore.java:67)
at jenkins.security.ConfidentialKey.load(ConfidentialKey.java:47)
at jenkins.security.CryptoConfidentialKey.getKey(CryptoConfidentialKey.java:41)
at jenkins.security.CryptoConfidentialKey.decrypt(CryptoConfidentialKey.java:134)
at hudson.util.HistoricalSecrets.decrypt(HistoricalSecrets.java:49)
at hudson.util.Secret.decrypt(Secret.java:207)
at hudson.util.Secret.fromString(Secret.java:249)
...
...
at org.jenkinsci.plugins.p4.client.AuthorisationConfig.<init>(AuthorisationConfig.java:27)
at org.jenkinsci.plugins.p4.client.ConnectionHelper.<init>(ConnectionHelper.java:94)
at org.jenkinsci.plugins.p4.client.ClientHelper.<init>(ClientHelper.java:99)
at org.jenkinsci.plugins.p4.tasks.AbstractTask.getConnection(AbstractTask.java:181)
at org.jenkinsci.plugins.p4.tasks.AbstractTask.tryTask(AbstractTask.java:207)
at org.jenkinsci.plugins.p4.tasks.CheckoutTask.invoke(CheckoutTask.java:114)
at org.jenkinsci.plugins.p4.tasks.CheckoutTask.invoke(CheckoutTask.java:26)
Environment
- CloudBees CI (CloudBees Core) on modern cloud platforms - Managed controller
- CloudBees CI (CloudBees Core) on traditional platforms - Client controller
- CloudBees Jenkins Enterprise
- CloudBees Jenkins Enterprise - Managed controller
- CloudBees Jenkins Platform - Client controller
- CloudBees Jenkins Distribution
- Jenkins LTS
Resolution
The error is coming from a known issue in the P4 plugin: JENKINS-51632, under certain conditions the plugin was not resolving correctly the credentials and that caused an exception. The most common cause for this scenario to happen is the usage of special characters in the credentials password.
In order to solve the issue you should upgrade the P4 plugin at least to version 1.9.5.
Workaround
Change the credentials password so that they do not use any special characters.
0 Comments