Re: problem with tomcat 5.5 and apache AJP
A bit late, but we made progress in identifying the culprit. It seems that, for some reason, the password we used for AJP connection was the problem. Remove the password both side and everything works happily. We will try less complicated password, assuming that some special caracters were problematic (we stayed in US ASCII range however) Le 22/01/10 14:20, André Warnier a écrit : David Delbecq wrote: 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=1 #Not required if using ping_mode=A worker.jbossBoromir.connect_timeout=1 #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=1 #Not required if using ping_mode=A worker.tomcatBoromir.connect_timeout=1 #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=1 #Not required if using ping_mode=A worker.tomcatIlluin.connect_timeout=1 #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 Hi. (In the hope that solving this will help improve the weather in Belgium) About your main issue : in my own experience, whenever we get the kind of error messages which you indicate, they are right. It really means that the back-end Tomcat is for some reason not responding to Apache/mod_jk within a certain limit of time. That can be because it is really down, or because it is very busy doing something else (all threads are already processing requests, or the requested webapp is busy starting up, or something like that). Or, you may be having network connectivity problems (but that would normally not be the case if both Apache and Tomcat are on the same host). But maybe the confusion below about load balancing is the root cause of the problems. I don't know if I am understanding your quoted configuration correctly, but if I do, it puzzles me a bit. You seem to have 3 separate servlet engines : on localhost, you have a jBoss and a Tomcat and on illuin, you have a Tomcat. The jBoss on localhost has an AJP Connector listening on port 8009. The corresponding worker is named jbossBoromir. The Tomcat on localhost has an AJP Connector listening on port 8019. The corresponding worker is named tomcatBoromir. The Tomcat on illuin has an AJP Connector listening on port 8019. The corresponding worker is named tomcatIlluin. Then for each one, you have an additional load balancer worker. So each load balancer worker only balances a single Tomcat/jBoss. This seems a bit counter-intuitive. Why not have worker.list=jbossBoromir,tomcatBoromir,tomcatIlluin,status directly, and take the load balancer workers out of the equation, since they each balance only 1 back-end ? Or, if your idea is really to balance all requests between all 3 back-ends, then use one single load-balancer worker, but have it balance all 3 real workers. Like : worker.list=lb,status worker.lb.balance_workers=jbossBoromir,tomcatBoromir,tomcatIlluin The point is, in my understanding, a load balancer worker only makes sense if it balances at least 2 real workers (tomcat or jboss). Otherwise it seems pretty pointless. Or is it only in order to be able to use the status worker ? What do your JkMount lines at the Apache level look like ? That may allow us to figure out what you are trying to achieve. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- David Delbecq ICT Institut Royal Météorologique Ext:557 - To unsubscribe, e-mail:
problem with tomcat 5.5 and apache AJP
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=1 #Not required if using ping_mode=A worker.jbossBoromir.connect_timeout=1 #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=1 #Not required if using ping_mode=A worker.tomcatBoromir.connect_timeout=1 #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=1 #Not required if using ping_mode=A worker.tomcatIlluin.connect_timeout=1 #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
Re: problem with tomcat 5.5 and apache AJP
David Delbecq wrote: 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=1 #Not required if using ping_mode=A worker.jbossBoromir.connect_timeout=1 #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=1 #Not required if using ping_mode=A worker.tomcatBoromir.connect_timeout=1 #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=1 #Not required if using ping_mode=A worker.tomcatIlluin.connect_timeout=1 #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 Hi. (In the hope that solving this will help improve the weather in Belgium) About your main issue : in my own experience, whenever we get the kind of error messages which you indicate, they are right. It really means that the back-end Tomcat is for some reason not responding to Apache/mod_jk within a certain limit of time. That can be because it is really down, or because it is very busy doing something else (all threads are already processing requests, or the requested webapp is busy starting up, or something like that). Or, you may be having network connectivity problems (but that would normally not be the case if both Apache and Tomcat are on the same host). But maybe the confusion below about load balancing is the root cause of the problems. I don't know if I am understanding your quoted configuration correctly, but if I do, it puzzles me a bit. You seem to have 3 separate servlet engines : on localhost, you have a jBoss and a Tomcat and on illuin, you have a Tomcat. The jBoss on localhost has an AJP Connector listening on port 8009. The corresponding worker is named jbossBoromir. The Tomcat on localhost has an AJP Connector listening on port 8019. The corresponding worker is named tomcatBoromir. The Tomcat on illuin has an AJP Connector listening on port 8019. The corresponding worker is named tomcatIlluin. Then for each one, you have an additional load balancer worker. So each load balancer worker only balances a single Tomcat/jBoss. This seems a bit counter-intuitive. Why not have worker.list=jbossBoromir,tomcatBoromir,tomcatIlluin,status directly, and take the load balancer workers out of the equation, since they each balance only 1 back-end ? Or, if your idea is really to balance all requests between all 3 back-ends, then use one single load-balancer worker, but have it balance all 3 real workers. Like : worker.list=lb,status worker.lb.balance_workers=jbossBoromir,tomcatBoromir,tomcatIlluin The point is, in my understanding, a load balancer worker only makes sense if it balances at least 2 real workers (tomcat or jboss). Otherwise it seems pretty pointless. Or is it only in order to be able to use the status worker ? What do your JkMount lines at the Apache level look like ? That may allow us to figure out what you are trying to achieve. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org