9 Replies Latest reply on Sep 21, 2010 1:57 AM by adrian.howchin

    https starting up on wrong port

    advaittrivedi

      I have this specification in deploy/jboss-web.deployer/server.xml

      <Connector port="24443" address="${jboss.bind.address}"
       maxThreads="100" strategy="ms" maxHttpHeaderSize="8192"
       emptySessionPath="true" SSLEnabled="true"
       scheme="https" secure="true" clientAuth="false"
       keystoreFile="${jboss.server.home.dir}/conf/ssl/ImportKey.jks"
       keystorePass="secret" sslProtocol = "TLS" />
      


      But when i start the server it starts https on 24364 and this line is also available in server.log

      Starting Coyote HTTP/1.1 on http-****.corp.****.com%2F172.20.97.7-24364
      


      Also the file tmp/server62079.xml contains this specification:

      <Connector port="24364" address="${jboss.bind.address}" maxThreads="100" strategy="ms" maxHttpHeaderSize="8192" emptySessionPath="true" SSLEnabled="true" scheme="https" secure="true" clientAuth="false" keystoreFile="${jboss.server.home.dir}/conf/ssl/ImportKey.jks" keystorePass="secret" sslProtocol="TLS"/>
      


      I am not sure how it gets generated!! I also tried starting the server after deleting tmp directory. But still the same file is generate in tmp and same port is used. Why is it not taking the port 24443 specified in server.xml?

        • 1. Re: https starting up on wrong port
          peterj

          For your HTTP port, what is the value of the "redirectPort" attribute?

          • 2. Re: https starting up on wrong port
            advaittrivedi

            Hi Peter, thanks for your reply.

            Here is redirect port of HTTP:


            • 3. Re: https starting up on wrong port
              advaittrivedi

               

               <Connector port="24001" address="${jboss.bind.address}"
               maxThreads="250" maxHttpHeaderSize="8192"
               emptySessionPath="true" protocol="HTTP/1.1"
               enableLookups="false" redirectPort="24443" acceptCount="100"
               connectionTimeout="20000" disableUploadTimeout="true" />
              


              • 4. Re: https starting up on wrong port
                peterj

                What version of JBossAS are you using?

                • 5. Re: https starting up on wrong port
                  advaittrivedi

                  Hi,
                  My AS version is: JBoss [Trinity] 4.2.1.GA

                  • 6. Re: https starting up on wrong port
                    peterj

                    Well, I have tried everything I can think of and I have yet to get a *server*.xml file to show up in the tmp directory.

                    Some things you could try:

                    1) Stop server, delete tmp directory, start server, and see if the *server*.xml file reappears in tmp, and if it still uses 24364 for the post. (I'm sure you have tried this already).

                    2) grep for 24364 in the app server and your application's files. That number had to come from somewhere.

                    • 7. Re: https starting up on wrong port
                      advaittrivedi

                      hi peter,

                      I tried both 1) and 2), but no results :(

                      with 1) server*.xml appears again with same port
                      with 2) no other files apart from server*.xml contains 24364

                      • 8. Re: https starting up on wrong port
                        peterj

                        The only other thing I can think of is that there is a system property being set that is dictating the port number, and that property is overriding what is in server.xml.

                        • 9. Re: https starting up on wrong port
                          adrian.howchin

                          Even though this is over 2 years old, I thought I'd reply anyway for the sake of sharing knowledge..

                           

                          I'm using JBoss AS 5.1.0_GA. In the conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml file there is an XSL transformation at the bottom, which starts like this:

                               <xsl:template match = "Connector">
                                   <Connector>
                                      <xsl:for-each select="@*">
                                      <xsl:choose>

                           

                          ... etc.

                           

                          This XSL transform applies to the server.xml file under deploy/jbossweb.sar/server.xml. It modifies the ports you put in there (I have no idea how or why - anyone?).

                           

                          The key line from this section is:
                          <xsl:variable name="portAJP" select="$port - 71"/>

                           

                          Note that your chose value (24443) is 71 greater than the value chosen by JBoss (24364). Ie. 24443 - 71 = 24364. My assumption is that for some bizarre reason this transform is applying to your port number.

                           

                          Can anyone explain the purpose and behaviour of the XSL transfrom to me?


                          Cheers,

                          Adrian