3 Replies Latest reply on Apr 19, 2012 2:41 AM by vphanibhushanreddy

    Jboss 6 not listening on secure port 8443

    mcatalin23

      I'm trying to use the secure port 8443 for https connections.

       

      On bindings-jboss-beans.xml file there is the following configuration:

       

              <bean class="org.jboss.services.binding.ServiceBindingMetadata">
                 <property name="serviceName">jboss.web:service=WebServer</property>
                 <property name="bindingName">HttpConnector</property>
                 <property name="port">8080</property>
                 <property name="description">JBoss Web HTTP connector socket; also drives the values for the HTTPS and AJP sockets</property>
              </bean>

       

              <bean class="org.jboss.services.binding.ServiceBindingMetadata">
                 <property name="serviceName">jboss.web:service=WebServer</property>
                 <property name="bindingName">HttpsConnector</property>
                 <property name="port">8443</property>
                 <property name="description">JBoss Web HTTPS connector socket</property>
              </bean>

       

       

      I can check in the browser the http connection on localhost:8080 (see attached image),

      but the localhost:8443 is not working in the browser.

       

      Is anything else to be configured into jboss 6 to enable the https connection on port 8443?

        • 1. Re: Jboss 6 not listening on secure port 8443
          vphanibhushanreddy

          For HTTPS to work, you should enable the following lines in <JBOSS_HOME>/server/default/deploy/jbossweb.sar/server.xml

           

          <Connector protocol="HTTP/1.1" SSLEnabled="true"

                     port="8443" address="${jboss.bind.address}"

                     scheme="https" secure="true" clientAuth="false"

                     keystoreFile="${jboss.server.home.dir}/conf/chap8.keystore"

                     keystorePass="rmi+ssl" sslProtocol = "TLS" />

          • 2. Re: Jboss 6 not listening on secure port 8443
            mcatalin23

            I did uncomment the above tag from <JBOSS_HOME>/server/default/deploy/jbossweb.sar/server.xml

            Now I get following error on Jboss startup:

             

            09:20:00,046 ERROR [JSSESocketFactory] Failed to load keystore type JKS with path D:\Jboss-6.0.0.Final\server\default/conf/chap8.keystore due to D:\Jboss-6.0.0.Final\server\default\conf\chap8.keystore (The system cannot find the file specified): java.io.FileNotFoundException: D:\Jboss-6.0.0.Final\server\default\conf\chap8.keystore (The system cannot find the file specified)

             

            Do I really need a file chap8.keystore because I just want to use https 8443 port? How do I create a file like this one if this is really needed?

            • 3. Re: Jboss 6 not listening on secure port 8443
              vphanibhushanreddy

              You need to generate a key store for using SSL in JBoss. Please follow the steps:

               

              1) Generate a keystore based on operating system.

                   On Windows : %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA -keystore \path\to\my\keystore

                   On Linux: $JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA -keystore /path/to/my/keystore

                  

                 Note: /pat/to/my/keystore will generate the keystore in the specified directory.

              2) Keytool will request for you to enter passsword: Default password for jbossweb is 'changeit'. You could use the password you like though.

              3) After that is done, then please change the connector configuration to the password you entered and fileLocation of keystore attribute.

               

              That's all should fix your problem.