You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jesse Farley <un...@austin.rr.com> on 2001/09/13 21:18:00 UTC

configuration of mod_jk and tomcat-4.0

Greetings,

First, I'd normally opt to figure out this problem by myself, but I'm
tempted
to jump out of my skin with frustration at this point -- so if anyone
could offer me assistance, I would greatly appreciate it.

Also, I aplogize for filling your inbox with a long post, but I'd rather
provide
as much information up front as I think could be useful.

Background:
I am trying to setup tomcat-4.0 (rc1) in combination with the mod_jk
connector (from the jakarta-tomcat-connectors cvs tree as of this morning
09/13/2001)

The environment that I started with was IIS on the front
end and the isapi_redirect.dll but since I'm more accustomed to linux,
I've also tried this with apache-1.3.20 on the front end as well.

I get the same error messages from both configurations:
* In the browser  upon attempting to connect to
http://localhost:9600/examples/jsp
       HTTP Status 500 - No Host matches server name localhost
* In the catalina.out file:
    === AjpRequest ===
    jvmRoute        = null

    Ajp13Processor[9610][4] invoking...
    WarpEngine[Apache]: Mapping request
    WarpEngine[Apache]: Mapping server name 'localhost'
    WarpEngine[Apache]:  Trying a direct match
    WarpEngine[Apache]:  Trying an alias match
    WarpEngine[Apache]:  Trying the default host
    [Ajp13] sendHeaders()
    [Ajp13] status is:  500(Internal Server Error)
    [Ajp13] send()
    [Ajp13] sending msg, len = 47
    [Ajp13] doWrite(byte[], 0, 140)
    [Ajp13] send()
    [Ajp13] sending msg, len = 148
    [Ajp13] finish()
    [Ajp13] send()
    [Ajp13] sending msg, len = 6
    [Ajp13] recycle()
    [Ajp13] receiveNextRequest()
    [Ajp13] receive()
    Ajp13Processor[9610][4] process: ajp13.receiveNextRequest
    java.io.InterruptedIOException: Read timed out
        at java.net.SocketInputStream.socketRead(Native Method)
        at java.net.SocketInputStream.read(SocketInputStream.java:86)
        at org.apache.ajp.Ajp13.receive(Ajp13.java:811)
        at org.apache.ajp.Ajp13.receiveNextRequest(Ajp13.java:272)
        at
org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:338)
        at
org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:423)
        at java.lang.Thread.run(Thread.java:484)
    [Ajp13] close()
    Ajp13Processor[9610][4] process:  done
----------------------------------------------------

I speculate that the problem is related to either:
 1.) Misconfuration of tomcat/mod_jk.
 2.) Perhaps I shouldn't be using the WarpEngine w/ mod_jk?

For the sake of argument, I'm posting a few exerpts from the apache
config files:

server.xml:
----------------------------------------
blah blah blah... [skip to the important part]
    <Connector className="org.apache.ajp.tomcat4.Ajp13Connector" port="9610"
      minProcessors="5" maxProcessors="75" enableLookups="true"
       acceptCount="10" debug="6"/>
      <Realm className="org.apache.catalina.realm.MemoryRealm" />
    <Engine className="org.apache.catalina.connector.warp.WarpEngine"
     name="Apache" debug="8" appBase="webapps" >
      <!-- Global logger unless overridden at lower levels -->
  <WarpHost name="localhost" debug="0" unpackWARs="true">
    <Valve className="org.apache.catalina.valves.AccessLogValve"
     directory="logs"  prefix="warp_global_access." suffix="log"
     pattern="common"/>
    <Logger className="org.apache.catalina.logger.FileLogger"
          directory="logs" prefix="modjk_errors." suffix=".log"
       timestamp="false"/>
    <Context path="" docBase="ROOT" debug="6" reloadable="false"/>
    <Context path="/examples" docBase="examples" debug="6"
                  reloadable="false"/>
  </WarpHost>
    </Engine>
  </Service>
</Server>
----------------------------------------
 workers.properties -
