2 Replies Latest reply on Sep 23, 2003 9:01 AM by jfair

    HTTPConnector - Bind port 80 on specific IP address

    jfair

      I am using jboss-3.0.4_tomcat-4.1.12.

      I have multiple IP's on one box. I would like the embedded Tomcat to bind port 80 on a specific IP address. Right now, when I startup Jboss... port 80 is bound on every IP address for the local machine.

      Here is my tomcat41-service.xml with the HTTPConnector:

      <?xml version="1.0" encoding="UTF-8"?>
      <!-- Set catalina.home to the location of the Tomcat-4.1.x dist.
      The default value is that of the JBoss/Catalina bundle where the
      jakarta-tomcat-4.1.12-LE-jdk14 is included as jboss_dist/catalina
      -->
      <!DOCTYPE server [
      <!ENTITY catalina.home "../tomcat-4.1.x">
      ]>

      <!-- The service configuration for the embedded Tomcat4.1.x web container
      -->









      &catalina.home;

      <!-- Uncomment this if you want interval snapshot for the
      session clustering.
      interval
      2000
      -->












      <!-- A HTTP Connector on port 80 -->


      <!-- A HTTPS Connector on port 443 -->











      Thanks

      JF

        • 1. Re: HTTPConnector - Bind port 80 on specific IP address
          jfair

          Is there any way to have the HTTPConnector to open a server socket on a specific IP address?

          From my server.log:

          2003-09-23 09:48:47,664 INFO [STDOUT] Apache Tomcat/4.1.12-LE-jdk14
          2003-09-23 09:48:47,684 INFO [org.jboss.web.localhost.Engine] HttpConnector Opening server socket on all host IP addresses
          2003-09-23 09:48:47,694 INFO [org.jboss.web.localhost.Engine] HttpConnector[80] Starting background thread
          2003-09-23 09:48:47,714 INFO [org.jboss.web.localhost.Engine] HttpProcessor[80][0] Starting background thread
          2003-09-23 09:48:47,724 INFO [org.jboss.web.localhost.Engine] HttpProcessor[80][1] Starting background thread
          2003-09-23 09:48:47,744 INFO [org.jboss.web.localhost.Engine] HttpProcessor[80][2] Starting background thread
          2003-09-23 09:48:47,754 INFO [org.jboss.web.localhost.Engine] HttpConnector Opening server socket on all host IP addresses
          2003-09-23 09:48:47,965 INFO [org.jboss.web.localhost.Engine] HttpConnector[443] Starting background thread
          2003-09-23 09:48:47,975 INFO [org.jboss.web.localhost.Engine] HttpProcessor[443][0] Starting background thread
          2003-09-23 09:48:47,985 INFO [org.jboss.web.localhost.Engine] HttpProcessor[443][1] Starting background thread
          2003-09-23 09:48:48,005 INFO [org.jboss.web.localhost.Engine] HttpProcessor[443][2] Starting background thread
          2003-09-23 09:48:48,025 INFO [org.jboss.web.localhost.Engine] HttpProcessor[443][3] Starting background thread
          2003-09-23 09:48:48,035 INFO [org.jboss.web.localhost.Engine] HttpProcessor[443][4] Starting background thread

          • 2. Re: HTTPConnector - Bind port 80 on specific IP address
            jfair

            Solved it - should have looked at the code for the HTTPConnector before posting. I needed to specify an address attribute on the HTTPConnector node. By default, if no address is supplied the HTTPConnector opens a server socket on all host IP addresses.

            tomcat41-service.xml:

            <?xml version="1.0" encoding="UTF-8"?>
            <!-- Set catalina.home to the location of the Tomcat-4.1.x dist.
            The default value is that of the JBoss/Catalina bundle where the
            jakarta-tomcat-4.1.12-LE-jdk14 is included as jboss_dist/catalina
            -->
            <!DOCTYPE server [
            <!ENTITY catalina.home "../tomcat-4.1.x">
            ]>

            <!-- The service configuration for the embedded Tomcat4.1.x web container
            -->









            &catalina.home;

            <!-- Uncomment this if you want interval snapshot for the
            session clustering.
            interval
            2000
            -->












            <!-- A HTTP Connector on port 8080 -->
            <Connector className = "org.apache.catalina.connector.http.HttpConnector"
            port = "80" address="172.22.56.14" minProcessors = "3" maxProcessors = "1000" enableLookups = "true"
            acceptCount = "1000" debug = "0" connectionTimeout = "60000"/>

            <!-- A HTTPS Connector on port 443 -->
            <Connector className = "org.apache.catalina.connector.http.HttpConnector"
            port = "443" address="172.22.56.14" scheme="https" secure = "true">










            Thanks anyways..