How to configure SSL on Tomcat 5
are the below steps correct :
# cd $CATALINA_HOME # $JAVA_HOME/keytool -genkey -alias tomcat -keyalg RSA -keystore { $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA \ -keystore /path/to/my/keystore } Enter keystore password : changeit What is your first and last name? [Unknown]: What is the name of your organizational unit? [Unknown] : What is the name of your organization? [Unknown]: What is the name of your City or Locality? [Unknown]: What is the name of your State or Province? [Unknown]: What is the two-letter country code for this unit? [Unknown]: { its asks the details are correct or not } correct? [no]: yes Enter key password for (RETURN if same as keystore password): Hit Enter. Tomcat will assume the password is “changeit” by default so it’s advised to leave it that way. Now let’s tell Tomcat to use the keystore file. # cd $CATALINA_HOME/conf/ # vi server.xml 3. Look for “<!– Define a SSL HTTP/1.1 Connector on port 8443 –>”. Remove the <!– –> comments indicator and add the keystore info. <!– Define a SSL HTTP/1.1 Connector on port 8443 –> <Connector port=”8443” maxHttpHeaderSize=”8192″ maxThreads=”150″ minSpareThreads=”25″ maxSpareThreads=”75″ enableLookups=”false” disableUploadTimeout=”true” acceptCount=”100″ scheme=”https” secure=”true” keystoreFile=”/path/to/my/keystore” clientAuth=”false” sslProtocol=”TLS” /> then restarting the tomcat Next https://localhost:8443 |
Quote:
|
i did'nt try them. I searched in the Google and i got these steps.
os: centos 5.2 |
Quote:
|
followed and did same as in 1 st post
|
followed the same which are written in the 1 st post
but keystore file path edited in server.xml is : /usr/share/tomcat5 OS : centos 5.2 java version : java version "1.5.0_16" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b02) Java HotSpot(TM) Client VM (build 1.5.0_16-b02, mixed mode, sharing) tomcat : 5.5 ( installed rpm's ) this is the error : 17-Nov-08 5:07:33 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.7rh) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getStore(tomcat-util-5.5.23.jar.so) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeystore(tomcat-util-5.5.23.jar.so) at org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.getKeyManagers(tomcat-util-5.5.23.jar.so) at org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.init(tomcat-util-5.5.23.jar.so) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(tomcat-util-5.5.23.jar.so) at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(tomcat-util-5.5.23.jar.so) at org.apache.tomcat.util.net.PoolTcpEndpoint.startEndpoint(tomcat-util-5.5.23.jar.so) at org.apache.coyote.http11.Http11BaseProtocol.start(tomcat-http-5.5.23.jar.so) at org.apache.coyote.http11.Http11Protocol.start(tomcat-http-5.5.23.jar.so) at org.apache.catalina.connector.Connector.start(catalina-5.5.23.jar.sot7n6f7.so) at org.apache.catalina.core.StandardService.start(catalina-5.5.23.jar.sot7n6f7.so) at org.apache.catalina.core.StandardServer.start(catalina-5.5.23.jar.sot7n6f7.so) at org.apache.catalina.startup.Catalina.start(catalina-5.5.23.jar.sot7n6f7.so) at java.lang.reflect.Method.invoke(libgcj.so.7rh) at org.apache.catalina.startup.Bootstrap.start(bootstrap.jar.so) at org.apache.catalina.startup.Bootstrap.main(bootstrap.jar.so) 17-Nov-08 5:07:33 PM org.apache.coyote.http11.Http11BaseProtocol start SEVERE: Error starting 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.23.jar.so) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeystore(tomcat-util-5.5.23.jar.so) at org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.getKeyManagers(tomcat-util-5.5.23.jar.so) at org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.init(tomcat-util-5.5.23.jar.so) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(tomcat-util-5.5.23.jar.so) at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(tomcat-util-5.5.23.jar.so) at org.apache.tomcat.util.net.PoolTcpEndpoint.startEndpoint(tomcat-util-5.5.23.jar.so) at org.apache.coyote.http11.Http11BaseProtocol.start(tomcat-http-5.5.23.jar.so) at org.apache.coyote.http11.Http11Protocol.start(tomcat-http-5.5.23.jar.so) at org.apache.catalina.connector.Connector.start(catalina-5.5.23.jar.sot7n6f7.so) at org.apache.catalina.core.StandardService.start(catalina-5.5.23.jar.sot7n6f7.so) at org.apache.catalina.core.StandardServer.start(catalina-5.5.23.jar.sot7n6f7.so) at org.apache.catalina.startup.Catalina.start(catalina-5.5.23.jar.sot7n6f7.so) at java.lang.reflect.Method.invoke(libgcj.so.7rh) at org.apache.catalina.startup.Bootstrap.start(bootstrap.jar.so) at org.apache.catalina.startup.Bootstrap.main(bootstrap.jar.so) 17-Nov-08 5:07:33 PM org.apache.catalina.startup.Catalina start SEVERE: Catalina.start: LifecycleException: service.getName(): "Catalina"; Protocol handler start failed: java.io.IOException: Exception trying to load keystore /usr/share/tomcat5/.keystore: JKS at org.apache.catalina.connector.Connector.start(catalina-5.5.23.jar.sot7n6f7.so) at org.apache.catalina.core.StandardService.start(catalina-5.5.23.jar.sot7n6f7.so) at org.apache.catalina.core.StandardServer.start(catalina-5.5.23.jar.sot7n6f7.so) at org.apache.catalina.startup.Catalina.start(catalina-5.5.23.jar.sot7n6f7.so) at java.lang.reflect.Method.invoke(libgcj.so.7rh) at org.apache.catalina.startup.Bootstrap.start(bootstrap.jar.so) at org.apache.catalina.startup.Bootstrap.main(bootstrap.jar.so) 17-Nov-08 5:07:33 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 3622 ms |
Quote:
|
File is existing in the path . I even tried providing complete 777 permissions to the file
|
All times are GMT -5. The time now is 02:12 PM. |