The following provides information for troubleshooting installation and deployment issues. To view general troubleshooting tips and search for troubleshooting topics, see EJBCA Troubleshooting.
I get timeouts and/or errors during startup of JBoss/Wildfly10
Ensure that the application server has enough cores (more than one), enough CPU (otherwise timeouts will occur) and enough memory (will also slow down the system).
Ensure that database indexes are applied, otherwise database searches get very slow as your database size grows.
The following SQL file that is ready to run on your database contains a set of recommended database indexes that can be applied to your database:
For more information, see Creating the Database.
I get an error with "Java heap space" when building EJBCA (during ant deploy)?
This error is because the default maximum allowed memory allocation for JAVA is set too low in your environment.
My installation failed for some reason that is now fixed, how do I proceed?
The best way to recover is usually o start over from scratch:
- Stop JBoss
- Make sure the database is clean
- Deploy and install EJBCA
- Stop JBoss and check that it stops without problems
- Start JBoss and check that it starts without problems
- Remove the old superadmin.p12 in you browser and import the newly generated one
I get errors during 'ant deployear' or 'ant runinstall'.
This is most usually due to a database configuration error. In the server log (JBOSS_HOME/standalone/log/server.log) you will probably see some SQLException errors. You should then:
- Make sure the settings in conf/database.properties are correct
- Make sure your configuration of the database in JBoss/WildFly is correct
- Follow the guidelines from "My installation failed for some reason that is now fixed, how do I proceed?"
See the configuration and troubleshooting section in doc/howto/HOWTO-database.txt for additional database related information.
I get an error with "Illegal key length" when using EJBCA?
This is because you are using Oracle JDK (instead of OpenJDK) and have not installed the "Unlimited Strength Crypto Policy Files". See the prerequisites section in the the installation guide. Even if you think you have installed them, you have not. This error is simple and unique.
It may also be that you are trying to enroll for a certificate passing in a public key with length that is shorter than the required key length specified in the Certificate Profile.
After an upgrade I get a "java.lang.NoSuchMethodError" error accessing the UI.
JBoss is bad at cleaning temporary files, sometimes we have to help. Remove the directories JBOSS_HOME/standalone/tmp and restart JBoss.
During the build process I get errors like: BUILD FAILED /usr/ejbca/build.xml:789: java.lang.ExceptionInInitializerError
You probably have ant pre-installed as a package from Fedora or Suse. Those pre-installations does not contain all default ant modules. You need the "optional tasks" included in the official ant distribution. Either add modules to the installed ant, or download the latest ant from http://ant.apache.org/.
A simple fix is to change the /etc/ant.conf to point to your user installed ant (in /your/ant/home). Change from:
# # ant.conf (Ant 1.6.x) # JPackage Project (http://www.jpackage.org/) # # Validate --noconfig setting in case being invoked # from pre Ant 1.6.x environment if [ -z "$no_config" ] ; then no_config=true fi # Setup ant configuration if $no_config ; then # Disable RPM layout rpm_mode=false else # Use RPM layout rpm_mode=true # ANT_HOME for rpm layout ANT_HOME=/usr/share/ant fi
# # ant.conf (Ant 1.6.x) # JPackage Project (http://www.jpackage.org/) # # Validate --noconfig setting in case being invoked # from pre Ant 1.6.x environment if [ -z "$no_config" ] ; then no_config=true fi # Setup ant configuration if $no_config ; then # Disable RPM layout rpm_mode=false else # Use RPM layout rpm_mode=false # ANT_HOME for rpm layout ANT_HOME=/your/ant/home fi
For Ubuntu, things are much easier, just 'sudo apt-get install ant' and 'sudo apt-get install ant-optional'.
Where is the log file stored for tracking errors and debug information?
How do I configure log level in JBoss?
You can configure logging in JBoss to be able to dynamically change logging.
For production systems, INFO log level is recommended:
To later enable DEBUG log level, if needed, use the following:
/subsystem=logging/logger=org.ejbca:write-attribute(name=level, value=DEBUG) /subsystem=logging/logger=org.cesecore:write-attribute(name=level, value=DEBUG)
For more information on application server-specific instructions, see Application Servers.
I get an error message when accessing the CA UI
Problem: Error message "Could not establish an encrypted connection because your certificate was rejected ... Error code: -12224" when accessing the CA Web
- Make sure you have imported to correct superadmin.p12 in your browser.
You may have to delete and import the CA certificate in your application server trust-store by running the following:
You can also import another CA than the initial ManagementCA (My CA in the example), using the following command:
ant -Dca.name="My CA" javatruststoreCODE
Make sure you restart JBoss after making changes to the java trust store.
Perhaps the JBoss configuration was not done automatically because you are running another configuration than 'default' in JBoss. Generally, the server configuration is located in the file
Also the file
$EJBCA_HOME/p12/tomcat.jksmust be copied to
$JBOSS_HOME/standalone/configuration/keystore/keystore.jks,where 'standalone' should be replaced with the JBoss configuration you are using.
I get a blank page on the UI after start?
Either you entered a hostname (in httpsserver.hostname in web.properties) that does not resolve to the machine where EJBCA is running during setup, or you changed the port that JBoss listens to. Make sure the hostname resolves to the machine EJBCA is running on.
When running 'ant runinstall' or creating JKS or PKCS12 files you can't use longer password than 7 characters. Anything longer gives an error?
Note, this is only relevant to OracleJDK. OpenJDK does not have this restriction.
If you want to use strong crypto and/or password longer than 7 characters in keystores you must install the 'Unlimited Strength Jurisdiction Policy Files' for JDK. The policy files can be found at the same place as the JDK download. Further information on this can be found in the Sun documentation on the JCE.
How do I manipulate EJBCA-keystores using JAVA's keytool?
EJBCA supports the PKCS12 format for the keystore because it is a standard, and we like standards. Normally keytool (e.g. Java's) can read PKCS12 file but not write, so the BouncyCastle JCE is needed to handle PKCS12 keystores.
keytool -list -alias privateKey -keystore server.p12 -storetype PKCS12 -storepass foo123 -provider org.bouncycastle.jce.provider.BouncyCastleProvider -providerpath $EJBCA_HOME/lib/bcprov-jdk15on-159.jar
It should be possible to import etc as well using keytool.
How do I make a keystore using keytool with a real certificate from EJBCA?
First generate a new keystore and a key pair:
$ keytool -genkey -alias mykey -keystore myks.jks -keyalg RSA -dname c=SE,O=AnaTom,CN=Test -keypass foo123 -storepass foo123
You SUN keystore is now in the file 'myks.jks'. Next generate a certification request (PKCS10):
$ keytool -certreq -alias mykey -sigalg SHA1WithRSA -file myreq.p10 -keypass foo123 -keystore myks.jks -storepass foo123
You now have the certification request in the file 'myreq.p10'. Open up EJBCA request page in your favorite browser, 'http://127.0.0.1:8080/ejbca', and select the link for NOT having a browser' Download the Root CA certificate by clicking on the link. Save the certificate as 'ca.pem'. Enter the username and password of a valid user with status NEW, see question 'Why do I get the exception/error:' above. Copy and paste the contents of the certification request, 'myreq.p10' into the text field. Save the returned certificate as 'cert.pem'.
Next import the Root CA certificate into the keystore 'myks.jks':
$ keytool -import -alias cacert -file ca.pem -keystore myks.jks -storepass foo123
Import the certificate reply into the keystore:
$ keytool -import -alias mykey -file cert.pem -keystore myks.jks -storepass foo123 -keypass foo123
Now you can take a look at your SUN keystore with:
$ keytool -list -keystore myks.jks
In theory, you can use the same method with a BouncyCastle PKCS12 keystore by adding the following arguments to every command above:
-provider org.bouncycastle.jce.provider.BouncyCastleProvider -storetype PKCS12 -providerpath $EJBCA_HOME/lib/bcprov-jdk15on-161.jar
Unfortunately a bug in keytool prevents this from functioning properly at the moment, therefore we recommend using the 'bin/ejbca.sh ca' to create PKCS12 keystores. It can be used to create keystores generally, not just for CAs.