我刚刚将Artifactory OSS安装从6.0.1版本升级到了6.1.0。 重新启动服务后,我很困惑为什么实例没有启动。 看着artifactory.log,我发现了这个堆栈跟踪:
2018-08-07 14:44:32,284 [art-init] [INFO ] (o.j.s.c.EncryptionWrapperFactory:33) - createArtifactoryKeyWrapper EncryptionWrapperBase{ encodingType=ARTIFACTORY_MASTER, topEncrypter=BytesEncrypterBase{ Cipher='DESede', keyId='31Qpu'}, formatUsed=OldFormat, decrypters=[BytesEncrypterBase{ Cipher='DESede', keyId='31Qpu'}, BytesEncrypterBase{ Cipher='DESede', keyId='31Qpu'}]}
2018-08-07 14:44:32,284 [art-init] [ERROR] (o.a.w.s.ArtifactoryContextConfigListener:92) - Application could not be initialized: Given final block not properly padded
java.lang.reflect.InvocationTargetException: null
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.artifactory.webapp.servlet.ArtifactoryContextConfigListener.configure(ArtifactoryContextConfigListener.java:207)
at org.artifactory.webapp.servlet.ArtifactoryContextConfigListener.access$200(ArtifactoryContextConfigListener.java:63)
at org.artifactory.webapp.servlet.ArtifactoryContextConfigListener$1.run(ArtifactoryContextConfigListener.java:88)
Caused by: org.springframework.beans.factory.BeanInitializationException: Failed to initialize bean 'org.artifactory.config.InternalCentralConfigService'.; nested exception is org.jfrog.security.crypto.exception.CryptoRuntimeException: javax.crypto.BadPaddingException: Given final block not properly padded
at org.artifactory.spring.ArtifactoryApplicationContext.refresh(ArtifactoryApplicationContext.java:253)
at org.artifactory.spring.ArtifactoryApplicationContext.<init>(ArtifactoryApplicationContext.java:136)
... 7 common frames omitted
Caused by: org.jfrog.security.crypto.exception.CryptoRuntimeException: javax.crypto.BadPaddingException: Given final block not properly padded
at org.jfrog.security.crypto.EncryptionWrapperBase.decryptFallback(EncryptionWrapperBase.java:195)
at org.jfrog.security.crypto.EncryptionWrapperBase.decrypt(EncryptionWrapperBase.java:129)
at org.jfrog.security.crypto.EncryptionWrapperBase.decrypt(EncryptionWrapperBase.java:115)
at org.jfrog.security.crypto.EncryptionWrapperBase.decrypt(EncryptionWrapperBase.java:101)
at org.jfrog.security.crypto.EncryptionWrapperBase.decryptIfNeeded(EncryptionWrapperBase.java:92)
at org.jfrog.security.crypto.EncryptionWrapperBase.encryptIfNeeded(EncryptionWrapperBase.java:253)
at org.artifactory.common.crypto.CryptoHelper.encryptIfNeeded(CryptoHelper.java:73)
at org.artifactory.layout.EncryptConfigurationInterceptor.getNewPassword(EncryptConfigurationInterceptor.java:181)
at org.artifactory.layout.EncryptConfigurationInterceptor.encryptOrDecrypt(EncryptConfigurationInterceptor.java:112)
at org.artifactory.layout.EncryptConfigurationInterceptor.encrypt(EncryptConfigurationInterceptor.java:203)
at org.artifactory.layout.EncryptConfigurationInterceptor.onBeforeSave(EncryptConfigurationInterceptor.java:193)
at org.artifactory.config.ConfigurationChangesInterceptorsImpl.onBeforeSave(ConfigurationChangesInterceptorsImpl.java:43)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:201)
at com.sun.proxy.$Proxy95.onBeforeSave(Unknown Source)
at org.artifactory.config.CentralConfigServiceImpl.preSaveDescriptor(CentralConfigServiceImpl.java:319)
at org.artifactory.config.CentralConfigServiceImpl.forceSaveDescriptorInternal(CentralConfigServiceImpl.java:377)
at org.artifactory.config.CentralConfigServiceImpl.initCacheAndGetCurrent(CentralConfigServiceImpl.java:166)
at org.artifactory.config.CentralConfigServiceImpl.init(CentralConfigServiceImpl.java:147)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at org.artifactory.storage.fs.lock.aop.LockingAdvice.invoke(LockingAdvice.java:76)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
at com.sun.proxy.$Proxy96.init(Unknown Source)
at org.artifactory.spring.ArtifactoryApplicationContext.refresh(ArtifactoryApplicationContext.java:251)
... 8 common frames omitted
Caused by: javax.crypto.BadPaddingException: Given final block not properly padded
at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:975)
at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:833)
at com.sun.crypto.provider.PKCS12PBECipherCore.implDoFinal(PKCS12PBECipherCore.java:399)
at com.sun.crypto.provider.PKCS12PBECipherCore$PBEWithSHA1AndDESede.engineDoFinal(PKCS12PBECipherCore.java:431)
at javax.crypto.Cipher.doFinal(Cipher.java:2165)
at org.jfrog.security.crypto.JFrogCryptoHelper.decryptSymmetric(JFrogCryptoHelper.java:302)
at org.jfrog.security.crypto.encrypter.DESedeBytesEncrypter.decrypt(DESedeBytesEncrypter.java:43)
at org.jfrog.security.crypto.EncryptionWrapperBase.decrypt(EncryptionWrapperBase.java:124)
... 44 common frames omitted
我发现了一些主题,从5.7.0以前的版本进行升级可能会导致此类问题,但不适用于此处。我已经安装了6.0.1并运行了几个月。您知道导致此问题的原因以及如何解决该问题吗?
编辑
这似乎与JFrog的JIRA系统中的RTFACT-15580有关。但是没有暗示如何可以对不良加密的数据进行清算。有任何想法吗?还是偶然发现同一问题的人?
亲切的问候,
塞巴斯蒂安
答案 0 :(得分:1)
好的。
这是解决方案-感谢JFrog支持团队! 某种程度上,位于articleory / etc / security / artifactory.key下的工件安装密钥已损坏,这意味着它会随着时间而变化。由于工件将所有凭据存储在使用此密钥加密的配置文件中,因此无法解密凭据。因此,它拒绝启动。
解决方案:
对于我来说,删除电子邮件设置的加密密码就足够了。
我希望这可以帮助任何遇到类似问题的人。