Keystore Validation Error During Alfresco Deployment on Tomcat

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

Keystore Validation Error During Alfresco Deployment on Tomcat

I’m having trouble deploying Alfresco Content Services Community Edition (version 23.2.1) on Tomcat 10.1.28 in windows. After setting up the keystore and configuring alfresco-global.properties, I receive the following error:
 

SEVERE: Exception sending context initialized event to listener instance of class [org.alfresco.web.app.servlet.CORSContextListener]
org.alfresco.error.AlfrescoRuntimeException: 08050002 Keystores are invalid
.....
Caused by: org.alfresco.error.AlfrescoRuntimeException: 08050001 Failed to create key: metadata
in key store:
Location: /srv/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)
... 57 more
Caused by: org.alfresco.error.AlfrescoRuntimeException: 08050000 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

I have done Configuration Details changes:

1. Done changes in server.xml.

<Connector port="8080" protocol="HTTP/1.1"
URIEncoding="UTF-8"
connectionTimeout="20000"
maxHttpHeaderSize="32768"
redirectPort="8443" />

<Connector port="8443" protocol="HTTP/1.1"
SSLEnabled="true" maxThreads="150" scheme="https"
keystoreFile="D:/tomcat/apache-tomcat-10.1.28/srv/alfresco/alf_data/keystore/alfresco_keystore.jceks"
keystorePass="key123" keystoreType="JCEKS"
secure="true" connectionTimeout="240000"
truststoreFile="D:/tomcat/apache-tomcat-10.1.28/srv/alfresco/alf_data/keystore/alfresco_keystore.jceks/alfresco.truststore"
truststorePass="key123" truststoreType="JCEKS"
clientAuth="want" sslProtocol="TLS" />

2.Done changes in catalina.bat

set “JAVA_TOOL_OPTIONS=-Dencryption.keystore.type=JCEKS -Dencryption.cipherAlgorithm=DESede/CBC/PKCS5Padding -Dencryption.keyAlgorithm=DESede -Dencryption.keystore.location=D:/tomcat/apache-tomcat-10.1.28/srv/alfresco/alf_data/keystore -Dmetadata-keystore.password=mp6yc0UD9e -Dmetadata-keystore.aliases=metadata -Dmetadata-keystore.metadata.password=oKIWzVdEdA -Dmetadata-keystore.metadata.algorithm=DESede”

3. Created keystore and truststore in D:\tomcat\apache-tomcat-10.1.28\srv\alfresco\alf_data\keystore

keystore.png

4. Created shared folder. Inside that copied mysqlconnector-j in lib folder and <tomcat home>/lib folder and created alfresco-global.properties file.

###############################
## Common Alfresco Properties #
###############################

#
# Sample custom content and index data location
#
dir.root=/srv/alfresco/alf_data
dir.keystore=${dir.root}/keystore
crypto.keystore.location=${dir.keystore}/alfresco_keystore.jceks
crypto.keystore.password=${dir.keystore}/keystore-passwords
crypto.keystore.type=JCEKS

crypto.truststore.location=${dir.keystore}/alfresco.truststore
crypto.truststore.password=${dir.keystore}/ssl-truststore-passwords
crypto.truststore.type=JCEKS

#
# Sample database connection properties
#
db.username=alfresco
db.password=alfresco

# MySQL connection
#
 db.driver=com.mysql.cj.jdbc.Driver
 db.url=jdbc:mysql://localhost:3306/alfresco?useSSL=false&serverTimezone=UTC
 db.username=alfresco_user
 db.password=*****
#
# 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

imap.server.enabled=true
imap.server.port=143
imap.server.host=localhost

# Default value of alfresco.rmi.services.host is 0.0.0.0 which means 'listen on all adapters'.
# This allows connections to JMX both remotely and locally.
#
alfresco.rmi.services.host=0.0.0.0

smart.folders.enabled=true
smart.folders.model=alfresco/model/smartfolder-model.xml
smart.folders.model.labels=alfresco/messages/smartfolder-model

5. Copied jar files from zip file into tomcat/webapps. And execute startup.bat in cmd.

 These are the steps I have done and getting above error. Kindly help to resolve this issue.

 

Thanks & Regards,

Richa Manchanda.