You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ben Ricker <br...@wellinx.com> on 2002/10/01 21:06:00 UTC

400 Error Revisited

I took Henri Gomez's request and tried to download the binary mod_jk
from the site he mentioned. I got the same undefined symbol. As I am
using Redhat 7.1 for my Apache server, I decided to take another
person's advice and built mod_jk from source following the JK
documentation.

I still get the 400 error thrown into the mod_jk logs. There is no log
on the Tomcat's side. 

Here is the error from the mod_jk log on the Apache side:

[Tue Oct 01 14:03:07 2002]  [jk_uri_worker_map.c (460)]: Into jk_uri_worker_map_t::map_uri_to_worker
[Tue Oct 01 14:03:07 2002]  [jk_uri_worker_map.c (477)]: Attempting to map URI '/index.jsp'
[Tue Oct 01 14:03:07 2002]  [jk_uri_worker_map.c (558)]: jk_uri_worker_map_t::map_uri_to_worker, Found a suffix mat
ch loadbalancer -> *.jsp
[Tue Oct 01 14:03:07 2002]  [jk_worker.c (132)]: Into wc_get_worker_for_name loadbalancer
[Tue Oct 01 14:03:07 2002]  [jk_worker.c (136)]: wc_get_worker_for_name, done  found a worker
[Tue Oct 01 14:03:07 2002]  [jk_lb_worker.c (527)]: Into jk_worker_t::get_endpoint
[Tue Oct 01 14:03:07 2002]  [jk_lb_worker.c (310)]: Into jk_endpoint_t::service
[Tue Oct 01 14:03:07 2002]  [jk_ajp_common.c (1391)]: Into jk_worker_t::get_endpoint
[Tue Oct 01 14:03:07 2002]  [jk_ajp_common.c (1107)]: Into jk_endpoint_t::service
[Tue Oct 01 14:03:07 2002]  [jk_ajp_common.c (295)]: Into ajp_marshal_into_msgb
[Tue Oct 01 14:03:07 2002]  [jk_ajp_common.c (432)]: ajp_marshal_into_msgb - Done
[Tue Oct 01 14:03:07 2002]  [jk_connect.c (132)]: Into jk_open_socket
[Tue Oct 01 14:03:07 2002]  [jk_connect.c (139)]: jk_open_socket, try to connect socket = 10
[Tue Oct 01 14:03:07 2002]  [jk_connect.c (148)]: jk_open_socket, after connect ret = 0
[Tue Oct 01 14:03:07 2002]  [jk_connect.c (157)]: jk_open_socket, set TCP_NODELAY to on
[Tue Oct 01 14:03:07 2002]  [jk_connect.c (174)]: jk_open_socket, return, sd = 10
[Tue Oct 01 14:03:07 2002]  [jk_ajp_common.c (614)]: In jk_endpoint_t::ajp_connect_to_endpoint, connected sd = 10
[Tue Oct 01 14:03:07 2002]  [jk_ajp_common.c (640)]: sending to ajp13 #462
[Tue Oct 01 14:03:07 2002]  [jk_ajp_common.c (882)]: ajp_send_request 2: request body to send 0 - request body to r
esend 0
[Tue Oct 01 14:03:07 2002]  [jk_ajp_common.c (727)]: received from ajp13 #33
[Tue Oct 01 14:03:07 2002]  [jk_ajp_common.c (483)]: ajp_unmarshal_response: status = 400
[Tue Oct 01 14:03:07 2002]  [jk_ajp_common.c (488)]: ajp_unmarshal_response: Number of headers is = 1
[Tue Oct 01 14:03:07 2002]  [jk_ajp_common.c (532)]: ajp_unmarshal_response: Header[0] [Content-Type] = [text/html]
[Tue Oct 01 14:03:07 2002]  [jk_ajp_common.c (727)]: received from ajp13 #2
[Tue Oct 01 14:03:07 2002]  [jk_ajp_common.c (1369)]: Into jk_endpoint_t::done, recycling connection
[Tue Oct 01 14:03:07 2002]  [jk_lb_worker.c (389)]: Into jk_endpoint_t::done
[Tue Oct 01 14:03:07 2002] loadbalancer host.name.com 0.009061

