Reputation: 7413
Just installing a brand new alfresco and the share application is able to start but the alfresco repo doesn't. I get the following error in the BE:
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: 02080001 Keystores are invalid
at org.alfresco.encryption.EncryptionChecker$1.execute(EncryptionChecker.java:71
........
Caused by: org.alfresco.error.AlfrescoRuntimeException: 02080000 Failed to create key: metadata
in key store:
Location: /srv/alfresco/alf_data/keystore/keystore
Provider: null
Type: JCEKS
at org.alfresco.encryption.AlfrescoKeyStoreImpl.createKey(AlfrescoKeyStoreImpl.java:644)
at org.alfresco.encryption.AlfrescoKeyStoreImpl.validateKeys(AlfrescoKeyStoreImpl.java:890)
at org.alfresco.encryption.AlfrescoKeyStoreImpl.validateKeys(AlfrescoKeyStoreImpl.java:187)
at org.alfresco.encryption.KeyStoreChecker.validateKeyStores(KeyStoreChecker.java:47)
at org.alfresco.encryption.EncryptionChecker$1.execute(EncryptionChecker.java:66)
... 28 more
Caused by: java.lang.NullPointerException
at org.alfresco.encryption.AlfrescoKeyStoreImpl.getSecretKey(AlfrescoKeyStoreImpl.java:755)
at org.alfresco.encryption.AlfrescoKeyStoreImpl.createKey(AlfrescoKeyStoreImpl.java:633)
... 32 more
I am unsure as to why this is happening.
Upvotes: 1
Views: 9782
Reputation: 71
In recent version, the keystore is now stored in the war, in the classpath, not in alf_data. The default value in now: dir.keystore=classpath:alfresco/keystore
So just comment the line dir.keystore in your alfresco-global.properties and it should be ok.
Upvotes: 3
Reputation: 7413
Thank you all for your replies. In the end the only thing that worked was copying the keystore folder under the expanded war to the custom directory. Nothing else would work.
Upvotes: 1
Reputation: 5946
I want you to delete both alf_data and your alfresco database and recreate again.
Both of them are synchronized with each other as alf_data stores bin files whose location are saved in database.
And check these setting are correctly defined in alfresco-global.properties.
To keep keystore
If you want to keep keystore after deleting them, you can keep it anywhere apart from alf_data. I mean if you remove keystore location
dir.keystore=${dir.root}/keystore
from alfresco-global.properties
.
Keystore will be created under default keystores location dir.keystore=classpath:alfresco/keystore
which is defined in repository.properties
under <apache-tomcat>\webapps\alfresco\WEB-INF\classes\alfresco
.
Upvotes: 2
Reputation: 19578
Try deleting /srv/alfresco/alf_data
directory and recreate it again. Then create /srv/alfresco/alf_data
- and make sure tomcat/java can use it (sudo chown tomcat7:tomcat7 /srv/alfresco/alf_data
if you followed that tutorial to the letter).
Alternatively, you can put dir.root
directive in <TOMCAT_HOME>/shared/classes/alfresco-global.properties
file and place alf_data elsewhere.
Upvotes: 1