Failed to create key: metadata

cancel
Showing results for 
Search instead for 
Did you mean: 
braiank
Member II

Failed to create key: metadata

Jump to solution

Hi,

I am trying to run alfresco community on windows.

I read that I have to recreate alf_data etc. - it does not work. Guess it's because of windows

 

2021-10-21 00:31:55,014  ERROR [web.context.ContextLoader] [localhost-startStop-1] Context initialization failed
org.alfresco.error.AlfrescoRuntimeException: 09210006 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:4763)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5232)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:727)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:695)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:673)
        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 java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.alfresco.error.AlfrescoRuntimeException: 09210005 Failed to create key: metadata
 in key store:
   Location: C:\XXXX\Alfresco\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)
        ... 29 more
Caused by: org.alfresco.error.AlfrescoRuntimeException: 09210004 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)
        ... 33 more
Oct 21, 2021 12:31:55 AM 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: 09210006 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:4763)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5232)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:727)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:695)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:673)
        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 java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.alfresco.error.AlfrescoRuntimeException: 09210005 Failed to create key: metadata
 in key store:
   Location: C:\XXXX\Alfresco\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)
        ... 29 more
Caused by: org.alfresco.error.AlfrescoRuntimeException: 09210004 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)
        ... 33 more

 

Here is my alfresco-global.properties :

 #
 # Set this property unless you have explicitly chosen to expose some repository APIs without authentication
 index.subsystem.name=solr6
 solr.secureComms=https
 solr.port=8983

 #
 # Custom content and index data location
 #
 dir.root=C\:\\XXXX\\Alfresco\\alf_data
 dir.keystore=${dir.root}\\keystore

 #
 # Sample database connection properties
 #
 db.username=alfresco
 db.password=XXXX
 db.name=alfresco
 db.host=XXXXX
 db.port=5432
 db.pool.max=275
 db.driver=org.postgresql.Driver
 db.url=jdbc:postgresql://${db.host}:${db.port}/${db.name}
 #
 # Choose DB connection properties for your database, e.g. for PostgreSQL
 #
 #db.driver=org.postgresql.Driver
 #db.url=jdbc:postgresql://localhost:5432/alfresco

 #
 # URL Generation Parameters (The ${localname} token is replaced by the local server name)
 #-------------
 alfresco.context=alfresco
 alfresco.host=${localname}
 alfresco.port=8080
 alfresco.protocol=http
 share.context=share
 share.host=${localname}
 share.port=8080
 share.protocol=http
 
 # ssl encryption
 encryption.ssl.keystore.location=${dir.keystore}\\ssl.keystore
 encryption.ssl.keystore.type=JCEKS
 encryption.ssl.keystore.keyMetaData.location=encryption.ssl.truststore.location=${dir.keystore}\\ssl.truststore
 encryption.ssl.truststore.type=JCEKS
 encryption.ssl.truststore.keyMetaData.location=encryption.keystore.type=JCEKS
 # secret key keystore configuration
 encryption.keystore.location=${dir.keystore}\\keystore
 encryption.keystore.keyMetaData.location=encryption.keystore.type=pcks12
 solr.host=localhost
 solr.port.ssl=8983


