Apache Tomcat5.5 clustering problem with Apache HTTP server 2.2.4

Discussion in 'Java' started by tanmoy.b81, Feb 4, 2009.

  1. tanmoy.b81

    tanmoy.b81

    Joined:
    Feb 4, 2009
    Messages:
    1
    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
     
    tanmoy.b81, Feb 4, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. gandhi.pathik@gmail.com

    Tomcat5.9-Stop problem--

    gandhi.pathik@gmail.com, Feb 1, 2006, in forum: Java
    Replies:
    0
    Views:
    568
    gandhi.pathik@gmail.com
    Feb 1, 2006
  2. chatwithsreevals@gmail.com

    JBoss Server Clustering

    chatwithsreevals@gmail.com, Feb 8, 2007, in forum: Java
    Replies:
    0
    Views:
    360
    chatwithsreevals@gmail.com
    Feb 8, 2007
  3. mineshdesai@gmail.com

    Problem in configuring SSL in Tomcat5.5

    mineshdesai@gmail.com, Mar 21, 2007, in forum: Java
    Replies:
    3
    Views:
    1,442
    mineshdesai@gmail.com
    Mar 22, 2007
  4. lightning
    Replies:
    3
    Views:
    532
    Oliver Wong
    Apr 16, 2007
  5. Mitschu
    Replies:
    0
    Views:
    435
    Mitschu
    Nov 21, 2007
Loading...

Share This Page