GIDForums  

Go Back   GIDForums > Web Hosting Forums > Apache Web Server Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 04-Feb-2009, 00:10
tanmoy.b81 tanmoy.b81 is offline
New Member
 
Join Date: Feb 2009
Posts: 1
tanmoy.b81 is on a distinguished road

Apache Tomcat5.5 clustering problem with Apache HTTP server 2.2.4


Hello everybody,

I am new to this forum. I am trying to cluster two Tomcat 5.5.9 with Apache HTTP server 2.2.4 and Connector mod_jk.so for Apache HTTP server 2.2.4 in Windows XP PC of mine.

I have installed all in c:/ drive like c:/tomcat, c:/tomcat2 and c:/Apache2.2.
I placed the mod_jk.so file into the modules folder of Apache HTTP server 2.2.4.

1) I have configured two Tomcat in the way mentioned below:-

1st Tomcat's server.xml:-
a) <Server port="8005" shutdown="SHUTDOWN">
b) <Connector port="8088" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" />
c) <Connector port="8009" redirectPort="8443" protocol="AJP/1.3" />


2nd Tomcat's server.xml:-
a) <Server port="8025" shutdown="SHUTDOWN">
b) <Connector port="8018" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" />
c) <Connector port="8019" redirectPort="8443" protocol="AJP/1.3" />


2) I have created workers.properties file in Apache HTTP server's conf folder.

workers.properties:-
workers.tomcat_home=C:/tomcat

workers.java_home=C:/jdk1.5.0_07

worker.list=worker1,worker2

worker.worker1.port=8009
worker.worker1.host=localhost
worker.worker1.port=ajp13

worker.worker2.port=8019
worker.worker2.host=localhost
worker.worker2.port=ajp13


3) I have written below mentioned lines into Apache HTTP server's httpd.conf file just after LoadModule declaration the in conf folder.

LoadModule jk_module modules/mod_jk.so

#Path to workers.properties
JkWorkersFile C:/Apache2.2/conf/workers.properties

#Path to jk logs
JkLogFile C:/Apache2.2/mod_jk.log

#Jk log level[debug/error/info]
JkLogLevel info

#Jk log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"

#JkOptions for forwarding
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories

#JkRequestLogFormat set the request format
JkRequestLogFormat "%w %V %T"

JkMount /jsp-examples worker1
JkMount /jsp-examples/* worker1

JkMount /tomcat-docs worker2
JkMount /tomcat-docs/* worker2


Now the problem is when I start the Apache HTTP server 2.2.4 I can see errors in the mod_jk.log file given below.

[Wed Feb 04 11:24:23 2009][4004:2960] [warn] jk_map.c (404): Duplicate key 'worker.worker1.port' detected - previous value '8009' will be overwritten with 'ajp13'.
[Wed Feb 04 11:24:23 2009][4004:2960] [warn] jk_map.c (404): Duplicate key 'worker.worker2.port' detected - previous value '8019' will be overwritten with 'ajp13'.
[Wed Feb 04 11:24:23 2009][4004:2960] [error] jk_ajp_common.c (1997): invalid host and port localhost 0
[Wed Feb 04 11:24:23 2009][4004:2960] [error] jk_worker.c (161): validate failed for worker1
[Wed Feb 04 11:24:23 2009][4004:2960] [error] jk_worker.c (259): failed to create worker worker1
[Wed Feb 04 11:24:23 2009][4004:2960] [warn] jk_map.c (404): Duplicate key 'worker.worker1.port' detected - previous value '8009' will be overwritten with 'ajp13'.
[Wed Feb 04 11:24:23 2009][4004:2960] [warn] jk_map.c (404): Duplicate key 'worker.worker2.port' detected - previous value '8019' will be overwritten with 'ajp13'.
[Wed Feb 04 11:24:23 2009][4004:2960] [error] jk_ajp_common.c (1997): invalid host and port localhost 0
[Wed Feb 04 11:24:23 2009][4004:2960] [error] jk_worker.c (161): validate failed for worker1
[Wed Feb 04 11:24:23 2009][4004:2960] [error] jk_worker.c (259): failed to create worker worker1
[Wed Feb 04 11:24:23 2009][3248:1844] [warn] jk_map.c (404): Duplicate key 'worker.worker1.port' detected - previous value '8009' will be overwritten with 'ajp13'.
[Wed Feb 04 11:24:23 2009][3248:1844] [warn] jk_map.c (404): Duplicate key 'worker.worker2.port' detected - previous value '8019' will be overwritten with 'ajp13'.
[Wed Feb 04 11:24:23 2009][3248:1844] [error] jk_ajp_common.c (1997): invalid host and port localhost 0
[Wed Feb 04 11:24:23 2009][3248:1844] [error] jk_worker.c (161): validate failed for worker1
[Wed Feb 04 11:24:23 2009][3248:1844] [error] jk_worker.c (259): failed to create worker worker1
[Wed Feb 04 11:24:23 2009][3248:1844] [warn] jk_map.c (404): Duplicate key 'worker.worker1.port' detected - previous value '8009' will be overwritten with 'ajp13'.
[Wed Feb 04 11:24:23 2009][3248:1844] [warn] jk_map.c (404): Duplicate key 'worker.worker2.port' detected - previous value '8019' will be overwritten with 'ajp13'.
[Wed Feb 04 11:24:23 2009][3248:1844] [error] jk_ajp_common.c (1997): invalid host and port localhost 0
[Wed Feb 04 11:24:23 2009][3248:1844] [error] jk_worker.c (161): validate failed for worker1
[Wed Feb 04 11:24:23 2009][3248:1844] [error] jk_worker.c (259): failed to create worker worker1


But the server starts successfully. After that I start two Tomcat web servers and they also starts successfully.

Now I open two browser and give a link like:- localhost/jsp-examples and localhost/tomcat-docs but it shows 500 internal server error in both the browser. I checked the access.log file in logs folder of Apache HTTP server 2.2.4 and I found this:-

127.0.0.1 - - [04/Feb/2009:11:32:50 +0530] "GET / HTTP/1.1" 200 44
127.0.0.1 - - [04/Feb/2009:11:33:47 +0530] "GET /jsp-examples HTTP/1.1" 500 536
127.0.0.1 - - [04/Feb/2009:11:34:02 +0530] "GET /tomcat-docs HTTP/1.1" 500 536


Please correct me if anything is wrong here. Help needed.

Thanks in advance........
Tanmoy
 
 

Recent GIDBlogAccepted for Ph.D. program by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache Web Server newbie problem niss3 Apache Web Server Forum 1 13-Apr-2009 19:38
Http Apache Server Rewrite Rule Problem sagarsway Apache Web Server Forum 0 28-Dec-2008 23:33
Named virtual host not working Johnnyrotton Apache Web Server Forum 4 04-Sep-2007 21:32
Apache2 config issues monev Apache Web Server Forum 2 28-Jun-2004 07:19
Can't view pages from another machine on the Intranet aevans Apache Web Server Forum 9 14-May-2004 03:26

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 19:16.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.