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 18:05:16 UTC
Error 400 getting thrown
I am having a problem setting up a Tomcat installation using multiple
Tomcats (two to be exact) being load balanced from one Apache. Mod_jk is
being loaded correctly. I created a file called index.jsp with the
following code:
<html>
<body bgcolor="red">
<center>
<%= request.getSession().getId() %>
<h1>Tomcat 1</h1>
</body>
</html>
When I access index.jsp, I get a white page in the browser. Here is what
I get in the mod_jk log in debug mode:
[Tue Oct 01 11:01:11 2002] [jk_uri_worker_map.c (460)]: Into jk_uri_worker_map_t::map_uri_to_worker
[Tue Oct 01 11:01:11 2002] [jk_uri_worker_map.c (477)]: Attempting to map URI '/index.jsp'
[Tue Oct 01 11:01:11 2002] [jk_uri_worker_map.c (558)]: jk_uri_worker_map_t::map_uri_to_worker, Found a suffix match loadbalancer -> *.jsp
[Tue Oct 01 11:01:11 2002] [jk_worker.c (132)]: Into wc_get_worker_for_name loadbalancer
[Tue Oct 01 11:01:11 2002] [jk_worker.c (136)]: wc_get_worker_for_name, done found a worker
[Tue Oct 01 11:01:11 2002] [jk_lb_worker.c (527)]: Into jk_worker_t::get_endpoint
[Tue Oct 01 11:01:11 2002] [jk_lb_worker.c (310)]: Into jk_endpoint_t::service
[Tue Oct 01 11:01:11 2002] [jk_ajp_common.c (1355)]: Into jk_worker_t::get_endpoint
[Tue Oct 01 11:01:11 2002] [jk_ajp_common.c (1079)]: Into jk_endpoint_t::service
[Tue Oct 01 11:01:11 2002] [jk_ajp_common.c (280)]: Into ajp_marshal_into_msgb
[Tue Oct 01 11:01:11 2002] [jk_ajp_common.c (413)]: ajp_marshal_into_msgb - Done
[Tue Oct 01 11:01:11 2002] [jk_connect.c (116)]: Into jk_open_socket
[Tue Oct 01 11:01:11 2002] [jk_connect.c (123)]: jk_open_socket, try to connect socket = 8
[Tue Oct 01 11:01:11 2002] [jk_connect.c (132)]: jk_open_socket, after connect ret = 0
[Tue Oct 01 11:01:11 2002] [jk_connect.c (140)]: jk_open_socket, set TCP_NODELAY to on
[Tue Oct 01 11:01:11 2002] [jk_connect.c (148)]: jk_open_socket, return, sd = 8
[Tue Oct 01 11:01:11 2002] [jk_ajp_common.c (589)]: In jk_endpoint_t::ajp_connect_to_endpoint, connected sd = 8
[Tue Oct 01 11:01:11 2002] [jk_ajp_common.c (613)]: sending to ajp13 #462
[Tue Oct 01 11:01:11 2002] [jk_ajp_common.c (854)]: ajp_send_request 2: request body to send 0 - request body to resend 0
[Tue Oct 01 11:01:11 2002] [jk_ajp_common.c (699)]: received from ajp13 #33
[Tue Oct 01 11:01:11 2002] [jk_ajp_common.c (462)]: ajp_unmarshal_response: status = 400
[Tue Oct 01 11:01:11 2002] [jk_ajp_common.c (467)]: ajp_unmarshal_response: Number of headers is = 1
[Tue Oct 01 11:01:11 2002] [jk_ajp_common.c (507)]: ajp_unmarshal_response: Header[0] [Content-Type] = [text/html]
[Tue Oct 01 11:01:11 2002] [jk_ajp_common.c (699)]: received from ajp13 #2
[Tue Oct 01 11:01:11 2002] [jk_ajp_common.c (1333)]: Into jk_endpoint_t::done, recycling connection
[Tue Oct 01 11:01:11 2002] [jk_lb_worker.c (389)]: Into jk_endpoint_t::done
What exactly is the Error 400 showing? Error 400 is a "Bad Request".
Below are snippets of some conf files. Let me know if I need to show
anyone the server.xml file.
Thanks,
Ben Ricker
I have the following in httpd.conf:
#
# Set up loadbalncer for JkMount
#
JkMount /*.jsp loadbalancer
JkMount /servlets/* loadbalancer
#
# Configure mod_jk
#
JkWorkersFile conf/workers.properties
JkLogFile logs/mod_jk.log
JkLogLevel info
Here is the workers.properties:
#
# 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
# Specify the size of the open connection cache.
#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
#
--
Ben Ricker <br...@wellinx.com>
Wellinx.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>