4 Replies Latest reply on Apr 16, 2004 10:40 AM by Scott Stark

    SSL in JBoss 3.2.2 and Tomcat

    sanjewad Newbie

      Hi
      I need to setup SSL in JBoss 3.2.2/Tomcat to enable HTTPS.
      Can anybody list down a step by step process that I should follow.

      I went through JBoss 3.2 documentation and it is not working for me.

      Your help is appreciated.

        • 1. Re: SSL in JBoss 3.2.2 and Tomcat
          Giovanni Formenti Newbie

          I try to activate SSL on 3.2.3 but I think that on 3.2.2 it's possible in the same way:
          1) create a keystore that hold a certificate for the server:
          %JAVA_HOME%\bin\keytool -genkey -alias j2ee -keyalg RSA -keystore {keypath}\server.jks
          The passwords must be the same for the keystore and the key.
          2) edit jbossweb.sar/META-INF/jboss-service.xml and uncomment or add the connector:



          3) add the attribute redirectPort="8443" to the connector that handle the 8080 port for automatic redirect from 8080 to 8443 on protected pages.

          I hope this is useful...
          Gio

          • 2. Re: SSL in JBoss 3.2.2 and Tomcat
            jeetendrakharche Newbie

            Hi,

            I have done following steps to create the keystore and added the chap8.keystore file in JBOSS_HOME/server/default/conf.

            C:\>keytool -genkey -alias rmi+ssl -keyalg RSA -keystore chap8.keystore -validity 3650
            Enter keystore password: dxkeystore
            What is your first and last name?
            [Unknown]: COMP601
            What is the name of your organizational unit?
            [Unknown]: nti
            What is the name of your organization?
            [Unknown]: dpsl
            What is the name of your City or Locality?
            [Unknown]: pune
            What is the name of your State or Province?
            [Unknown]: maharashtra
            What is the two-letter country code for this unit?
            [Unknown]: in
            Is CN=COMP601, OU=nti, O=dpsl, L=pune, ST=maharashtra, C=in correct?
            [no]: y

            Enter key password for <rmi+ssl>
            (RETURN if same as keystore password):


            But still i am getting the below given exception

            12:25:56,461 ERROR [Http11Protocol] Error initializing endpoint
            java.io.IOException: Keystore was tampered with, or password was incorrect
            at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:739)
            at java.security.KeyStore.load(KeyStore.java:652)
            at org.apache.tomcat.util.net.jsse.JSSESocketFactory.initKeyStore(JSSESocketFactory.java:187)
            at org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.initProxy(JSSE14SocketFactory.java:147)
            at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:138)
            at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:277)
            at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:150)
            at org.apache.coyote.tomcat4.CoyoteConnector.initialize(CoyoteConnector.java:1156)
            at org.apache.catalina.startup.Embedded.start(Embedded.java:999)
            -------

            12:25:56,471 ERROR [EmbeddedTomcatService] Starting failed
            LifecycleException: Protocol handler initialization failed: java.io.IOException: Keystore was tampered with, or password was incorrect
            at org.apache.coyote.tomcat4.CoyoteConnector.initialize(CoyoteConnector.java:1158)
            at org.apache.catalina.startup.Embedded.start(Embedded.java:999)
            at org.jboss.web.tomcat.tc4.EmbeddedTomcatService.startService(EmbeddedTomcatService.java:273)
            at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
            ----------

            12:25:56,491 WARN [ServiceController] Problem starting service jboss.web:service=WebServer
            LifecycleException: Protocol handler initialization failed: java.io.IOException: Keystore was tampered with, or password was incorrect
            at org.apache.coyote.tomcat4.CoyoteConnector.initialize(CoyoteConnector.java:1158)
            at org.apache.catalina.startup.Embedded.start(Embedded.java:999)
            at org.jboss.web.tomcat.tc4.EmbeddedTomcatService.startService(EmbeddedTomcatService.java:273)
            at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)

            What can be the cause?

            Thanks in advance.

            Jitendra

            • 3. Re: SSL in JBoss 3.2.2 and Tomcat
              Nitin Shreyakar Newbie

              Did you get any solution cause i'm also struggling with it.


              thanks
              nitin