------------------------------------------

Again, my configs:

>>From httpd.conf:

#
# Load mod_jk
#
LoadModule jk_module libexec/mod_jk.so

#
# Configure mod_jk
#
# Where to find workers.properties
JkWorkersFile conf/workers.properties

# Where to log, what level, and format
JkLogFile logs/mod_jk.log
JkLogLevel debug
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkOptions +ForwardURICompat -ForwardDirectories
# JkRequestLogFormat set the request format
JkRequestLogFormat "%w %V %T"
# Send servlet for context /examples to worker named worker1
JkMount /examples/servlet/* oadbalancer
# Send JSPs for context /examples to worker named worker1
JkMount /examples/*.jsp loadbalancer

------------------------------------------------------

My workers.properties file:

# workers.properties
#

# In Unix, we use forward slashes:
ps=/

# list the workers by name

worker.list=tomcat1, tomcat2, loadbalancer

# ------------------------
# First tomcat server
# ------------------------
worker.tomcat1.port=11009
worker.tomcat1.host=dev.wellinx.com
worker.tomcat1.type=ajp13

# Specify the size of the open connection cache.
#worker.tomcat1.cachesize

#
# Specifies the load balance factor when used with
# a load balancing worker.
# Note:
#  ----> lbfactor must be > 0
#  ----> Low lbfactor means less work done by the worker.
worker.tomcat1.lbfactor=100


# ------------------------
# Second tomcat server
# ------------------------
worker.tomcat2.port=12009
worker.tomcat2.host=dev.wellinx.com
worker.tomcat2.type=ajp13
#worker.tomcat2.cachesize

#
# Specifies the load balance factor when used with
# a load balancing worker.
# Note:
#  ----> lbfactor must be > 0
#  ----> Low lbfactor means less work done by the worker.
worker.tomcat2.lbfactor=100


# ------------------------
# Load Balancer worker
# ------------------------

#
# The loadbalancer (type lb) worker performs weighted round-robin
# load balancing with sticky sessions.
# Note:
#  ----> If a worker dies, the load balancer will check its state
#        once in a while. Until then all work is redirected to peer
#        worker.
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=tomcat1, tomcat2

#
# END workers.properties
#

-----------------------------------------------------

My Connector configs from both tomcat instances....

This is in /usr/local/tomcat1/conf:

<!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
               port="11009" minProcessors="5" maxProcessors="75"
               acceptCount="10" debug="0"/>


This is in /usr/local/tomcat2/conf:

<!-- Define an AJP 1.3 Connector on port 12009 -->
    <Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
               port="12009" minProcessors="5" maxProcessors="75"
               acceptCount="10" debug="0"/>





-- 
Ben Ricker <br...@wellinx.com>
Wellinx.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: 400 Error Revisited

Posted by Michael Schulz <mi...@mschulz.net>.
I didn't see the contents of your server.xml file in the original post, but
what I'm seeing is that apache is correctly sending the request to tomcat
(because of the JkMount), tomcat is analyzing the request and deciding that
it cannot process the request, and sending the 400 back to apache, and of
course, apache sends the 400 back to the browser.  I ask about your
$CATALINA_HOME/conf/server.xml file because that is where the web app
contexts are configured.  If /index.jsp is the correct URL, then I would ask
you to send this request to Tomcat on port 80 and let us know the result of
that request.  It should be a 400 error.  If that is the case, then do you
have a ROOT context configured in Tomcat?  If you did, there would be in
your server.xml similar to the following:

	<Context path="" docBase="ROOT" debug="0"/>

And if all that is configured correctly, then do you have an index.jsp file
in your $CATALINA_HOME/webapps/ROOT folder?

-Mike Schulz


-----Original Message-----
From: Ben Ricker [mailto:bricker@wellinx.com]
Sent: Tuesday, October 01, 2002 3:09 PM
To: Tomcat Users List
Subject: RE: 400 Error Revisited


On Tue, 2002-10-01 at 14:59, Michael Schulz wrote:
> What is the URL that causes the 400 error?

Dangit...forgot to include that:

hostname:8080/index.jsp

Apache is listening on 8080 as I test this new setup. I have Tomcat
listening on 80 now.

> Also, is this a typo in your message, or is this really in your
> conf/workers.properties file?:
>
> 	# Send servlet for context /examples to worker named worker1
> 	JkMount /examples/servlet/* oadbalancer
>
> If so, you are missing the "l" in loadbalancer...don't know if that is the
> real cause, but it is something to examine.

Good call! I missed that one. Fixed it and it made no difference....

Ben Ricker

> -----Original Message-----
> From: Ben Ricker [mailto:bricker@wellinx.com]
> Sent: Tuesday, October 01, 2002 2:06 PM
> To: 'Tomcat Users List'
> Subject: 400 Error Revisited
>
>
> I took Henri Gomez's request and tried to download the binary mod_jk
> from the site he mentioned. I got the same undefined symbol. As I am
> using Redhat 7.1 for my Apache server, I decided to take another
> person's advice and built mod_jk from source following the JK
> documentation.
>
> I still get the 400 error thrown into the mod_jk logs. There is no log
> on the Tomcat's side.
>
> <snip>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
Ben Ricker <br...@wellinx.com>
Wellinx.com


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: 400 Error Revisited

Posted by Ben Ricker <br...@wellinx.com>.
On Tue, 2002-10-01 at 14:59, Michael Schulz wrote:
> What is the URL that causes the 400 error?

Dangit...forgot to include that:

hostname:8080/index.jsp

Apache is listening on 8080 as I test this new setup. I have Tomcat
listening on 80 now.

> Also, is this a typo in your message, or is this really in your
> conf/workers.properties file?:
> 
> 	# Send servlet for context /examples to worker named worker1
> 	JkMount /examples/servlet/* oadbalancer
> 
> If so, you are missing the "l" in loadbalancer...don't know if that is the
> real cause, but it is something to examine.

Good call! I missed that one. Fixed it and it made no difference....

Ben Ricker

> -----Original Message-----
> From: Ben Ricker [mailto:bricker@wellinx.com]
> Sent: Tuesday, October 01, 2002 2:06 PM
> To: 'Tomcat Users List'
> Subject: 400 Error Revisited
> 
> 
> I took Henri Gomez's request and tried to download the binary mod_jk
> from the site he mentioned. I got the same undefined symbol. As I am
> using Redhat 7.1 for my Apache server, I decided to take another
> person's advice and built mod_jk from source following the JK
> documentation.
> 
> I still get the 400 error thrown into the mod_jk logs. There is no log
> on the Tomcat's side.
> 
> <snip>
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
-- 
Ben Ricker <br...@wellinx.com>
Wellinx.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: 400 Error Revisited

Posted by Michael Schulz <mi...@mschulz.net>.
What is the URL that causes the 400 error?

Also, is this a typo in your message, or is this really in your
conf/workers.properties file?:

	# Send servlet for context /examples to worker named worker1
	JkMount /examples/servlet/* oadbalancer

If so, you are missing the "l" in loadbalancer...don't know if that is the
real cause, but it is something to examine.


-Mike Schulz

-----Original Message-----
From: Ben Ricker [mailto:bricker@wellinx.com]
Sent: Tuesday, October 01, 2002 2:06 PM
To: 'Tomcat Users List'
Subject: 400 Error Revisited


I took Henri Gomez's request and tried to download the binary mod_jk
from the site he mentioned. I got the same undefined symbol. As I am
using Redhat 7.1 for my Apache server, I decided to take another
person's advice and built mod_jk from source following the JK
documentation.

I still get the 400 error thrown into the mod_jk logs. There is no log
on the Tomcat's side.

<snip>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>