messaging.broker.url=failover:(tcp://XXXX:61616)?timeout=3000

 

2 Solutions

Accepted Solutions
abhinavmishra14
Advanced

Re: Failed to create key: metadata

Jump to solution

If you are setting up ACS Community 7 using distribution package, make sure you copy the "keystore" directory found in the package e.g. "alfresco-content-services-community-distribution-7.0.0.zip\keystore\" under "<ALF_HOME>/tomcat/shared/classes/alfresco/extension" directory. 

Update the following in alfresco-global.properties:

https://github.com/abhinavmishra14/alfresco7-solr-localtransform-dist-setup/blob/main/windows-platfo...

dir.keystore=<ALF_HOME>/tomcat/shared/classes/alfresco/extension/keystore

e.g.: dir.keystore=C:/alfresco-community70/tomcat/shared/classes/alfresco/extension/keystore

Also update the "<ALF_HOME>/tomcat/bin/catalina.bat" file to add following line:

https://github.com/abhinavmishra14/alfresco7-solr-localtransform-dist-setup/blob/main/windows-platfo...

set "JAVA_TOOL_OPTIONS=-Dencryption.keystore.type=JCEKS -Dencryption.cipherAlgorithm=DESede/CBC/PKCS5Padding -Dencryption.keyAlgorithm=DESede -Dencryption.keystore.location=${dir.keystore}/metadata-keystore/keystore -Dmetadata-keystore.password=mp6yc0UD9e -Dmetadata-keystore.aliases=metadata -Dmetadata-keystore.metadata.password=oKIWzVdEdA -Dmetadata-keystore.metadata.algorithm=DESede"

or

set "JAVA_TOOL_OPTIONS=-Dencryption.keystore.type=JCEKS -Dencryption.cipherAlgorithm=DESede/CBC/PKCS5Padding -Dencryption.keyAlgorithm=DESede -Dencryption.keystore.location=C:/alfresco-community70/tomcat/shared/classes/alfresco/extension/keystore/metadata-keystore/keystore -Dmetadata-keystore.password=mp6yc0UD9e -Dmetadata-keystore.aliases=metadata -Dmetadata-keystore.metadata.password=oKIWzVdEdA -Dmetadata-keystore.metadata.algorithm=DESede"

You can remove these from your alfresco-global.properties file:

# ssl encryption
 encryption.ssl.keystore.location=${dir.keystore}\\ssl.keystore
 encryption.ssl.keystore.type=JCEKS
 encryption.ssl.keystore.keyMetaData.location=encryption.ssl.truststore.location=${dir.keystore}\\ssl.truststore
 encryption.ssl.truststore.type=JCEKS
 encryption.ssl.truststore.keyMetaData.location=encryption.keystore.type=JCEKS
 # secret key keystore configuration
 encryption.keystore.location=${dir.keystore}\\keystore
 encryption.keystore.keyMetaData.location=encryption.keystore.type=pcks12

 

Check this doc as well: 

https://docs.alfresco.com/content-services/latest/admin/security/#alfresco-keystore-configuration

https://javaworld-abhinav.blogspot.com/2021/06/setup-acs70-ass201-and-transformation-service.html#en...

 

~Abhinav
(ACSCE, AWS SAA, Azure Admin)

View solution in original post

abhinavmishra14
Advanced

Re: Failed to create key: metadata

Jump to solution

Fix needs to be similar as stated above. You need to update the catalina.sh to add JAVA_TOOL_OPTIONS

 

Example:

JAVA_TOOL_OPTIONS="-Dencryption.keystore.type=JCEKS -Dencryption.cipherAlgorithm=DESede/CBC/PKCS5Padding -Dencryption.keyAlgorithm=DESede -Dencryption.keystore.location=/usr/local/alfresco-community70/tomcat/shared/classes/alfresco/extension/keystore/metadata-keystore/keystore -Dmetadata-keystore.password=mp6yc0UD9e -Dmetadata-keystore.aliases=metadata -Dmetadata-keystore.metadata.password=oKIWzVdEdA -Dmetadata-keystore.metadata.algorithm=DESede"

 

 

Check this for reference: https://github.com/abhinavmishra14/alfresco7-solr-localtransform-dist-setup/blob/main/linux-platform...

Make sure your path for keystore folder is correct in the catalina.sh settings for this param "encryption.keystore.location". See example above.

Refer this post, its for centos but step should same: https://javaworld-abhinav.blogspot.com/2021/06/setup-acs70-ass201-and-transformation-service.html#en...

 

~Abhinav
(ACSCE, AWS SAA, Azure Admin)

View solution in original post

3 Replies
abhinavmishra14
Advanced

Re: Failed to create key: metadata

Jump to solution

If you are setting up ACS Community 7 using distribution package, make sure you copy the "keystore" directory found in the package e.g. "alfresco-content-services-community-distribution-7.0.0.zip\keystore\" under "<ALF_HOME>/tomcat/shared/classes/alfresco/extension" directory. 

Update the following in alfresco-global.properties:

https://github.com/abhinavmishra14/alfresco7-solr-localtransform-dist-setup/blob/main/windows-platfo...

dir.keystore=<ALF_HOME>/tomcat/shared/classes/alfresco/extension/keystore

e.g.: dir.keystore=C:/alfresco-community70/tomcat/shared/classes/alfresco/extension/keystore

Also update the "<ALF_HOME>/tomcat/bin/catalina.bat" file to add following line:

https://github.com/abhinavmishra14/alfresco7-solr-localtransform-dist-setup/blob/main/windows-platfo...

set "JAVA_TOOL_OPTIONS=-Dencryption.keystore.type=JCEKS -Dencryption.cipherAlgorithm=DESede/CBC/PKCS5Padding -Dencryption.keyAlgorithm=DESede -Dencryption.keystore.location=${dir.keystore}/metadata-keystore/keystore -Dmetadata-keystore.password=mp6yc0UD9e -Dmetadata-keystore.aliases=metadata -Dmetadata-keystore.metadata.password=oKIWzVdEdA -Dmetadata-keystore.metadata.algorithm=DESede"

or

set "JAVA_TOOL_OPTIONS=-Dencryption.keystore.type=JCEKS -Dencryption.cipherAlgorithm=DESede/CBC/PKCS5Padding -Dencryption.keyAlgorithm=DESede -Dencryption.keystore.location=C:/alfresco-community70/tomcat/shared/classes/alfresco/extension/keystore/metadata-keystore/keystore -Dmetadata-keystore.password=mp6yc0UD9e -Dmetadata-keystore.aliases=metadata -Dmetadata-keystore.metadata.password=oKIWzVdEdA -Dmetadata-keystore.metadata.algorithm=DESede"

You can remove these from your alfresco-global.properties file:

# ssl encryption
 encryption.ssl.keystore.location=${dir.keystore}\\ssl.keystore
 encryption.ssl.keystore.type=JCEKS
 encryption.ssl.keystore.keyMetaData.location=encryption.ssl.truststore.location=${dir.keystore}\\ssl.truststore
 encryption.ssl.truststore.type=JCEKS
 encryption.ssl.truststore.keyMetaData.location=encryption.keystore.type=JCEKS
 # secret key keystore configuration
 encryption.keystore.location=${dir.keystore}\\keystore
 encryption.keystore.keyMetaData.location=encryption.keystore.type=pcks12

 

Check this doc as well: 

https://docs.alfresco.com/content-services/latest/admin/security/#alfresco-keystore-configuration

https://javaworld-abhinav.blogspot.com/2021/06/setup-acs70-ass201-and-transformation-service.html#en...

 

~Abhinav
(ACSCE, AWS SAA, Azure Admin)
Lamstom
Member II

Re: Failed to create key: metadata

Jump to solution

I have a similar error but in Ubuntu Server

2021-11-04 19:10:28,320  ERROR [web.context.ContextLoader] [main] Context initialization failed
org.alfresco.error.AlfrescoRuntimeException: 10040002 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:4768)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5230)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:698)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:696)
	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1024)
	at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1911)
	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.deployWARs(HostConfig.java:825)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:475)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1618)
	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:946)
	at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:835)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1396)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1386)
	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:919)
	at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:263)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.StandardService.startInternal(StandardService.java:432)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:927)
	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:345)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:476)
