cancel
Showing results for 
Search instead for 
Did you mean: 

Getting error while starting ACS 7.0 - Keystores are invalid

Patelvikash09
Champ on-the-rise
Champ on-the-rise

Hello Team, 
I am using acs 7.0 , and used zip method to install acs 7.0 while running the project I am facing Invalid, keystore Error.
Please guide, whats need to be corrected - 

dir.root=C:/Users/XXXX/acs7/alf_data
dir.keystore=${dir.root}/keystore

dir.license.external=C:/Users/XXXX/acs7/licenses

image

I have copied above listed files from alfresco-content-services-distribution-7.0.0.1 ,

Error which I am getting 

ERROR [web.context.ContextLoader] [main] Context initialization failed
org.alfresco.error.AlfrescoRuntimeException: 04040002 Keystores are invalid
        at org.alfresco.encryption.EncryptionChecker$1.execute(EncryptionChecker.java:78)
        at org.alfresco.encryption.EncryptionChecker$1.execute(EncryptionChecker.java:1)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:450)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:319)
        at org.alfresco.encryption.EncryptionChecker.onBootstrap(EncryptionChecker.java:67)
        at org.springframework.extensions.surf.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:56)
        at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEventInternal(SafeApplicationEventMulticaster.java:221)
        at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:186)
        at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:206)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:426)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:383)
        at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:943)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:591)
        at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:401)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:292)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103)
        at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:70)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4716)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5172)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:706)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:689)
        at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1881)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
        at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
        at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:582)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1611)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:319)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
        at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
        at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:936)
        at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:843)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
        at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
        at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.StandardService.startInternal(StandardService.java:433)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:772)
        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 org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:342)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473)
Caused by: org.alfresco.error.AlfrescoRuntimeException: 04040001 Failed to create key: metadata
 in key store:
   Location: C:/Users/898103/acs7/alf_data/keystore/keystore
   Provider: null
   Type:     pkcs12
        at org.alfresco.encryption.AlfrescoKeyStoreImpl.createKey(AlfrescoKeyStoreImpl.java:664)
        at org.alfresco.encryption.AlfrescoKeyStoreImpl.validateKeys(AlfrescoKeyStoreImpl.java:915)
        at org.alfresco.encryption.AlfrescoKeyStoreImpl.validateKeys(AlfrescoKeyStoreImpl.java:188)
        at org.alfresco.encryption.KeyStoreChecker.validateKeyStores(KeyStoreChecker.java:49)
        at org.alfresco.encryption.EncryptionChecker$1.execute(EncryptionChecker.java:73)
        ... 57 more
Caused by: org.alfresco.error.AlfrescoRuntimeException: 04040000 Unable to get secret key: no key information is provided
        at org.alfresco.encryption.AlfrescoKeyStoreImpl.getSecretKey(AlfrescoKeyStoreImpl.java:775)
        at org.alfresco.encryption.AlfrescoKeyStoreImpl.createKey(AlfrescoKeyStoreImpl.java:642)
        ... 61 more
May 04, 2021 3:30:52 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class [org.alfresco.web.app.ContextLoaderListener]
org.alfresco.error.AlfrescoRuntimeException: 04040002 Keystores are invalid

 
Please guide me, how to resolve this.

Thanks,
Vikash

Thanks,
Vikash
1 ACCEPTED ANSWER

arjunmony
Star Contributor
Star Contributor

Hey Vikas,

From Alfresco 6.2 the Keystore configurations has been changed a little , so your config in global properties should be,

dir.keystore=/alfresco/acs/keystore/metadata-keystore

Java start args for tomcat

-Dencryption.keystore.type=JCEKS
-Dencryption.cipherAlgorithm=DESede/CBC/PKCS5Padding
-Dencryption.keyAlgorithm=DESede
-Dencryption.keystore.location=/alfresco/acs/keystore/metadata-keystore/keystore
-Dmetadata-keystore.password=XXXXXXX
-Dmetadata-keystore.aliases=metadata
-Dmetadata-keystore.metadata.password=XXXXXXXX
-Dmetadata-keystore.metadata.algorithm=DESede

View answer in original post

7 REPLIES 7

cristinamr
World-Class Innovator
World-Class Innovator

Hi

I think you are mixing concepts here: that "keystore" is not for SSL / mTLS configuration, but it's for encryption. As you're not using encryption (Community doesn't have this feature) you can use default "keystore" for that.

Maybe this post can help.

Cheers.

--
VenziaIT: helping companies since 2005! Our ECM products: AQuA & Seidoc

Hello @cristinamr ,
Thanks, for your suggetion & Approach,
I tried the @arjunmony 's solution and it worked for me.

Thanks,
Vikash

arjunmony
Star Contributor
Star Contributor

Hey Vikas,

From Alfresco 6.2 the Keystore configurations has been changed a little , so your config in global properties should be,

dir.keystore=/alfresco/acs/keystore/metadata-keystore

Java start args for tomcat

-Dencryption.keystore.type=JCEKS
-Dencryption.cipherAlgorithm=DESede/CBC/PKCS5Padding
-Dencryption.keyAlgorithm=DESede
-Dencryption.keystore.location=/alfresco/acs/keystore/metadata-keystore/keystore
-Dmetadata-keystore.password=XXXXXXX
-Dmetadata-keystore.aliases=metadata
-Dmetadata-keystore.metadata.password=XXXXXXXX
-Dmetadata-keystore.metadata.algorithm=DESede

@arjunmony 

Thanks for the Solution,
It worked for me.

Thanks,
Vikash

EddieMay
World-Class Innovator
World-Class Innovator

Hi @Patelvikash09 

Thanks for accepting the solution - it's really helpful to other users and nice for the people who helped to know it worked.

Cheers,

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!

Rostand76
Champ in-the-making
Champ in-the-making

please I have the same problem how can I solve it ??

Hey Rostand,

What error you are getting?