Hello,

we are trying to get a working configuration of tomcat behind apache
httpd using AJP. This has worked well, for a while. But after some time,
the apache httpd server replies with one of those two message, it
changes randomly but we are unable to get the tomcat pages to show:

    Service Temporarily Unavailable, The server is temporarily unable to
    service your request due to maintenance downtime or capacity
    problems. Please try again later.

or

    Bad Gateway, The proxy server received an invalid response from an
    upstream server.


What we don't understand is that it pops up and out randomly without any
changes to configuration. Restarting apache httpd does not solve issue.
Restarting tomcat does not either. We have no clue as why it doesn't
work or why it worked in the past. Can someone telle what's wrong with
this configuration?
Server Version:         Apache/2.2.13 (Unix) mod_jk/1.2.28 PHP/5.3.1       
Server Time:    Fri, 22 Jan 2010 10:05:26 UTC
JK Version:     mod_jk/1.2.28


note jkstatus page says everything is ok :/

thank you.



The tomcat logs show this, which proves apache is connected to the right
tomcat instance:

INFO TP-Processor3 org.apache.jk.common.HandlerRequest - Secret: "MyPass"
WARN TP-Processor3 org.apache.jk.common.ChannelSocket - processCallbacks
status 2
INFO TP-Processor3 org.apache.jk.common.HandlerRequest - Secret: "MyPass"
WARN TP-Processor3 org.apache.jk.common.ChannelSocket - processCallbacks
status 2
INFO TP-Processor3 org.apache.jk.common.HandlerRequest - Secret: "MyPass"
WARN TP-Processor3 org.apache.jk.common.ChannelSocket - processCallbacks
status 2
INFO TP-Processor3 org.apache.jk.common.HandlerRequest - Secret: "MyPass"
WARN TP-Processor3 org.apache.jk.common.ChannelSocket - processCallbacks
status 2
INFO TP-Processor3 org.apache.jk.common.HandlerRequest - Secret: "MyPass"
WARN TP-Processor3 org.apache.jk.common.ChannelSocket - processCallbacks
status 2
INFO TP-Processor3 org.apache.jk.common.HandlerRequest - Secret: "MyPass"
WARN TP-Processor3 org.apache.jk.common.ChannelSocket - processCallbacks
status 2
INFO TP-Processor3 org.apache.jk.common.HandlerRequest - Secret: "MyPass"
WARN TP-Processor3 org.apache.jk.common.ChannelSocket - processCallbacks
status 2
INFO TP-Processor3 org.apache.jk.common.HandlerRequest - Secret: "MyPass"
WARN TP-Processor3 org.apache.jk.common.ChannelSocket - processCallbacks
status 2
INFO TP-Processor3 org.apache.jk.common.HandlerRequest - Secret: "MyPass"
WARN TP-Processor3 org.apache.jk.common.ChannelSocket - processCallbacks
status 2

our access logs (which is driven by a tomcat valve) show no connection
at all from any client, so it seems messages does not reach catalina.
Tomcat ajp is configured as follow:

 <Connector
        port="8019"
        protocol="AJP/1.3" request.secret="MyPass"
        protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"
        redirectPort="443">
    </Connector>


and apache is configured as follow:
worker.list=lbJboss,lbOld,lbTomcat,status


# Define jbossBoromir
# modify the host as your host IP or DNS name.
worker.jbossBoromir.port=8009
worker.jbossBoromir.host=localhost
worker.jbossBoromir.type=ajp13
worker.jbossBoromir.lbfactor=1
worker.jbossBoromir.prepost_timeout=10000 #Not required if using ping_mode=A
worker.jbossBoromir.connect_timeout=10000 #Not required if using ping_mode=A
worker.jbossBoromir.secret="MyPass"
#worker.tomcatBoromir.ping_mode=A #As of mod_jk 1.2.27
# worker.tomcatBoromir.connection_pool_size=10 (1)



worker.tomcatBoromir.port=8019
worker.tomcatBoromir.host=localhost
worker.tomcatBoromir.type=ajp13
worker.tomcatBoromir.lbfactor=1
worker.tomcatBoromir.prepost_timeout=10000 #Not required if using
ping_mode=A
worker.tomcatBoromir.connect_timeout=10000 #Not required if using
ping_mode=A
worker.tomcatBoromir.secret="MyPass"
#worker.tomcatBoromir.ping_mode=A #As of mod_jk 1.2.27
#worker.tomcatBoromir.connection_pool_size=10 (1)


worker.tomcatIlluin.port=8019
worker.tomcatIlluin.host=illuin
worker.tomcatIlluin.type=ajp13
worker.tomcatIlluin.lbfactor=1
worker.tomcatIlluin.prepost_timeout=10000 #Not required if using ping_mode=A
worker.tomcatIlluin.connect_timeout=10000 #Not required if using ping_mode=A
worker.tomcatIlluin.secret="MyPass"

# Load-balancing behaviour
worker.lbJboss.type=lb
worker.lbJboss.balance_workers=jbossBoromir


worker.lbTomcat.type=lb
worker.lbTomcat.balance_workers=tomcatBoromir


worker.lbOld.type=lb
worker.lbOld.balance_workers=tomcatIlluin

# Status worker for managing load balancer
worker.status.type=status

-- 
David Delbecq
ICT
Institut Royal Météorologique
Ext:557

Reply via email to