I have mod_jk / tomcat and apache somewhat working together but I am getting an error when displaying pages via the connector.

Tomcat is set up and works.  I can hit:
http://www.site.com:8080/examples/
or
http://www.site.com:8009/examples/

However, when I try:  http://www.site.com/examples/
I get a 503 error. "Service Temporarily Unavailable. The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later."

What stands out in my mod_jk.log is this line: " trying to connect socket 10 to 127.0.0.1:8009"

The system seems to be trying to connect via the local host. As you can see from my config files below I do not reference localhost or the 127.0.0.1 IP address. Best I can tell JK should be using http://www.site.com:8009 to get/pass data to Tomcat from Apache.

Is there a configuration option I am missing? Or how can I get JK to use the correct location?

Thanks,

Neal



________________________________________________________________________
System Specs:

Lixux/Debian
Apache 1.3.X
Tomcat 4.1.31
JK  1.2.14

________________________________________________________________________

mod_jk.log file:

[Tue Jan 24 13:53:01 2006] [23378:0000] [debug] map_uri_to_worker::jk_uri_worker_map.c (442): Attempting to map URI '/examples/' from 11 maps [Tue Jan 24 13:53:01 2006] [23378:0000] [debug] map_uri_to_worker::jk_uri_worker_map.c (454): Attempting to map context URI '/examples/jsp/security/protected/j_security_check' [Tue Jan 24 13:53:01 2006] [23378:0000] [debug] map_uri_to_worker::jk_uri_worker_map.c (454): Attempting to map context URI '/examples/CompressionTest' [Tue Jan 24 13:53:01 2006] [23378:0000] [debug] map_uri_to_worker::jk_uri_worker_map.c (454): Attempting to map context URI '/examples/SendMailServlet' [Tue Jan 24 13:53:01 2006] [23378:0000] [debug] map_uri_to_worker::jk_uri_worker_map.c (454): Attempting to map context URI '/examples/servletToJsp' [Tue Jan 24 13:53:01 2006] [23378:0000] [debug] map_uri_to_worker::jk_uri_worker_map.c (454): Attempting to map context URI '/examples/servlet/*' [Tue Jan 24 13:53:01 2006] [23378:0000] [debug] map_uri_to_worker::jk_uri_worker_map.c (454): Attempting to map context URI '/examples/*.jsp' [Tue Jan 24 13:53:01 2006] [23378:0000] [debug] map_uri_to_worker::jk_uri_worker_map.c (454): Attempting to map context URI '/examples/snoop' [Tue Jan 24 13:53:01 2006] [23378:0000] [debug] map_uri_to_worker::jk_uri_worker_map.c (454): Attempting to map context URI '/examples/*' [Tue Jan 24 13:53:01 2006] [23378:0000] [debug] map_uri_to_worker::jk_uri_worker_map.c (468): Found a wildchar match ajp13 -> /examples/* [Tue Jan 24 13:53:01 2006] [23378:0000] [debug] map_uri_to_worker::jk_uri_worker_map.c (442): Attempting to map URI '/examples/' from 11 maps [Tue Jan 24 13:53:01 2006] [23378:0000] [debug] map_uri_to_worker::jk_uri_worker_map.c (454): Attempting to map context URI '/examples/jsp/security/protected/j_security_check' [Tue Jan 24 13:53:01 2006] [23378:0000] [debug] map_uri_to_worker::jk_uri_worker_map.c (454): Attempting to map context URI '/examples/CompressionTest' [Tue Jan 24 13:53:01 2006] [23378:0000] [debug] map_uri_to_worker::jk_uri_worker_map.c (454): Attempting to map context URI '/examples/SendMailServlet' [Tue Jan 24 13:53:01 2006] [23378:0000] [debug] map_uri_to_worker::jk_uri_worker_map.c (454): Attempting to map context URI '/examples/servletToJsp' [Tue Jan 24 13:53:01 2006] [23378:0000] [debug] map_uri_to_worker::jk_uri_worker_map.c (454): Attempting to map context URI '/examples/servlet/*' [Tue Jan 24 13:53:01 2006] [23378:0000] [debug] map_uri_to_worker::jk_uri_worker_map.c (454): Attempting to map context URI '/examples/*.jsp' [Tue Jan 24 13:53:01 2006] [23378:0000] [debug] map_uri_to_worker::jk_uri_worker_map.c (454): Attempting to map context URI '/examples/snoop' [Tue Jan 24 13:53:01 2006] [23378:0000] [debug] map_uri_to_worker::jk_uri_worker_map.c (454): Attempting to map context URI '/examples/*' [Tue Jan 24 13:53:01 2006] [23378:0000] [debug] map_uri_to_worker::jk_uri_worker_map.c (468): Found a wildchar match ajp13 -> /examples/* [Tue Jan 24 13:53:01 2006] [23378:0000] [debug] wc_get_worker_for_name::jk_worker.c (111): found a worker ajp13 [Tue Jan 24 13:53:01 2006] [23378:0000] [debug] wc_maintain::jk_worker.c (301): Maintaining worker ajp13 [Tue Jan 24 13:53:01 2006] [23378:0000] [debug] init_ws_service::mod_jk.c (479): Service protocol=HTTP/1.1 method=GET host=(null) addrr=68.58.4.70 name=www.site.com port=80 auth=(null) user=(null) laddr=66.33.192.77 raddr=68.58.4.70 [Tue Jan 24 13:53:01 2006] [23378:0000] [debug] ajp_get_endpoint::jk_ajp_common.c (2119): acquired connection cache slot=0 [Tue Jan 24 13:53:01 2006] [23378:0000] [debug] ajp_marshal_into_msgb::jk_ajp_common.c (566): ajp marshaling done [Tue Jan 24 13:53:01 2006] [23378:0000] [debug] ajp_service::jk_ajp_common.c (1658): processing with 3 retries [Tue Jan 24 13:53:01 2006] [23378:0000] [debug] jk_open_socket::jk_connect.c (317): socket TCP_NODELAY set to On [Tue Jan 24 13:53:01 2006] [23378:0000] [debug] jk_open_socket::jk_connect.c (415): trying to connect socket 10 to 127.0.0.1:8009 [Tue Jan 24 13:53:01 2006] [23378:0000] [info] jk_open_socket::jk_connect.c (433): connect to 127.0.0.1:8009 failed with errno=111 [Tue Jan 24 13:53:01 2006] [23378:0000] [info] ajp_connect_to_endpoint::jk_ajp_common.c (880): Failed opening socket to (127.0.0.1:8009) with (errno=111) [Tue Jan 24 13:53:01 2006] [23378:0000] [info] ajp_send_request::jk_ajp_common.c (1239): Error connecting to the Tomcat process. [Tue Jan 24 13:53:01 2006] [23378:0000] [info] ajp_service::jk_ajp_common.c (1737): Sending request to tomcat failed, recoverable operation attempt=1 [Tue Jan 24 13:53:01 2006] [23378:0000] [debug] jk_open_socket::jk_connect.c (317): socket TCP_NODELAY set to On [Tue Jan 24 13:53:01 2006] [23378:0000] [debug] jk_open_socket::jk_connect.c (415): trying to connect socket 10 to 127.0.0.1:8009 [Tue Jan 24 13:53:01 2006] [23378:0000] [info] jk_open_socket::jk_connect.c (433): connect to 127.0.0.1:8009 failed with errno=111 [Tue Jan 24 13:53:01 2006] [23378:0000] [info] ajp_connect_to_endpoint::jk_ajp_common.c (880): Failed opening socket to (127.0.0.1:8009) with (errno=111) [Tue Jan 24 13:53:01 2006] [23378:0000] [info] ajp_send_request::jk_ajp_common.c (1239): Error connecting to the Tomcat process. [Tue Jan 24 13:53:01 2006] [23378:0000] [info] ajp_service::jk_ajp_common.c (1737): Sending request to tomcat failed, recoverable operation attempt=2 [Tue Jan 24 13:53:01 2006] [23378:0000] [debug] jk_open_socket::jk_connect.c (317): socket TCP_NODELAY set to On [Tue Jan 24 13:53:01 2006] [23378:0000] [debug] jk_open_socket::jk_connect.c (415): trying to connect socket 10 to 127.0.0.1:8009 [Tue Jan 24 13:53:01 2006] [23378:0000] [info] jk_open_socket::jk_connect.c (433): connect to 127.0.0.1:8009 failed with errno=111 [Tue Jan 24 13:53:01 2006] [23378:0000] [info] ajp_connect_to_endpoint::jk_ajp_common.c (880): Failed opening socket to (127.0.0.1:8009) with (errno=111) [Tue Jan 24 13:53:01 2006] [23378:0000] [info] ajp_send_request::jk_ajp_common.c (1239): Error connecting to the Tomcat process. [Tue Jan 24 13:53:01 2006] [23378:0000] [info] ajp_service::jk_ajp_common.c (1737): Sending request to tomcat failed, recoverable operation attempt=3 [Tue Jan 24 13:53:01 2006] [23378:0000] [error] ajp_service::jk_ajp_common.c (1746): Error connecting to tomcat. Tomcat is probably not started or is listening on the wrong port. worker=ajp13 failed [Tue Jan 24 13:53:01 2006] [23378:0000] [debug] ajp_done::jk_ajp_common.c (2062): recycling connection cache slot=0 for worker ajp13 [Tue Jan 24 13:53:01 2006] [23378:0000] [info] jk_handler::mod_jk.c (1832): Service error=0 for worker=ajp13


________________________________________________________________________

mod_jk.conf: Used via the include directive from httpd.conf. Include "/home/caribmag/tomcat/conf/mod_jk.conf"


<IfModule !mod_jk.c>
  LoadModule jk_module "/dh/apache/template/libexec/mod_jk.so"
</IfModule>

JkWorkersFile "/home/user/tomcat/conf/workers.properties"
JkLogFile "/home/user/tomcat/logs/mod_jk.log"
JkLogLevel debug


    <Directory "/home/user/tomcat/webapps">
        Options Indexes FollowSymLinks
        DirectoryIndex index.html index.htm index.jsp
    </Directory>


    Alias /examples "/home/user/tomcat/webapps/examples"

    <Directory "/home/user/tomcat/webapps/examples">
        Options Indexes FollowSymLinks
        DirectoryIndex index.html index.htm index.jsp
    </Directory>


    # Deny direct access to WEB-INF and META-INF
    #
    <Location "/examples/WEB-INF/*">
        AllowOverride None
        deny from all
    </Location>

    <Location "/examples/META-INF/*">
        AllowOverride None
        deny from all
    </Location>

    JkMount /*.jsp ajp13
    JkMount /examples ajp13
    JkMount /examples/* ajp13
    JkMount /examples/*.jsp  ajp13
    JkMount /examples/jsp/security/protected/j_security_check  ajp13
    JkMount /examples/snoop  ajp13
    JkMount /examples/servlet/*  ajp13
    JkMount /examples/CompressionTest  ajp13
    JkMount /examples/servletToJsp  ajp13
    JkMount /examples/SendMailServlet  ajp13
    JkMount /img/* ajp13



________________________________________________________________________


Workers Properties:
workers.tomcat_home=/home/user/tomcat
workers.java_home=/home/user/j2sdk1.4.2_10
ps=/
worker.list=ajp13
worker.ajp13.type=ajp13
worker.ajp13.host=www.site.com  (I have tried my IP here as well)
worker.ajp13.port=8009
worker.ajp13.cachesize=10
worker.ajp13.cache_timeout=600
worker.ajp13.socket_keepalive=1
worker.ajp13.socket_timeout=300

________________________________________________________________________

server.xml:

<Server port="8005" shutdown="SHUTDOWN" debug="10">
    <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
              modJk="/dh/apache/template/libexec/mod_jk.so"
              jkDebug="trace"
              workersConfig="/home/usr/tomcat/conf/workers.properties"
              jkLog="/home/usr/tomcat/logs/mod_jk.log" />


  <Service name="Tomcat-Apache" debug="99">


    <!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -->
      <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
               port="8080" minProcessors="5" maxProcessors="75"
               enableLookups="true" redirectPort="8443"
               acceptCount="100" debug="99" connectionTimeout="20000"
useURIValidationHack="false" disableUploadTimeout="true" URIEncoding="UTF-8" />


<Connector port="8009" enableLookups="false" debug="99" minProcessors="5" maxProcessors="75" connectionTimeout="20000" acceptCount="100" redirectPort="8443" address="66.33.192.77" protocol="AJP/1.3" URIEncoding="UTF-8" />

     <Engine name="Apache" defaultHost="www.site.com" debug="99">


      <Logger className="org.apache.catalina.logger.FileLogger"
              prefix="catalina_log." suffix=".txt"
              timestamp="true"/>

      <!-- Because this Realm is here, an instance will be shared globally -->
      <Realm className="org.apache.catalina.realm.MemoryRealm" />


      <Host name="www.site.com" debug="99"
           appBase="webapps"
           docBase=""
           unpackWARs="true" autoDeploy="true">

           <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
                     append="true"
                     forwardAll="false"
                     jkWorker="ajp13"
                     workersConfig="/home/usr/tomcat/conf/workers.properties"
                     modJk="/dh/apache/template/libexec/mod_jk.so" />


        <Logger className="org.apache.catalina.logger.FileLogger"
                 directory="logs"  prefix="site_log." suffix=".txt"
            timestamp="true"/>


          <Context path=""
           docBase="ROOT"
           debug="99" reloadable="true" crossContext="true"/>


        <!-- Tomcat Examples Context -->
        <Context path="/examples" docBase="examples" debug="10"
                 reloadable="true" crossContext="true">


          <Logger className="org.apache.catalina.logger.FileLogger"
                  prefix="localhost_examples_log." suffix=".txt"
                  timestamp="true"/>

        </Context>
      </Host>
    </Engine>
  </Service>
</Server>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to