----------------------------------------
workers.tomcat_home=/home/jfarley/tomcat-mod_jk/
workers.java_home=/usr/local/jdk1.3.1
ps=/
worker.list=ajp13
worker.ajp13.port=9610
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
----------------------------------------
uriworkermap.properties -
----------------------------------------
# Simple worker configuration file
# Advanced mount of the examples context
/examples/*=ajp13
/examples/servlet/*=ajp13


The apache httpd.conf has:
# --- MOD_JK configuration
LoadModule jk_module libexec/mod_jk.so
AddModule  mod_jk.c
JkWorkersFile /home/jfarley/tomcat-mod_jk/conf/workers.properties
JkLogFile /home/jfarley/httpd/logs/mod_jk.log
JkLogLevel debug
JKLogStampFormat "[%a %b %d %H:%M:%S %Y]"
# and later ...
<VirtualHost *>
    ServerAdmin   root@localhost
    ServerName    localhost
    DocumentRoot  "/home/jfarley/tomcat-mod_jk/webapps/ROOT"
    JkMount /*.jsp ajp13
    JkMount /servlet/* ajp13
    JkMount /examples/* ajp13
    ErrorLog      logs/mod_jk_error.log
    CustomLog     logs/mod_jk_access.log common
</VirtualHost>
-------
Do I need a <Host> section in the server.xml -- or is there something more
fundamentally
incorrect?

Any assistance would be GREATLY apprecaited.

Regards

Jesse Farley
unixphreek@austin.rr.com

(p.s., please copy me on a response -- I'm on tomcat-dev, but not
tomcat-user , thanks.)




Configuring a Tomcat worker

Posted by Tony Vinayak <tv...@covalent.net>.
Environment: Tomcat 3.2
Apache 1.3.20
mod_jk
Solaris 2.8

Am trying to define and use a new Tomcat worker, but getting the 500 error.

In the workers.properties file, I defined:

worker.list=TonyWorker
worker.TonyWorker.port=8006
worker.TonyWorker.host=localhost
worker.TonyWorker.type=ajp13

In my httpsd.conf file, I have:
JkMount /myapp/* TonyWorker

In the mod_jk.log file, I get the following:

[jk_ajp13_worker.c (536)]: Into jk_endpoint_t::service
[jk_ajp13.c (346)]: Into ajp13_marshal_into_msgb
[jk_ajp13.c (480)]: ajp13_marshal_into_msgb - Done
[jk_connect.c (108)]: Into jk_open_socket
[jk_connect.c (115)]: jk_open_socket, try to connect socket = 7
[jk_connect.c (124)]: jk_open_socket, after connect ret = -1
[jk_connect.c (143)]: jk_open_socket, connect() failed errno = 146
[jk_ajp13_worker.c (173)]: In jk_endpoint_t::connect_to_tomcat, failed errno
= 1
46
[jk_ajp13_worker.c (584)]: Error connecting to the Tomcat process.
[jk_ajp13_worker.c (489)]: Into jk_endpoint_t::done

What am I doing wrong?

- Tony



Configuring a Tomcat worker

Posted by Tony Vinayak <tv...@covalent.net>.
Environment: Tomcat 3.2
Apache 1.3.20
mod_jk
Solaris 2.8

Am trying to define and use a new Tomcat worker, but getting the 500 error.

In the workers.properties file, I defined:

worker.list=TonyWorker
worker.TonyWorker.port=8006
worker.TonyWorker.host=localhost
worker.TonyWorker.type=ajp13

In my httpsd.conf file, I have:
JkMount /myapp/* TonyWorker

In the mod_jk.log file, I get the following:

[jk_ajp13_worker.c (536)]: Into jk_endpoint_t::service
[jk_ajp13.c (346)]: Into ajp13_marshal_into_msgb
[jk_ajp13.c (480)]: ajp13_marshal_into_msgb - Done
[jk_connect.c (108)]: Into jk_open_socket
[jk_connect.c (115)]: jk_open_socket, try to connect socket = 7
[jk_connect.c (124)]: jk_open_socket, after connect ret = -1
[jk_connect.c (143)]: jk_open_socket, connect() failed errno = 146
[jk_ajp13_worker.c (173)]: In jk_endpoint_t::connect_to_tomcat, failed errno
= 1
46
[jk_ajp13_worker.c (584)]: Error connecting to the Tomcat process.
[jk_ajp13_worker.c (489)]: Into jk_endpoint_t::done

What am I doing wrong?

- Tony