Hi
Ok I have modified the changes as below
Tomcat 1 is on c:/TOMCAT1 on startup port - 8081
<Connector port="8081" protocol="HTTP/1.1" connectionTimeout="20000"
redirectPort="8443" />
Tomcat 2 is on d:/TOMCAT2 on startup port - 8082
<Connector port="8082" protocol="HTTP/1.1" connectionTimeout="20000"
redirectPort="8443" />
TOMCAT1 >> .server.xml is as follows
<snip/>
<Connector port="8081" protocol="HTTP/1.1" connectionTimeout="20000">
redirectPort="8443" />
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
<Engine name="Catalina" defaultHost="localhost" jvmRoute="node01">
TOMCAT2 >> .server.xml is as follows
<snip/>
<Connector port="8081" protocol="HTTP/1.1" connectionTimeout="20000">
redirectPort="8443" />
<Connector port="8010" protocol="AJP/1.3" redirectPort="8443" />
<Engine name="Catalina" defaultHost="localhost" jvmRoute="node02">
TEST CASE for LB
Tomcat A starts up
Tomcat B starts up (Wait that TomcatA start is complete)
Tomcat A receives a request, a session S1 is created.
Tomcat A crashes
Tomcat B not able to process the a request for session S1
Tomcat B starts up
Tomcat A starts up (Wait that Tomcat B start is complete)
Tomcat B receives a request, a session S1 is created.
Tomcat B crashes
Tomcat A not able to process the a request for session S1
Both the Cases was a failure
The Apache Log files are as shown below
[Thu May 29 20:25:55 2008] [1264:2008] [info] jk_ajp_common.c (1347):
(node01) all endpoints are disconnected, detected by connect check (2),
cping (0), send (0)
[Thu May 29 20:25:56 2008] [1264:2008] [info] jk_connect.c (566):
connect to 10.10.16.63:8009 failed (errno=61)
[Thu May 29 20:25:56 2008] [1264:2008] [info] jk_ajp_common.c (869):
Failed opening socket to (10.10.16.63:8009) (errno=61)
[Thu May 29 20:25:56 2008] [1264:2008] [error] jk_ajp_common.c (1359):
(node01) connecting to backend failed. Tomcat is probably not started or
is listening on the wrong port (errno=61)
[Thu May 29 20:25:56 2008] [1264:2008] [info] jk_ajp_common.c (2186):
(node01) sending request to tomcat failed (recoverable), because of
error during request sending (attempt=1)
[Thu May 29 20:25:57 2008] [1264:2008] [info] jk_connect.c (566):
connect to 10.10.16.63:8009 failed (errno=61)
[Thu May 29 20:25:57 2008] [1264:2008] [info] jk_ajp_common.c (869):
Failed opening socket to (10.10.16.63:8009) (errno=61)
[Thu May 29 20:25:57 2008] [1264:2008] [error] jk_ajp_common.c (1359):
(node01) connecting to backend failed. Tomcat is probably not started or
is listening on the wrong port (errno=61)
[Thu May 29 20:25:57 2008] [1264:2008] [info] jk_ajp_common.c (2186):
(node01) sending request to tomcat failed (recoverable), because of
error during request sending (attempt=2)
[Thu May 29 20:25:57 2008] [1264:2008] [error] jk_ajp_common.c (2204):
(node01) Connecting to tomcat failed. Tomcat is probably not started or
is listening on the wrong port
[Thu May 29 20:25:57 2008] [1264:2008] [info] jk_lb_worker.c (1168):
service failed, worker node01 is in error state
[Thu May 29 20:25:58 2008] balancer 10.10.16.63 2.765395
[Thu May 29 20:26:01 2008] balancer 10.10.16.63 0.031248
[Thu May 29 20:26:01 2008] balancer 10.10.16.63 0.062494
[Thu May 29 20:27:54 2008] balancer 10.10.16.63 1.124907
[Thu May 29 20:27:54 2008] balancer 10.10.16.63 0.078118
[Thu May 29 20:27:54 2008] balancer 10.10.16.63 0.078119
[Thu May 29 20:27:55 2008] balancer 10.10.16.63 0.124990
[Thu May 29 20:28:08 2008] [1264:1000] [info] jk_ajp_common.c (1347):
(node02) all endpoints are disconnected, detected by connect check (2),
cping (0), send (0)
[Thu May 29 20:28:09 2008] [1264:1000] [info] jk_connect.c (566):
connect to 10.10.16.63:8010 failed (errno=61)
[Thu May 29 20:28:09 2008] [1264:1000] [info] jk_ajp_common.c (869):
Failed opening socket to (10.10.16.63:8010) (errno=61)
[Thu May 29 20:28:09 2008] [1264:1000] [error] jk_ajp_common.c (1359):
(node02) connecting to backend failed. Tomcat is probably not started or
is listening on the wrong port (errno=61)
[Thu May 29 20:28:09 2008] [1264:1000] [info] jk_ajp_common.c (2186):
(node02) sending request to tomcat failed (recoverable), because of
error during request sending (attempt=1)
[Thu May 29 20:28:10 2008] [1264:1000] [info] jk_connect.c (566):
connect to 10.10.16.63:8010 failed (errno=61)
[Thu May 29 20:28:10 2008] [1264:1000] [info] jk_ajp_common.c (869):
Failed opening socket to (10.10.16.63:8010) (errno=61)
[Thu May 29 20:28:10 2008] [1264:1000] [error] jk_ajp_common.c (1359):
(node02) connecting to backend failed. Tomcat is probably not started or
is listening on the wrong port (errno=61)
[Thu May 29 20:28:10 2008] [1264:1000] [info] jk_ajp_common.c (2186):
(node02) sending request to tomcat failed (recoverable), because of
error during request sending (attempt=2)
[Thu May 29 20:28:10 2008] [1264:1000] [error] jk_ajp_common.c (2204):
(node02) Connecting to tomcat failed. Tomcat is probably not started or
is listening on the wrong port
[Thu May 29 20:28:10 2008] [1264:1000] [info] jk_lb_worker.c (1168):
service failed, worker node02 is in error state
[Thu May 29 20:28:11 2008] balancer 10.10.16.63 2.484169
[Thu May 29 20:28:14 2008] balancer 10.10.16.63 0.015624
[Thu May 29 20:28:14 2008] balancer 10.10.16.63 0.062494
[Thu May 29 20:28:14 2008] balancer 10.10.16.63 0.015624
Any thing still missing ....
with regards
karthik
Christopher Schultz wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Karthik,
You've got your ports all fouled up. See below.
karthikn wrote:
| TOMCAT1 >> .server.xml is as follows
[snip]
| <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
[snip]
| TOMCAT2 >> .server.xml is as follows
[snip]
| <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
You can't have both Tomcats listening on port 8009. Choose another port
for one of these connectors. There is no way that both of your Tomcats
are running at the same time if they have to connect to the same port.
Check your logs again: one of your Tomcats is not running.
| ##################### Load Balance #####################
| worker.balancer.type=lb
| worker.balancer.method=B
| worker.balancer.sticky_session=TRUE
| worker.balancer.balanced_workers=node01, node02
|
| worker.node01.type=ajp13
| worker.node01.host=localhost
| worker.node01.port=8009
| worker.node01.lbfactor=1
|
| worker.node02.type=ajp13
| worker.node02.host=localhost
| worker.node02.port=8009
| worker.node02.lbfactor=1
lb config mostly looks good, except that you have the same port number
for both nodes. That cannot possibly work for the reason mentioned
above. After you change your Tomcat configurations, please adjust the lb
config accordingly.
| TEST CASE for LB
|
| |TomcatA| starts up
| |TomcatB| starts up (Wait that TomcatA start is complete)
I'm sure there's a failure at this point.
| |TomcatA| receives a request, a session |S1| is created.
| |TomcatA| crashes
| |TomcatB| not able to process the a request for session |||S1
| |||||
mod_jk is configured to talk to two different workers both pointing to
the same Tomcat instance. When you take down TomcatA (TOMCAT1?), TomcatB
is not only not running, but node02 points to TomcatA so there is no
possibility for communication.
Given your configuration, you are getting expected behavior.
No offense, but are you sure you are the right person on your team to be
configuring connectors, clustering, and load balancing?
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkg9Zn4ACgkQ9CaO5/Lv0PDAEgCgtwJZWxtkuMm72dwJ9oGo4Trl
Mi0AoJNPPIM+hQIuZPvAYiDuHVRqJSc4
=Lrv8
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]