-
Bug
-
Resolution: Fixed
-
Blocker
Jenkins 2.306 is throwing an error when trying to access a keystore, which prevents it from running with SSL. If I downgrade to 2.305 everything works fine. The error is below. I have verified the keystore location and password are correct, plus as I said it works in 2.305 just fine.
2021-08-10 15:16:58.138+0000 [id=1] INFO winstone.Logger#logInternal: Jetty shutdown successfully
java.io.IOException: Failed to start a listener: winstone.HttpsConnectorFactory
at winstone.Launcher.spawnListener(Launcher.java:226)
at winstone.Launcher.<init>(Launcher.java:180)
at winstone.Launcher.main(Launcher.java:369)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at Main._main(Main.java:375)
at Main.main(Main.java:151)
Caused by: java.io.IOException: keystore password was incorrect
at java.base/sun.security.pkcs12.PKCS12KeyStore.engineLoad(PKCS12KeyStore.java:2116)
at java.base/sun.security.util.KeyStoreDelegator.engineLoad(KeyStoreDelegator.java:243)
at java.base/java.security.KeyStore.load(KeyStore.java:1479)
at winstone.AbstractSecuredConnectorFactory.configureSsl(AbstractSecuredConnectorFactory.java:73)
at winstone.HttpsConnectorFactory.start(HttpsConnectorFactory.java:53)
at winstone.Launcher.spawnListener(Launcher.java:220)
... 8 more
Caused by: java.security.UnrecoverableKeyException: failed to decrypt safe contents entry: javax.crypto.BadPaddingException: Given final block not properly padded. Such issues can arise if a bad key is used during decryption.
... 14 more
- is duplicated by
-
JENKINS-66368 After upgrade to CentOS 7 jenkins-2.306-1.1 Jenkins fails to start - keystore access error
-
- Resolved
-
- links to
Experiencing this as well on RHEL7.
The issue is caused by a change in /etc/rc.d/init.d/jenkins, from 'daemon' to 'daemonize' and the associated quote changes. $JAVA_CMD was previously quoted, however now is not. With the current command, adding quotes around $JAVA_CMD results in an error. And without quotes, it breaks quoting in some of the arguments, including the keystore password.
It is possible to workaround the issue by replacing the entire 'daemonize' line with,
This effectively reverts the change made in 2.306.
Stems from this commit.