help with jboss + tomcat + apache + mod_jk in a load balanced config

Discussion in 'Java' started by Golem, Nov 27, 2003.

  1. Golem

    Golem Guest

    Hello, I'm trying to use apache + mod_jk to load balance some
    tomcat+jboss app servers.
    I have one tomcat which is on the same server as apache (on server1)
    and another on another box (server2)
    the following configuration only works on the local app server
    the other tomcat rejects the connection
    with the following errors in mod_jk.log:

    [Thu Nov 27 19:41:33 2003] [jk_ajp_common.c (679)]:
    ajp_connection_tcp_get_message: Error - jk_tcp_socket_recvfull failed
    [Thu Nov 27 19:41:33 2003] [jk_ajp_common.c (1041)]: Error reading
    reply
    [Thu Nov 27 19:41:33 2003] [jk_ajp_common.c (1178)]: In
    jk_endpoint_t::service, ajp_get_reply failed in send loop 0

    on jboss log I get:
    19:40:50,709 INFO [JkInputStream] Receiving: getting request body
    chunk 392 392
    19:40:50,717 INFO [STDOUT] 12 34 01 88 01 86 45 5f 64 65 74 65 63 74
    43 6f | .4.?.?E_detectCo
    19:40:50,719 INFO [STDOUT] 6d 70 6c 65 74 65 3d 31 26 45 5f 61 70 70
    4e 61 | mplete=1&E_appNa
    ... extra junk
    ....
    19:41:53,197 INFO [ChannelSocket] connection timeout reached

    here is the config:




    mod_jk.conf :

    LoadModule jk_module libexec/mod_jk.so
    JkWorkersFile /usr/local/apache/conf/workers.properties
    # Where to put jk logs
    JkLogFile /logs/mod_jk.log
    # Set the jk log level [debug/error/info]
    JkLogLevel info
    JkRequestLogFormat "%w %V %T"
    JkMount /MyJavaApp/* loadbalancer

    workers.properties:

    # Define 1 real worker using ajp13
    worker.list=loadbalancer, worker1, worker2
    # Set properties for worker1 (ajp13)
    worker.worker1.type=ajp13
    worker.worker1.host=server1
    worker.worker1.port=8009
    worker.worker1.lbfactor=50
    worker.worker1.cachesize=10
    worker.worker1.cache_timeout=600
    worker.worker1.socket_keepalive=1
    worker.worker1.socket_timeout=300
    ##################################
    worker.worker2.type=ajp13
    worker.worker2.host=server2
    worker.worker2.port=8009
    worker.worker2.lbfactor=50
    worker.worker2.cachesize=10
    worker.worker2.cache_timeout=600
    worker.worker2.socket_keepalive=1
    worker.worker2.socket_timeout=300
    ##################################
    worker.loadbalancer.type=lb
    worker.loadbalancer.balanced_workers=worker1, worker2
    worker.loadbalancer.sticky_session=1

    __________________________________________________________________

    /usr/local/jboss/server/custom/deploy/jbossweb-tomcat41.sar/META-INF/jboss-service.xml
    on server2:

    ....
    <Service name = "JBoss-Tomcat">
    <Engine name="MainEngine" jvmRoute="worker2"
    defaultHost="localhost">
    ....
    <!-- A AJP 1.3 Connector on port 8009 -->
    <Connector
    className="org.apache.coyote.tomcat4.CoyoteConnector"
    port="8009" minProcessors="5" maxProcessors="75"
    enableLookups="true" redirectPort="8443"
    acceptCount="10" debug="0" connectionTimeout="20000"
    useURIValidationHack="false"
    protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>

    .....
    please help me with any hints....
    the config for both app server is the same , the only difference is
    jvmRoute
    Golem, Nov 27, 2003
    #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. Stian Kaasa

    Apache + Tomcat + mod_jk configuring

    Stian Kaasa, Jan 18, 2004, in forum: Java
    Replies:
    1
    Views:
    2,372
    Sudsy
    Jan 18, 2004
  2. i5513
    Replies:
    2
    Views:
    2,405
    Axel Seinsche
    May 24, 2004
  3. Lalit Mehta

    Apache 2, Tomcat 5 and mod_jk

    Lalit Mehta, Sep 16, 2004, in forum: Java
    Replies:
    1
    Views:
    476
    code learner
    Dec 24, 2010
  4. Monica
    Replies:
    0
    Views:
    555
    Monica
    Oct 10, 2006
  5. Aaron
    Replies:
    0
    Views:
    1,282
    Aaron
    May 29, 2007
Loading...

Share This Page