Hide Forgot
Description of problem: I was trying to enable a keystore in tomcat, and open https://localhost:8443 When I did this, I got this traceback in catalina.log: Using CATALINA_BASE: /usr/share/tomcat5 Using CATALINA_HOME: /usr/share/tomcat5 Using CATALINA_TMPDIR: /usr/share/tomcat5/temp Using JRE_HOME: 1-May-07 2:34:36 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/lib64/gcj-4.1.2 1-May-07 2:34:36 PM org.apache.coyote.http11.Http11BaseProtocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 1-May-07 2:34:36 PM org.apache.tomcat.util.net.jsse.JSSESocketFactory getStore SEVERE: Exception trying to load keystore /usr/share/tomcat5/.keystore java.security.KeyStoreException: JKS at java.security.KeyStore.getInstance(libgcj.so.8rh) at java.security.KeyStore.getInstance(libgcj.so.8rh) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getStore(tomcat-util-5.5.20.jar.so) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeystore(tomcat-util-5.5.20.jar.so) at org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.getKeyManagers(tomcat-util-5.5.20.jar.so) at org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.init(tomcat-util-5.5.20.jar.so) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(tomcat-util-5.5.20.jar.so) at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(tomcat-util-5.5.20.jar.so) at org.apache.coyote.http11.Http11BaseProtocol.init(tomcat-http-5.5.20.jar.so) at org.apache.catalina.connector.Connector.initialize(catalina-5.5.20.jar.som4esmn.so) at org.apache.catalina.core.StandardService.initialize(catalina-5.5.20.jar.som4esmn.so) at org.apache.catalina.core.StandardServer.initialize(catalina-5.5.20.jar.som4esmn.so) at org.apache.catalina.startup.Catalina.load(catalina-5.5.20.jar.som4esmn.so) at org.apache.catalina.startup.Catalina.load(catalina-5.5.20.jar.som4esmn.so) at java.lang.reflect.Method.invoke(libgcj.so.8rh) at org.apache.catalina.startup.Bootstrap.load(bootstrap.jar.so) at org.apache.catalina.startup.Bootstrap.main(bootstrap.jar.so) Caused by: java.security.NoSuchAlgorithmException: Algorithm [JKS] of type [KeyStore] from provider [gnu.javax.security.auth.callback.GnuCallbacks: name=GNU-CALLBACKS version=2.1] is not found at gnu.java.security.Engine.getInstance(libgcj.so.8rh) at java.security.KeyStore.getInstance(libgcj.so.8rh) ...16 more 1-May-07 2:34:36 PM org.apache.coyote.http11.Http11BaseProtocol init SEVERE: Error initializing endpoint java.io.IOException: Exception trying to load keystore /usr/share/tomcat5/.keystore: JKS at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getStore(tomcat-util-5.5.20.jar.so) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeystore(tomcat-util-5.5.20.jar.so) at org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.getKeyManagers(tomcat-util-5.5.20.jar.so) at org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.init(tomcat-util-5.5.20.jar.so) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(tomcat-util-5.5.20.jar.so) at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(tomcat-util-5.5.20.jar.so) at org.apache.coyote.http11.Http11BaseProtocol.init(tomcat-http-5.5.20.jar.so) at org.apache.catalina.connector.Connector.initialize(catalina-5.5.20.jar.som4esmn.so) at org.apache.catalina.core.StandardService.initialize(catalina-5.5.20.jar.som4esmn.so) at org.apache.catalina.core.StandardServer.initialize(catalina-5.5.20.jar.som4esmn.so) at org.apache.catalina.startup.Catalina.load(catalina-5.5.20.jar.som4esmn.so) at org.apache.catalina.startup.Catalina.load(catalina-5.5.20.jar.som4esmn.so) at java.lang.reflect.Method.invoke(libgcj.so.8rh) at org.apache.catalina.startup.Bootstrap.load(bootstrap.jar.so) at org.apache.catalina.startup.Bootstrap.main(bootstrap.jar.so) 1-May-07 2:34:36 PM org.apache.catalina.startup.Catalina load SEVERE: Catalina.start LifecycleException: Protocol handler initialization failed: java.io.IOException: Exception trying to load keystore /usr/share/tomcat5/.keystore: JKS at org.apache.catalina.connector.Connector.initialize(catalina-5.5.20.jar.som4esmn.so) at org.apache.catalina.core.StandardService.initialize(catalina-5.5.20.jar.som4esmn.so) at org.apache.catalina.core.StandardServer.initialize(catalina-5.5.20.jar.som4esmn.so) at org.apache.catalina.startup.Catalina.load(catalina-5.5.20.jar.som4esmn.so) at org.apache.catalina.startup.Catalina.load(catalina-5.5.20.jar.som4esmn.so) at java.lang.reflect.Method.invoke(libgcj.so.8rh) at org.apache.catalina.startup.Bootstrap.load(bootstrap.jar.so) at org.apache.catalina.startup.Bootstrap.main(bootstrap.jar.so) I tested this on rawhide, but the same failure seems to be occuring on FC-6: http://forums.fedoraforum.org/forum/showthread.php?t=136981
What tool did you use to generate the keystore? gkeytool (GNU's keytool implementation) or keytool (Sun's implementation)?
[spot@localhost ~]$ rpm -qf /usr/lib/jvm/jre-1.5.0-gcj/bin/keytool java-1.5.0-gcj-1.5.0.0-14.fc7 So... whatever keytool came with java-1.5.0.
*** Bug 238614 has been marked as a duplicate of this bug. ***
Can you configure tomcat to expect a different keystore type? If so, try the "gkr" type.
Vivek, do you know why tomcat is trying to read the keystore file directly? What keystore formats does it support?
(In reply to comment #4) Well, when I tell tomcat that the type is gkr, the old error goes away, but we get a new one: java.io.IOException: Algorithm [SunX509] of type [KeyManagerFactory] from provider [gnu.javax.security.auth.callback.GnuCallbacks: name=GNU-CALLBACKS version=2.1] is not found Tomcat will let me alter the algorithm, but I'm not sure what to change it to.
Try gnu.javax.net.ssl.provider.X509KeyManagerFactory.
Hmm. I'm not sure how to do that, it seems to want a simple identifier. From the Tomcat docs: algorithm The X509 algorithm to use. This defaults to the Sun implementation (SunX509). For IBM JVMs you should use the value IbmX509. For other vendors, consult the JVM documentation for the correct value. I tried just algorithm="X509", but that gave me: SEVERE: Error starting endpoint java.io.IOException: Algorithm [X509] of type [KeyManagerFactory] from provider [gnu.javax.security.auth.callback.GnuCallbacks: name=GNU-CALLBACKS version=2.1] is not found
Based on the date this bug was created, it appears to have been reported against rawhide during the development of a Fedora release that is no longer maintained. In order to refocus our efforts as a project we are flagging all of the open bugs for releases which are no longer maintained. If this bug remains in NEEDINFO thirty (30) days from now, we will automatically close it. If you can reproduce this bug in a maintained Fedora version (7, 8, or rawhide), please change this bug to the respective version and change the status to ASSIGNED. (If you're unable to change the bug's version or status, add a comment to the bug and someone will change it for you.) Thanks for your help, and we apologize again that we haven't handled these issues to this point. The process we're following is outlined here: http://fedoraproject.org/wiki/BugZappers/F9CleanUp We will be following the process here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this doesn't happen again.
I suspect this bug is still relevant, it would be great if someone with more java expertise than me could retest.
Changing version to '9' as part of upcoming Fedora 9 GA. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
This message is a reminder that Fedora 9 is nearing its end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 9. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '9'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 9's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 9 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug to the applicable version. If you are unable to change the version, please add a comment here and someone will do it for you. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Fedora 9 changed to end-of-life (EOL) status on 2009-07-10. Fedora 9 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. Thank you for reporting this bug and we are sorry it could not be fixed.