Bug 238613 - keystore fails in tomcat
Summary: keystore fails in tomcat
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard: bzcl34nup
: 238614 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-05-01 19:53 UTC by Tom "spot" Callaway
Modified: 2009-07-14 16:59 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-07-14 16:59:44 UTC
Type: ---


Attachments (Terms of Use)

Description Tom "spot" Callaway 2007-05-01 19:53:44 UTC
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

Comment 1 Thomas Fitzsimmons 2007-05-01 20:18:49 UTC
What tool did you use to generate the keystore?  gkeytool (GNU's keytool
implementation) or keytool (Sun's implementation)?


Comment 2 Tom "spot" Callaway 2007-05-01 20:24:31 UTC
[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.

Comment 3 Tom "spot" Callaway 2007-05-01 20:43:10 UTC
*** Bug 238614 has been marked as a duplicate of this bug. ***

Comment 4 Thomas Fitzsimmons 2007-05-01 20:47:26 UTC
Can you configure tomcat to expect a different keystore type?  If so, try the
"gkr" type.


Comment 5 Thomas Fitzsimmons 2007-05-01 21:33:00 UTC
Vivek, do you know why tomcat is trying to read the keystore file directly? 
What keystore formats does it support?


Comment 6 Tom "spot" Callaway 2007-05-01 21:35:59 UTC
(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.


Comment 7 Thomas Fitzsimmons 2007-05-01 21:39:33 UTC
Try gnu.javax.net.ssl.provider.X509KeyManagerFactory.


Comment 8 Tom "spot" Callaway 2007-05-01 21:49:06 UTC
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

Comment 9 Bug Zapper 2008-04-04 00:25:18 UTC
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.

Comment 10 Tom "spot" Callaway 2008-04-04 02:32:46 UTC
I suspect this bug is still relevant, it would be great if someone with more
java expertise than me could retest.

Comment 11 Bug Zapper 2008-05-14 02:50:21 UTC
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

Comment 12 Bug Zapper 2009-06-09 22:34:36 UTC
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

Comment 13 Bug Zapper 2009-07-14 16:59:44 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.