Caused by: org.alfresco.error.AlfrescoRuntimeException: 10040001 Failed to create key: metadata
 in key store: 
   Location: /opt/alfresco/tomcat/shared/classes/alfresco/extension/keystore/metadata-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

Please can you help me?

abhinavmishra14
Advanced

Re: Failed to create key: metadata

Jump to solution

Fix needs to be similar as stated above. You need to update the catalina.sh to add JAVA_TOOL_OPTIONS

 

Example:

JAVA_TOOL_OPTIONS="-Dencryption.keystore.type=JCEKS -Dencryption.cipherAlgorithm=DESede/CBC/PKCS5Padding -Dencryption.keyAlgorithm=DESede -Dencryption.keystore.location=/usr/local/alfresco-community70/tomcat/shared/classes/alfresco/extension/keystore/metadata-keystore/keystore -Dmetadata-keystore.password=mp6yc0UD9e -Dmetadata-keystore.aliases=metadata -Dmetadata-keystore.metadata.password=oKIWzVdEdA -Dmetadata-keystore.metadata.algorithm=DESede"

 

 

Check this for reference: https://github.com/abhinavmishra14/alfresco7-solr-localtransform-dist-setup/blob/main/linux-platform...

Make sure your path for keystore folder is correct in the catalina.sh settings for this param "encryption.keystore.location". See example above.

Refer this post, its for centos but step should same: https://javaworld-abhinav.blogspot.com/2021/06/setup-acs70-ass201-and-transformation-service.html#en...

 

~Abhinav
(ACSCE, AWS SAA, Azure Admin)