Link to home
Start Free TrialLog in
Avatar of komlaaa
komlaaa

asked on

SSL tomcat configuration

Hi Experts! Please help out Project deadline approaching

To configure SSL on tomcat, i am done the following(as shown on http://tomcat.apache.org/tomcat-5.0-doc/ssl-howto.html):
WHAT HAVE I ALREADY DONE:
1.)I create a new keystore from scratch, containing a single self-signed Certificate, execute the following from a terminal command line:
2.) I am using jdk5 so no need to download jsse.

3.) my ".storekey" looks as follow:
<Connector port="8443"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" disableUploadTimeout="true"
               acceptCount="100" debug="0" scheme="https" secure="true"
               clientAuth="false" sslProtocol="TLS"
               keystoreFile="C:\Documents and Settings\myName\.keystore"
               keystorePass="changeit"/>

MY PROBLEM: I am getting the exception below:

SEVERE: Error initializing endpoint
java.io.IOException: Cannot recover key
      at org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.init(JSSE14SocketFactory.java:127)
      at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:88)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:259)
      at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:137)
      at org.apache.coyote.tomcat5.CoyoteConnector.initialize(CoyoteConnector.java:1429)
      at org.apache.catalina.core.StandardService.initialize(StandardService.java:609)
      at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:2384)
      at org.apache.catalina.startup.Catalina.load(Catalina.java:507)
      at org.apache.catalina.startup.Catalina.load(Catalina.java:528)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:250)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:424)
May 10, 2006 4:13:06 PM org.apache.catalina.startup.Catalina load
SEVERE: Catalina.start
LifecycleException:  Protocol handler initialization failed: java.io.IOException: Cannot recover key
      at org.apache.coyote.tomcat5.CoyoteConnector.initialize(CoyoteConnector.java:1431)
ASKER CERTIFIED SOLUTION
Avatar of Acton Wang
Acton Wang
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Actually, you need to issue:

keytool -keypasswd -alias tomcat

then change the key password to "changeit" which is identical to the password for the keystore.

I assumed that you gave password of keystore as "changeit" as you specified in the server.xml.

It should do it.

Ok. Enjoy and be relaxed :)

Acton
Avatar of komlaaa
komlaaa

ASKER

you are right actonwang. my bad, i did not provide the same password twice during the account setup process.

Your are good

thanks again