Uploading large files
I am looking for a general advice on uploading large files. I am currently thinking that we do it on our API and have clients chunk it in multiple pieces and send it to the server. I could try http chunk based transfer but only think I am unsure of is if on the server the entire content is going to be bufferred in memory.
Re: Tomcat war context path
Got it thanks! Will try that On Mon, Aug 15, 2011 at 12:54 PM, Mark Thomas wrote: > On 15/08/2011 20:39, Mohit Anchlia wrote: >> >> On Mon, Aug 15, 2011 at 12:17 PM, Pid wrote: >>> >>> On 15/08/2011 18:05, Mohit Anchlia wrote: >>>> >>>> Is this even possible with tomcat? >>> >>> In Tomcat 7.0: >>> >>> abc##SNAPSHOT-01.war >>> abc##SNAPSHOT-02.war >>> abc##SNAPSHOT-03.war >>> abc##SNAPSHOT-04.war >>> >>> etc >> >> Sorry I don't follow. > > Read Pid's e-mail again. Rename your WAR files as per his e-mail. > > Mark > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat war context path
On Mon, Aug 15, 2011 at 12:17 PM, Pid wrote: > On 15/08/2011 18:05, Mohit Anchlia wrote: >> Is this even possible with tomcat? > > In Tomcat 7.0: > > abc##SNAPSHOT-01.war > abc##SNAPSHOT-02.war > abc##SNAPSHOT-03.war > abc##SNAPSHOT-04.war > > etc Sorry I don't follow. What do I need to do change such that I can use http://localhost:8080/abc/ instead of http://localhost:8080/abc-snapshort-.xx ? Currently you need to use the war file name in the context since that's how it gets deployed in webapps. > > >> On Thu, Aug 11, 2011 at 12:32 PM, Mohit Anchlia >> wrote: >>> Currently when I deploy abc-SNAPSHOT-01.war I access is something like >>> http://localhost:8080/abc-SNAPSHOT-01.war >>> >>> How can I change the context root such that I can access it as >>> http://localhost:8080/abc? >>> >>> Problem is that abc-SNAPSHOT-01.war name could change with the build >>> version change. >>> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat war context path
Is this even possible with tomcat? On Thu, Aug 11, 2011 at 12:32 PM, Mohit Anchlia wrote: > Currently when I deploy abc-SNAPSHOT-01.war I access is something like > http://localhost:8080/abc-SNAPSHOT-01.war > > How can I change the context root such that I can access it as > http://localhost:8080/abc? > > Problem is that abc-SNAPSHOT-01.war name could change with the build > version change. > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat war context path
Currently when I deploy abc-SNAPSHOT-01.war I access is something like http://localhost:8080/abc-SNAPSHOT-01.war How can I change the context root such that I can access it as http://localhost:8080/abc? Problem is that abc-SNAPSHOT-01.war name could change with the build version change. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
getScheme
tomcat docs for connectors say: scheme: This sets the protocol name as accessed by the ServletRequest.getScheme method. The scheme defaults to http. Is there any other way scheme can be changed by using some Http Headers instead of doing it in connector? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Servlet Request URL
I think I resolved it. It looks like if I keep the "Host" header set to incoming request it works just fine. I am assuming Proxies do the same thing. And it also looks like HttpServletRequest.getRequestURL uses http header Host to get the host name. On Mon, Aug 8, 2011 at 10:50 PM, Mohit Anchlia wrote: > I need to intercept a request in the servlet and send the request > after some processing as a proxy. Currently when I do that it breaks > OAuth since customer uses REQUEST URL to sign the request and since > host part of the URL is changing it breaks that validation. Is there a > way I can keep the same host name as original and still be able to > send HTTP post request to another servlet? > > I tried RewriteRule but it doesn't work. Not sure what's going on > since I am not sure how to debug with tomcat. I tried ^/(.*) > http://localhost/$1 [PT] but for some reason it just gets lost. I am > in a fix since I can't use [R] or [P] because it causes 301 instead. > All I need to do is be able to keep the same host name so that when it > gets to the destination servlet from interceptor it passed OAuth. > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: URL rewrite
On Tue, Aug 9, 2011 at 1:30 AM, Pid wrote: > On 08/08/2011 20:36, Mohit Anchlia wrote: >> I need to re-write URL using some Http Headers. Can I use any headers? >> Or only the one listed here? >> >> http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html >> >> Is HTTP_HOST always set? I printed headers of my servlet and this is >> what I see. I used getHeaders and iterate over it: > > Is this a Tomcat or an HTTPD question? tomcat. As I understand tomcat support URL Rewriting similar to mod_rewrite. > > > p > > >> I need to use host as in below log. >> -- >> >> 12:33:11,114 INFO [STDOUT] INFO RequestResponse - headerName accept >> Value image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, >> application/xaml+xml, application/vnd.ms-xpsdocument, >> application/x-ms-xbap, application/x-ms-application, >> application/x-shockwave-flash, application/vnd.ms-excel, >> application/vnd.ms-powerpoint, application/msword, */* >> 12:33:11,114 INFO [STDOUT] INFO RequestResponse - headerName >> accept-language Value en-us >> 12:33:11,114 INFO [STDOUT] INFO RequestResponse - headerName >> accept-encoding Value gzip, deflate >> 12:33:11,114 INFO [STDOUT] INFO RequestResponse - headerName >> user-agent Value Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; >> SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; >> .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; >> MS-RTC LM 8; InfoPath.2) >> 12:33:11,114 INFO [STDOUT] INFO RequestResponse - headerName host >> Value sdgl04l3v4679.abc.net:8080 >> 12:33:11,114 INFO [STDOUT] INFO RequestResponse - headerName >> connection Value Keep-Alive >> 12:33:11,114 INFO [STDOUT] INFO RequestResponse - Method GET >> 12:33:11,114 INFO [STDOUT] INFO RequestResponse - Length of byte array null >> 12:33:11,567 INFO [STDOUT] DEBUG wire - >> "GET / HTTP/1.1[\r][\n]" >> 12:33:11,567 INFO [STDOUT] DEBUG wire - >> "connection: Keep-Alive[\r][\n]" >> 12:33:11,567 INFO [STDOUT] DEBUG wire - >> "host: >> sdgl04l3v4679.abc.net:8080[\r][\n]" >> 12:33:11,567 INFO [STDOUT] DEBUG wire - >> "accept-language: en-us[\r][\n]" >> 12:33:11,567 INFO [STDOUT] DEBUG wire - >> "accept: image/gif, >> image/x-xbitmap, image/jpeg, image/pjpeg, application/xaml+xml, >> application/vnd.ms-xpsdocument, application/x-ms-xbap, >> application/x-ms-application, application/x-shockwave-flash, >> application/vnd.ms-excel, application/vnd.ms-powerpoint, >> application/msword, */*[\r][\n]" >> 12:33:11,567 INFO [STDOUT] DEBUG wire - >> "user-agent: Mozilla/4.0 >> (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET >> CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR >> 3.0.4506.2152; .NET CLR 3.5.30729; MS-RTC LM 8; InfoPath.2)[\r][\n]" >> 12:33:11,567 INFO [STDOUT] DEBUG wire - >> "accept-encoding: gzip, >> deflate[\r][\n]" >> 12:33:11,567 INFO [STDOUT] DEBUG wire - >> "[\r][\n]" >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Servlet Request URL
I need to intercept a request in the servlet and send the request after some processing as a proxy. Currently when I do that it breaks OAuth since customer uses REQUEST URL to sign the request and since host part of the URL is changing it breaks that validation. Is there a way I can keep the same host name as original and still be able to send HTTP post request to another servlet? I tried RewriteRule but it doesn't work. Not sure what's going on since I am not sure how to debug with tomcat. I tried ^/(.*) http://localhost/$1 [PT] but for some reason it just gets lost. I am in a fix since I can't use [R] or [P] because it causes 301 instead. All I need to do is be able to keep the same host name so that when it gets to the destination servlet from interceptor it passed OAuth. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
URL rewrite
I need to re-write URL using some Http Headers. Can I use any headers? Or only the one listed here? http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html Is HTTP_HOST always set? I printed headers of my servlet and this is what I see. I used getHeaders and iterate over it: I need to use host as in below log. -- 12:33:11,114 INFO [STDOUT] INFO RequestResponse - headerName accept Value image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/xaml+xml, application/vnd.ms-xpsdocument, application/x-ms-xbap, application/x-ms-application, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* 12:33:11,114 INFO [STDOUT] INFO RequestResponse - headerName accept-language Value en-us 12:33:11,114 INFO [STDOUT] INFO RequestResponse - headerName accept-encoding Value gzip, deflate 12:33:11,114 INFO [STDOUT] INFO RequestResponse - headerName user-agent Value Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; MS-RTC LM 8; InfoPath.2) 12:33:11,114 INFO [STDOUT] INFO RequestResponse - headerName host Value sdgl04l3v4679.abc.net:8080 12:33:11,114 INFO [STDOUT] INFO RequestResponse - headerName connection Value Keep-Alive 12:33:11,114 INFO [STDOUT] INFO RequestResponse - Method GET 12:33:11,114 INFO [STDOUT] INFO RequestResponse - Length of byte array null 12:33:11,567 INFO [STDOUT] DEBUG wire - >> "GET / HTTP/1.1[\r][\n]" 12:33:11,567 INFO [STDOUT] DEBUG wire - >> "connection: Keep-Alive[\r][\n]" 12:33:11,567 INFO [STDOUT] DEBUG wire - >> "host: sdgl04l3v4679.abc.net:8080[\r][\n]" 12:33:11,567 INFO [STDOUT] DEBUG wire - >> "accept-language: en-us[\r][\n]" 12:33:11,567 INFO [STDOUT] DEBUG wire - >> "accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/xaml+xml, application/vnd.ms-xpsdocument, application/x-ms-xbap, application/x-ms-application, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*[\r][\n]" 12:33:11,567 INFO [STDOUT] DEBUG wire - >> "user-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; MS-RTC LM 8; InfoPath.2)[\r][\n]" 12:33:11,567 INFO [STDOUT] DEBUG wire - >> "accept-encoding: gzip, deflate[\r][\n]" 12:33:11,567 INFO [STDOUT] DEBUG wire - >> "[\r][\n]" - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Design Question
On Sat, Aug 6, 2011 at 6:10 PM, Christopher Schultz wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Mohit, > > On 8/5/2011 5:46 PM, Mohit Anchlia wrote: >> I also need to use mod_rewrite to direct request to new Servlet. Can >> I use rewrite to say abc.com/abc to abc.com/switch/abc? > > Of course. That's kind of what mod_rewrite was written to do... rewrite > URLs. > >> Mess :) Yes kind of but there is a risk involved since all the >> functionality is not moving to the new system. Yes requests split >> accross 2 systems and merge them back. > > Yuck. Good luck. I think this design is going to make it very difficult > to manage and maintain. If you can't migrate systems, can you migrate > APIs? If you use SOA, you can just re-implement one service and then > combine using any appropriate technology (e.g. XSLT) instead of having > to combine HTML from bits and pieces. > >> Asking my previous question, do you think Valve is better or >> Servlet? I like servlet better in this case. > > It depends upon the requirements. > > I would use a Filter over a Valve any day unless there is a real reason > to dig-into the Tomcat internal classes. > > If you want your code to be able to modify/wrap the request and deliver > it somewhere else, then use a Filter. If the code is really making all > the decisions and generating content (or, in fact, merging content from > other sources), then a Servlet is more appropriate IMO. thanks for your input. Is it ok to make Http Calls and wait for response inside of Valve or Filter? Are there any problems that might arise because of this? > > - -chris > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.10 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAk495hcACgkQ9CaO5/Lv0PC++ACcD0fI3jsxretus4qJzLBqxt// > D4kAmwfwYUbJi1DctW3iT4WqtxWFysbB > =kh5Q > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Design Question
On Fri, Aug 5, 2011 at 2:41 PM, Christopher Schultz wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Mohit, > > On 8/5/2011 5:05 PM, Mohit Anchlia wrote: >> On Fri, Aug 5, 2011 at 1:37 PM, Christopher Schultz >>> Uh, why not use an HTTP proxy instead of using HttpClient. Squid, >>> Apache httpd, countless LBs, and many others have this capability >>> without you having to re-write this type of logic. Those products >>> will be faster, more configurable, and less buggy than your own >>> hand-rolled code. >> >> I agree but the problem is that I need to perform some kind of merge >> of responses and validation checks on the response before returning >> to client. Also, need to route to appropriate host based on query >> string values. In essense we need control over it. It's not just the >> proxy. > > Gotcha. mod_rewrite might be able to help a lot, here, but probably not > with merging of responses, whatever that means. Do you have some > requests that need to be split across the two services and then > re-combined before returning a response? That sounds like a mess. > I also need to use mod_rewrite to direct request to new Servlet. Can I use rewrite to say abc.com/abc to abc.com/switch/abc? Mess :) Yes kind of but there is a risk involved since all the functionality is not moving to the new system. Yes requests split accross 2 systems and merge them back. Asking my previous question, do you think Valve is better or Servlet? I like servlet better in this case. Thanks >>> I think using Java for this is a mistake. >> >> why? > > I was thinking that using Tomcat would be a waste of time if an HTTP > proxy would meet your needs. Maybe they won't. > > - -chris > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.10 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAk48Y2wACgkQ9CaO5/Lv0PAuxQCglbtPGq5aeDZvtkT1xIQo7hc/ > THYAn3VtHvyfY02HFru9egtUwzoKKGCQ > =gmkY > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Design Question
On Fri, Aug 5, 2011 at 1:37 PM, Christopher Schultz wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Mohit, > > On 8/5/2011 1:59 PM, Mohit Anchlia wrote: >> This switch calls HttpClient Post calls using thread pools to send >> the request to other systems. > > Uh, why not use an HTTP proxy instead of using HttpClient. Squid, Apache > httpd, countless LBs, and many others have this capability without you > having to re-write this type of logic. Those products will be faster, > more configurable, and less buggy than your own hand-rolled code. I agree but the problem is that I need to perform some kind of merge of responses and validation checks on the response before returning to client. Also, need to route to appropriate host based on query string values. In essense we need control over it. It's not just the proxy. > >> One way is to put this code in Valve of existing system and invoke >> Http call if request is bound to the new system otherwise just call >> .invoke to the next in chain, is this the good way? I personally >> don't like it. > > I think using Java for this is a mistake. why? > > - -chris > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.10 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAk48VH8ACgkQ9CaO5/Lv0PAk9ACfbZx8zoKJ15URnlZmjV0LYeKB > L0kAn1wlOq33dV6DlXAmfYVgyKqFZ1/P > =bJzo > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Design Question
We are developing a new system that will run in parallel with old system. So some requests will go to new system and some old based on configuration. We will put software switch software which will read configuration and the request and decide which system this will go to. This switch calls HttpClient Post calls using thread pools to send the request to other systems. One way is to put this code in Valve of existing system and invoke Http call if request is bound to the new system otherwise just call .invoke to the next in chain, is this the good way? I personally don't like it. What I like is separate switch servlet that receives the call and make Http calls to both system. This switch code will also have live thread to refresh it's cache from config file. This I think is more consistent and manageable. But I am looking for some advise from others as well. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: web.xml parse error
Thanks! that worked. On Sun, Jun 26, 2011 at 3:50 AM, Konstantin Kolinko wrote: >> > servlet-class="com.i.common.DataPlatformServlet"/> > > The above is wrong. You should use nested elements, not attributes.. > > Take a look at any existing webapp. E.g. the "examples" one that comes > with Tomcat. > > Best regards, > Konstantin Kolinko > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
web.xml parse error
I am getting following errors and not able to find what's missing: http://java.sun.com/xml/ns/javaee"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"; version="3.0" metadata-complete="true"> -- Jun 25, 2011 11:08:35 PM org.apache.catalina.loader.WebappClassLoader validateJarFile INFO: validateJarFile(/root/tomcat/webapps/dataplatform/WEB-INF/lib/servlet-api-2.5-20081211.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class Jun 25, 2011 11:08:35 PM org.apache.catalina.loader.WebappClassLoader validateJarFile INFO: validateJarFile(/root/tomcat/webapps/dataplatform/WEB-INF/lib/servlet-api-2.5.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class Jun 25, 2011 11:08:35 PM org.apache.tomcat.util.digester.Digester endElement SEVERE: End event threw exception java.lang.IllegalArgumentException: Can't convert argument: null at org.apache.tomcat.util.IntrospectionUtils.convert(IntrospectionUtils.java:889) at org.apache.catalina.startup.CallMethodMultiRule.end(WebRuleSet.java:928) at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1057) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:601) at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:180) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1343) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2755) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522) . Jun 25, 2011 11:08:35 PM org.apache.catalina.startup.ContextConfig parseWebXml SEVERE: Parse error in application web.xml file at jndi:/localhost/dataplatform/WEB-INF/web.xml java.lang.IllegalArgumentException: Can't convert argument: null at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2687) at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2713) at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1060) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:601) at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:180) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1343) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2755) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.nex - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Bug Help
This seems to be mod_jk bug. I read in some other thread about this bug and look similar to what I am seeing. But what I am really looking for is to see if I have correct settings. We are using mod_jk 1.2.21 and apache 2 On Wed, Mar 30, 2011 at 1:46 PM, Dave Fisher wrote: > Is this an Apache Tomcat problem, or a JBoss problem? If it is a Tomcat > version, is it from a repackager or an official http://tomcat.apache.org/? > > In a new email thread with a descriptive subject provide the Apache HTTPD, > mod_jk, Apache Tomcat, JDK and Operating System versions. > > Then you will likely be asked for logs on both your HTTPD, mod_jk and tomcat > sides. > > I think if you did that, you might get some help. > > On Mar 30, 2011, at 12:16 PM, Mohit Anchlia wrote: > >> Can someone please give some pointers? Connector document says that >> "connection_pool_timeout" should be same as "ConnectionTimeout" and I >> think setting these will help but not sure. >> >> Do I need to add connection_pool_timeout? server.xml doesn't have >> ConnectionTimeout set either so does it mean it will wait forever? >> Just trying to see what additional settings I need to put in place. >> >> On Tue, Mar 29, 2011 at 6:16 PM, Mohit Anchlia >> wrote: >>> In order to circimvent this bug >>> https://issues.jboss.org/browse/JBPAPP-366 what should I exactly have >>> in apache 2 properties. >>> >>> We often see "cping/cpong after connecting to the backend server >>> failed (errno=110)" and bunch of 503s >>> >>> Current worker.properties look something like this: >>> >>> worker.app1.type=ajp13 >>> worker.app1.port=8009 >>> worker.app1.host=app1.data.ie.intuit.net >>> worker.app1.socket_keepalive=true >>> worker.app1.prepost_timeout=5000 >>> worker.app1.connect_timeout=5000 >>> worker.app1.retries=1 >>> worker.app1.socket_connect_timeout=1000 >>> worker.app1.ping_mode=A >>> worker.app1.ping_timeout=5000 >>> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Bug Help
Can someone please give some pointers? Connector document says that "connection_pool_timeout" should be same as "ConnectionTimeout" and I think setting these will help but not sure. Do I need to add connection_pool_timeout? server.xml doesn't have ConnectionTimeout set either so does it mean it will wait forever? Just trying to see what additional settings I need to put in place. On Tue, Mar 29, 2011 at 6:16 PM, Mohit Anchlia wrote: > In order to circimvent this bug > https://issues.jboss.org/browse/JBPAPP-366 what should I exactly have > in apache 2 properties. > > We often see "cping/cpong after connecting to the backend server > failed (errno=110)" and bunch of 503s > > Current worker.properties look something like this: > > worker.app1.type=ajp13 > worker.app1.port=8009 > worker.app1.host=app1.data.ie.intuit.net > worker.app1.socket_keepalive=true > worker.app1.prepost_timeout=5000 > worker.app1.connect_timeout=5000 > worker.app1.retries=1 > worker.app1.socket_connect_timeout=1000 > worker.app1.ping_mode=A > worker.app1.ping_timeout=5000 > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Bug Help
Can someone please help? On Tue, Mar 29, 2011 at 6:16 PM, Mohit Anchlia wrote: > In order to circimvent this bug > https://issues.jboss.org/browse/JBPAPP-366 what should I exactly have > in apache 2 properties. > > We often see "cping/cpong after connecting to the backend server > failed (errno=110)" and bunch of 503s > > Current worker.properties look something like this: > > worker.app1.type=ajp13 > worker.app1.port=8009 > worker.app1.host=app1.data.ie.intuit.net > worker.app1.socket_keepalive=true > worker.app1.prepost_timeout=5000 > worker.app1.connect_timeout=5000 > worker.app1.retries=1 > worker.app1.socket_connect_timeout=1000 > worker.app1.ping_mode=A > worker.app1.ping_timeout=5000 > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Bug Help
In order to circimvent this bug https://issues.jboss.org/browse/JBPAPP-366 what should I exactly have in apache 2 properties. We often see "cping/cpong after connecting to the backend server failed (errno=110)" and bunch of 503s Current worker.properties look something like this: worker.app1.type=ajp13 worker.app1.port=8009 worker.app1.host=app1.data.ie.intuit.net worker.app1.socket_keepalive=true worker.app1.prepost_timeout=5000 worker.app1.connect_timeout=5000 worker.app1.retries=1 worker.app1.socket_connect_timeout=1000 worker.app1.ping_mode=A worker.app1.ping_timeout=5000 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Simple Question about reading http transmission using mod_jk
On Fri, Jan 7, 2011 at 7:22 AM, Christopher Schultz wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Chuck, > > On 1/6/2011 6:01 PM, Caldarale, Charles R wrote: >>> From: Mohit Anchlia [mailto:mohitanch...@gmail.com] >>> Subject: Simple Question about reading http transmission using mod_jk >> >>> does it just sends the handle to the stream and then tomcat >>> reads from it. It's little confusing. >> >> Think about it: the connection between httpd and Tomcat is a comm >> link; how could httpd give Tomcat a handle when Tomcat may well be >> running on a completely different system? > > There's a legitimate questions hidden in this one: does mod_jk work on a > streaming model or a buffering model? > > To answer /that/ question, one need only read > http://tomcat.apache.org/connectors-doc/ajp/ajpv13a.html in the section > "overview of the protocol" (hint to the OP). > I read through it and based on how I interpret that section is that it buffers some data and streams the remaining data if it wasn't completely transferred to server and server asks for it (GET_BODY). Am I reading it correctly? I know you will correct me :) > If the client (mod_jk) and the server (Tomcat) are on the same machine > (localhost), then any respectable TCP/IP stack significantly optimizes > such communication by playing wonderful shared memory tricks that > increase performance significantly. > > - -chris > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.10 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAk0nL7wACgkQ9CaO5/Lv0PDy6gCgiKGPKiQnI/ytBQV0WY1ucvlM > ngQAn1AkD4MIwVfIfwlBoZhE/wv4XG0p > =TTvI > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Simple Question about reading http transmission using mod_jk
We are using mod_jk. My question is when apache receives a request with http payload does it first read the entire payload and then transfers it to tomcat or does it just sends the handle to the stream and then tomcat reads from it. It's little confusing. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
mod-jk not called after PerlHandler gets called
I posted this thread in mod_perl group: http://www.gossamer-threads.com/lists/modperl/modperl/102273 I thought I should ask here as well. I have a perl handler in VirtualHost: JkMount /bridge/* tc PerlModule Apache2::Rules2 SetHandler modperl PerlInitHandler Apache2::Rules2 PerlSendHeader On This Handler just returns DECLINED. After this handler is called the apache web server tries to find the document on the web server instead of forwarding it to "JkMount ..." nod-jk worker. I get "404" and in the access logs of apache I see that it's trying to locate the document on the same server instead of using JkMount to forward the request to mod-jk. How can I make this work? There is nothing online on this topic. Rules2.pm package Apache2::Rules2; #use lib '/home/.mohit/mod_perl-2.0.4/lib'; use strict; use warnings; use Apache2::Const qw(:common); use Apache2::RequestRec (); use Apache2::RequestIO (); sub handler { my $r = shift; #$r->content_type('text/plain'); #$r->print("mod_perl rules!\n"); return DECLINED; # We must return a status to mod_perl } 1; # This is a perl module so we must return true to perl ~ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Logging hostname/virutal name in the log
Currently we use proxy and x-forwarded. Proxy uses snat so when it gets logged we see something like: 10.128.1.5 65.204.229.11 - - [14/Oct/2010:22:29:49 -0700] POST /adi.cgi HTTP/1.1 200 753 10.128.1.5 is proxy's ip 65.204.229.11 is browser client ip I also need the name of the hostname or virtual name. For eg: http://abc.com/adi.cgi. So is it possible to also log abc.com? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Custom message instead of HTTP error on LimitRequestBody
Sorry wrong email group On Wed, Sep 8, 2010 at 1:37 PM, Mohit Anchlia wrote: > Apache 2: > > Is there a way to send custom message instead of just the Error Code > when there is an upload limit set using LimitRequestBody? > > Something like "You have exceeded the size" > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Custom message instead of HTTP error on LimitRequestBody
Apache 2: Is there a way to send custom message instead of just the Error Code when there is an upload limit set using LimitRequestBody? Something like "You have exceeded the size" - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: URL rewrite
On Thu, Sep 2, 2010 at 9:35 AM, michel wrote: > > - Original Message - From: "Mohit Anchlia" > To: "Tomcat Users List" > Sent: Thursday, September 02, 2010 12:25 PM > Subject: Re: URL rewrite > > >> On Wed, Sep 1, 2010 at 6:21 PM, Hassan Schroeder >> wrote: >>>> >>>> Is there a way to change the URL for eg: >>>> >>>> http://abc.com/a >>>> to >>>> http://abc.com/b/a >>> >>> http://lmgtfy.com/?q=tomcat+url+rewrite >>> >> Is URL rewrite module inbuilt or is there something that need to get >> loaded > > > > > > http://code.google.com/p/urlrewritefilter/ > Looks like it needs a servlet for tomcat. Is there something like mod_rewrite where any request coming in tomcat and without having to have servlet can be changed? > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: URL rewrite
On Wed, Sep 1, 2010 at 7:04 PM, Christopher Schultz wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Mohit, > > On 9/1/2010 9:10 PM, Mohit Anchlia wrote: >> Tomcat 6: >> >> Is there a way to change the URL for eg: >> >> http://abc.com/a >> >> to >> >> http://abc.com/b/a > > Sure: > > CTRL-L, END, LEFT, 'b', then '/' > > Voile! Thanks have you used this before :) I was looking for some module in tomcat that will do it for me. I am looking at URL rewrite now. > > - -chris > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.10 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAkx/BjUACgkQ9CaO5/Lv0PAy1ACgrn27f5l0EmVV+ogHJcRPfOfn > hbwAnAunqGVIFcuxJudmMZaaWpCfDfbK > =NpF0 > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: URL rewrite
On Wed, Sep 1, 2010 at 6:21 PM, Hassan Schroeder wrote: >> Is there a way to change the URL for eg: >> >> http://abc.com/a >> to >> http://abc.com/b/a > > http://lmgtfy.com/?q=tomcat+url+rewrite > Is URL rewrite module inbuilt or is there something that need to get loaded > -- > Hassan Schroeder hassan.schroe...@gmail.com > twitter: @hassan > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
URL rewrite
Tomcat 6: Is there a way to change the URL for eg: http://abc.com/a to http://abc.com/b/a - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: fail_on_status question
On Sun, Jun 6, 2010 at 6:40 AM, Rainer Jung wrote: > On 06.06.2010 03:52, Mohit Anchlia wrote: >> >> On Sat, Jun 5, 2010 at 2:02 AM, Rainer Jung >> wrote: >>> >>> On 04.06.2010 01:30, Mohit Anchlia wrote: >>>> >>>> In our present environment we have a WS and APP server. When request >>>> comes in, WS sends it to APP server using mod_jk and then APP server >>>> inserts it into JMS queue. So essentially APP server is also dependent >>>> on JMS server which runs on the same box. >>>> >>>> My question is can I use fail_on_status in worker.properties to take >>>> one of the APP servers out of service from mod_jk(WS) by returning >>>> some Http error code as a response to a request when JMS server is >>>> down and a request comes in? Since cping and cpong will still return >>>> success would this mechanism of fail_on_status work? >>> >>> fail_on_status will trigger nevertheless. Otherwise it would be useless. >> >> I didn't get this piece that fail_on_status will trigger nevertheless? >> My understanding is that cping and cpong decide if to keep a worker in >> error state or not. But http response code will be returned only when >> http request comes in. To cping and cpong server is still up. So even >> if app server return status same as configured for fail_on_status >> cping and cpong will still not bring the worker in error state. > > cping and cpong themselves don't bring the worker in error state. There are > several mechanism involved to detect feilure and each of those mechanisms > can bring worker into error state by itself. Once the worker is in error > state, it will not be used for 60 seconds and then retried with the next > request eligible for it. If that requests triggers some error condition > again, the worker will stay in error state, otherwise it will be back to > normal. > > So if cping/cpong succeed, and later during processing of the same request > an error occurs, like e.g. triggered by fail_on_status or reply_timeout or > whatever else is configured, the worker will be put into error state. > > If you still doubt it: try it! Writing a simple servlet or JSP returning > some error status is easy and you can see what's happening. Thanks. I'll try it > > Regards, > > Rainer > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: fail_on_status question
On Sat, Jun 5, 2010 at 2:02 AM, Rainer Jung wrote: > On 04.06.2010 01:30, Mohit Anchlia wrote: >> >> In our present environment we have a WS and APP server. When request >> comes in, WS sends it to APP server using mod_jk and then APP server >> inserts it into JMS queue. So essentially APP server is also dependent >> on JMS server which runs on the same box. >> >> My question is can I use fail_on_status in worker.properties to take >> one of the APP servers out of service from mod_jk(WS) by returning >> some Http error code as a response to a request when JMS server is >> down and a request comes in? Since cping and cpong will still return >> success would this mechanism of fail_on_status work? > > fail_on_status will trigger nevertheless. Otherwise it would be useless. I didn't get this piece that fail_on_status will trigger nevertheless? My understanding is that cping and cpong decide if to keep a worker in error state or not. But http response code will be returned only when http request comes in. To cping and cpong server is still up. So even if app server return status same as configured for fail_on_status cping and cpong will still not bring the worker in error state. > >> Are there any other suggestions? > > Do a little scripting, monitor your Appserver and JMS and use the jk-status > interface to properly disable or stop the appropriate load balancer member. > > Rainer > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: fail_on_status question
On Thu, Jun 3, 2010 at 4:30 PM, Mohit Anchlia wrote: > In our present environment we have a WS and APP server. When request > comes in, WS sends it to APP server using mod_jk and then APP server > inserts it into JMS queue. So essentially APP server is also dependent > on JMS server which runs on the same box. > > My question is can I use fail_on_status in worker.properties to take > one of the APP servers out of service from mod_jk(WS) by returning > some Http error code as a response to a request when JMS server is > down and a request comes in? Since cping and cpong will still return > success would this mechanism of fail_on_status work? > > Are there any other suggestions? > I would appreciate if somone gave their suggestion on my post above. I am going to try fail_on_status with -503 kind of setting and see if request is load balanced to a different server. I am assuming mod_jk will not be able to put worker in error state if that worker returned error code specified in fail_on_status because cping and cpong will continue to see tomcat up and running. Is this assumption correct? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
fail_on_status question
In our present environment we have a WS and APP server. When request comes in, WS sends it to APP server using mod_jk and then APP server inserts it into JMS queue. So essentially APP server is also dependent on JMS server which runs on the same box. My question is can I use fail_on_status in worker.properties to take one of the APP servers out of service from mod_jk(WS) by returning some Http error code as a response to a request when JMS server is down and a request comes in? Since cping and cpong will still return success would this mechanism of fail_on_status work? Are there any other suggestions? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk behaviour during failure
On Sat, Apr 3, 2010 at 9:44 AM, Rainer Jung wrote: > On 31.03.2010 23:33, Mohit Anchlia wrote: >> >> On Wed, Mar 31, 2010 at 2:27 PM, Rainer Jung >> wrote: >>> >>> Which version? >>> >>> If 1.2.28 or newer, look for error_escalation_time in >> >> Actually I am on 1.2.27 so can't use error escalation time. Is there >> any other way I can do it? I am seeing real odd behaviour with mod_jk. > > No, there was a change in 1.2.27: > > LB: Do not put loadbalancer node in error state if there is opened channel. > This fixes the bug when new connection fails due to busyness, causing opened > connections fail stickyness. This brings back per-node busy counter and > private state array for each request. We can mark the state as error for > failover to work while still operating and reporting node as OK if there are > opened working connections. Thanks! this is what I am not understanding that when box is down there are no open connections to that box, because box is down. So why will that worker not go in ERR state. And err 111 and 115 clearly indicate that. Other question is, as soon as box comes backup it goes in ERR state as long as httpd2 is down. So it seems odd that in first case where it really should put worker in ERR state, it doesn't do that. > > That change motivated the addition of error_escalation_time in order to be > able to stick with the previous behaviour. You will have to update to 1.2.28 > or beyond. > > Regards, > > Rainer > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk behaviour during failure
On Thu, Apr 1, 2010 at 11:43 AM, Christopher Schultz wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Mohit, > > On 4/1/2010 11:35 AM, Mohit Anchlia wrote: >> I tested that leaving server down and in 15mt test the worker never >> went to ERR state while the node was down. >> >> Could someone please advise? > > You'll have to wait for MLaden or Rainer to comment. Could Rainer or MLaden advise? > >> I have couple more questions: >> >> - What's the default behaviour of recovery_option when not specified? >> Currently it's specified as 7 but if I don't specify in conf then what >> will happen? > > The default is printed in the documentation: > > http://tomcat.apache.org/connectors-doc/reference/workers.html > Sorry but I don't see the option listed for default behaviour when recovery_option is not specified. I do know that I set to 7 so that I get the benefit of bit 1, 2 and 4. >> - What's the advantage of setting connection_min_size to 0? > > If you mean connection_pool_minsize, then I don't know why you'd bother > doing this. Has someone suggested that connection_pool_minsize=0 is > somehow advantageous? > > - -chris > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.10 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAku06WQACgkQ9CaO5/Lv0PCUbACgp2pIaIFK2H5nkAFfK8dJCRCD > ApkAmgJ2P8TTLDWBar46eRA5s8YXQSGy > =mC6n > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk behaviour during failure
On Wed, Mar 31, 2010 at 3:35 PM, Mohit Anchlia wrote: > On Wed, Mar 31, 2010 at 3:29 PM, Christopher Schultz > wrote: >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> Mohit, >> >> On 3/31/2010 5:33 PM, Mohit Anchlia wrote: >>> On Wed, Mar 31, 2010 at 2:27 PM, Rainer Jung >>> wrote: >>>> Which version? >>>> >>>> If 1.2.28 or newer, look for error_escalation_time in >>> >>> Actually I am on 1.2.27 so can't use error escalation time. Is there >>> any other way I can do it? I am seeing real odd behaviour with mod_jk. >>> It does change to ERR but only when box is pingable. Can't seem to >>> find any other way of configuring it such that the failed worker is >>> considered as global error. >> >> What happens if the backend server never comes back up? Try bringing it >> down and waiting. How long does it take for mod_jk to put that worker >> into ERR state? Or, are you actually required to bring-up the backend >> server in order to achieve the ERR state? > > I tested that leaving server down and in 15mt test the worker never > went to ERR state while the node was down. Could someone please advise? I have couple more questions: - What's the default behaviour of recovery_option when not specified? Currently it's specified as 7 but if I don't specify in conf then what will happen? - What's the advantage of setting connection_min_size to 0? > >> >> - -chris >> -BEGIN PGP SIGNATURE- >> Version: GnuPG v1.4.10 (MingW32) >> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ >> >> iEYEARECAAYFAkuzzNEACgkQ9CaO5/Lv0PBOEgCgw6/ENt2t36dnG+9nRwNA7tCj >> H1QAoMOOt0MDkjPSZr0gjQEZ/TRpQos/ >> =+qy3 >> -END PGP SIGNATURE- >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk behaviour during failure
On Wed, Mar 31, 2010 at 3:29 PM, Christopher Schultz wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Mohit, > > On 3/31/2010 5:33 PM, Mohit Anchlia wrote: >> On Wed, Mar 31, 2010 at 2:27 PM, Rainer Jung wrote: >>> Which version? >>> >>> If 1.2.28 or newer, look for error_escalation_time in >> >> Actually I am on 1.2.27 so can't use error escalation time. Is there >> any other way I can do it? I am seeing real odd behaviour with mod_jk. >> It does change to ERR but only when box is pingable. Can't seem to >> find any other way of configuring it such that the failed worker is >> considered as global error. > > What happens if the backend server never comes back up? Try bringing it > down and waiting. How long does it take for mod_jk to put that worker > into ERR state? Or, are you actually required to bring-up the backend > server in order to achieve the ERR state? I tested that leaving server down and in 15mt test the worker never went to ERR state while the node was down. > > - -chris > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.10 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAkuzzNEACgkQ9CaO5/Lv0PBOEgCgw6/ENt2t36dnG+9nRwNA7tCj > H1QAoMOOt0MDkjPSZr0gjQEZ/TRpQos/ > =+qy3 > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk behaviour during failure
On Wed, Mar 31, 2010 at 2:27 PM, Rainer Jung wrote: > Which version? > > If 1.2.28 or newer, look for error_escalation_time in Actually I am on 1.2.27 so can't use error escalation time. Is there any other way I can do it? I am seeing real odd behaviour with mod_jk. It does change to ERR but only when box is pingable. Can't seem to find any other way of configuring it such that the failed worker is considered as global error. > > http://tomcat.apache.org/connectors-doc/reference/workers.html > > Read the description and try setting it to "0". > > Regards, > > Rainer > > On 31.03.2010 23:09, Mohit Anchlia wrote: >> >> I am seeing weird behaviour here. >> >> What I am seeing is that when server is not pingable (when I reboot >> or shutdown) anymore mod_jk keeps logging errors 111 (connection >> refused) and errors 115 continuously and during this timeperiod if I >> look at "JkStatus" the State of the corresponding worker is still "OK" >> (which is incorrect in this case since server is not pingable). During >> this time period response times are still around 2-4 secs as compared >> to 300 ms. When everything is good our requests take 300 ms. >> >> Now once the server comes up (pingable) the state of the worker is >> "ERR" and at this point everything returns back to normal. So it looks >> like until server is pingable mod_jk doesn't put that worker in "ERR" >> state. So my question is what can I do in worker.properties such that >> worker goes in ERR state automatically when server or the machine >> completely goes down? It's kind of odd that mod_jk doesn't put the >> worker in ERR state when the box that worker is tied to is not >> pingable? >> >> --- >> >> worker.tc.type=lb >> worker.tc.balance_workers=host1,host2,host3,host4,host5,host6 >> worker.tc.sticky_session=true >> >> worker.host1.type=ajp13 >> worker.host1.port=8009 >> worker.host1.host=host >> worker.host1.socket_keepalive=true >> worker.host1.prepost_timeout=5000 >> worker.host1.connect_timeout=5000 >> worker.host1.retries=1 >> worker.host1.socket_connect_timeout=1000 >> worker.host1.connection_pool_minsize=0 >> worker.host1.connection_pool_timeout=20 >> worker.host1.recovery_options=7 >> worker.host1.ping_mode=A >> worker.host1.ping_timeout=5000 >> >> ... >> >> [Wed Mar 31 13:39:15.517 2010] [19700:4143184544] [info] >> ajp_connect_to_endpoint::jk_ajp_common.c (922): Failed opening socket >> to (10.10.81.153:8009) (errno=115) >> [Wed Mar 31 13:39:15.517 2010] [19700:4143184544] [error] >> ajp_send_request::jk_ajp_common.c (1467): (host5) connecting to >> backend failed. Tomcat is probably not started or is listening on the >> wrong port (errno=115) >> [Wed Mar 31 13:39:15.517 2010] [19700:4143184544] [info] >> ajp_service::jk_ajp_common.c (2407): (host5) sending request to tomcat >> failed (recoverable), because of error during request sending >> (attempt=1) >> [Wed Mar 31 13:39:15.517 2010] [19700:4143184544] [error] >> ajp_service::jk_ajp_common.c (2426): (host5) connecting to tomcat >> failed. >> [Wed Mar 31 13:39:15.517 2010] [19700:4143184544] [debug] >> ajp_reset_endpoint::jk_ajp_common.c (743): (host5) resetting endpoint >> with sd = 4294967295 (socket shutdown) >> [Wed Mar 31 13:39:15.517 2010] [19700:4143184544] [debug] >> ajp_done::jk_ajp_common.c (2850): recycling connection pool slot=0 for >> worker host5 >> [Wed Mar 31 13:39:15.517 2010] [19700:4143184544] [info] >> service::jk_lb_worker.c (1347): service failed, worker host5 is in >> local error state >> [Wed Mar 31 13:39:15.517 2010] [19700:4143184544] [debug] >> service::jk_lb_worker.c (1358): recoverable error... will try to >> recover on other worker >> [Wed Mar 31 13:39:15.517 2010] [19700:4143184544] [debug] >> get_most_suitable_worker::jk_lb_worker.c (969): found best worker >> host6 (host6) using method 'Request' > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
mod_jk behaviour during failure
I am seeing weird behaviour here. What I am seeing is that when server is not pingable (when I reboot or shutdown) anymore mod_jk keeps logging errors 111 (connection refused) and errors 115 continuously and during this timeperiod if I look at "JkStatus" the State of the corresponding worker is still "OK" (which is incorrect in this case since server is not pingable). During this time period response times are still around 2-4 secs as compared to 300 ms. When everything is good our requests take 300 ms. Now once the server comes up (pingable) the state of the worker is "ERR" and at this point everything returns back to normal. So it looks like until server is pingable mod_jk doesn't put that worker in "ERR" state. So my question is what can I do in worker.properties such that worker goes in ERR state automatically when server or the machine completely goes down? It's kind of odd that mod_jk doesn't put the worker in ERR state when the box that worker is tied to is not pingable? --- worker.tc.type=lb worker.tc.balance_workers=host1,host2,host3,host4,host5,host6 worker.tc.sticky_session=true worker.host1.type=ajp13 worker.host1.port=8009 worker.host1.host=host worker.host1.socket_keepalive=true worker.host1.prepost_timeout=5000 worker.host1.connect_timeout=5000 worker.host1.retries=1 worker.host1.socket_connect_timeout=1000 worker.host1.connection_pool_minsize=0 worker.host1.connection_pool_timeout=20 worker.host1.recovery_options=7 worker.host1.ping_mode=A worker.host1.ping_timeout=5000 ... [Wed Mar 31 13:39:15.517 2010] [19700:4143184544] [info] ajp_connect_to_endpoint::jk_ajp_common.c (922): Failed opening socket to (10.10.81.153:8009) (errno=115) [Wed Mar 31 13:39:15.517 2010] [19700:4143184544] [error] ajp_send_request::jk_ajp_common.c (1467): (host5) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=115) [Wed Mar 31 13:39:15.517 2010] [19700:4143184544] [info] ajp_service::jk_ajp_common.c (2407): (host5) sending request to tomcat failed (recoverable), because of error during request sending (attempt=1) [Wed Mar 31 13:39:15.517 2010] [19700:4143184544] [error] ajp_service::jk_ajp_common.c (2426): (host5) connecting to tomcat failed. [Wed Mar 31 13:39:15.517 2010] [19700:4143184544] [debug] ajp_reset_endpoint::jk_ajp_common.c (743): (host5) resetting endpoint with sd = 4294967295 (socket shutdown) [Wed Mar 31 13:39:15.517 2010] [19700:4143184544] [debug] ajp_done::jk_ajp_common.c (2850): recycling connection pool slot=0 for worker host5 [Wed Mar 31 13:39:15.517 2010] [19700:4143184544] [info] service::jk_lb_worker.c (1347): service failed, worker host5 is in local error state [Wed Mar 31 13:39:15.517 2010] [19700:4143184544] [debug] service::jk_lb_worker.c (1358): recoverable error... will try to recover on other worker [Wed Mar 31 13:39:15.517 2010] [19700:4143184544] [debug] get_most_suitable_worker::jk_lb_worker.c (969): found best worker host6 (host6) using method 'Request' - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Http 505
Is this going to log just too much? This is a production system so want to be careful. Is there any other way to enable it in valve or some other way that just gives the error logging? On Thu, Feb 11, 2010 at 8:21 AM, Mark Thomas wrote: > On 11/02/2010 16:05, Mohit Anchlia wrote: >> As expected I got Bad request. But my question is there a error log >> where everything that server responded to in logged. This Bad request >> wasn't logged in access valve. How can I get all the error codes? > > Turn on debug logging for the org.apache.coyote.http11.Http11Processor > class (assuming you are using the default BIO connector) > > Mark > > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Http 505
On Thu, Feb 11, 2010 at 7:56 AM, Mark Thomas wrote: > On 11/02/2010 15:50, Hassan Schroeder wrote: >> On Thu, Feb 11, 2010 at 7:45 AM, Mohit Anchlia >> wrote: >> >>> [r...@e1 ~]# telnet ws1 8080 >>> Trying 10.10.50.55... >>> Connected to ws1 (10.10.50.55). >>> Escape character is '^]'. >>> GET / HTTP1.1 >> >>> I had to hit enter twice to get the result. Does it sound ok? If yes, >>> then I am not sure why 1.1 be a incorrect version. >> >> Because your request is malformed -- it should be GET / HTTP/1.1 > > You're right I missed that. Fix that and then you'll get a 400 response > as you haven't specified a host. > I was just following Chris's reply where he was able to get response in the same way I was trying to do. Unless I missed something. As expected I got Bad request. But my question is there a error log where everything that server responded to in logged. This Bad request wasn't logged in access valve. How can I get all the error codes? [r...@be1 ~]# telnet ws1.5080 Trying 10.10.50.55... Connected to ws1.ptctax.intuit.com (10.10.50.55). Escape character is '^]'. GET / HTTP/1.1 HTTP/1.1 400 Bad Request Server: Apache-Coyote/1.1 Transfer-Encoding: chunked Date: Thu, 11 Feb 2010 16:02:11 GMT Connection: close Thanks everyone for your help > Mark > > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Http 505
On Thu, Feb 11, 2010 at 6:41 AM, Christopher Schultz wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Mohit, > > On 2/11/2010 1:41 AM, Mohit Anchlia wrote: >> On Wed, Feb 10, 2010 at 2:44 PM, Christopher Schultz >> wrote: >> Mohit, >> >> On 2/10/2010 5:28 PM, Mohit Anchlia wrote: >>>>> There is a proxy F5 in between. But this server sends 100s of request >>>>> per sec. to the same URL. Essentially it's the same code. Only few of >>>>> them fail. This application is non browser based application. >> >> I think you'll need to instrument either these clients or your webapp to >> write more detailed logs in order to diagnose this. >> >>> Is there a way I can try and reproduce. What bothers me is that I >>> don't see it in our logs. I was wondering if I can write a small code >>> to validate that. Do I just need to add HTTP 6.0 in the header or >>> something like that? Or can I do it from the browser? > > You'll probably have to do this with your own custom client... I don't > know of any browsers that let you play with the HTTP stream enough to > change the protocol. > > Fortunately, the HTTP protocol is pretty easy to fake: you can even use > telnet: > > $ telnet localhost 80 > Trying 127.0.0.1... > Connected to localhost.localdomain. > Escape character is '^]'. > GET / HTTP1.1 > > HTTP/1.1 200 OK > Date: Thu, 11 Feb 2010 14:39:40 GMT > Server: Apache/2.2.9 (Debian) mod_jk/1.2.28 mod_ssl/2.2.9 OpenSSL/0.9.8g > Last-Modified: Sat, 18 Jul 2009 01:21:07 GMT > ETag: "6ab4010-2d-46ef0b81da6c0" > Accept-Ranges: bytes > Content-Length: 45 > Vary: Accept-Encoding > Connection: close > Content-Type: text/html > > It works! > Connection closed by foreign host. Thanks that helps. I tried the same thing and surprisingly I see Http 505 on telnet but not in the logs. I am going directly to the tomcat bypassing BigIP [r...@e1 ~]# telnet ws1 8080 Trying 10.10.50.55... Connected to ws1 (10.10.50.55). Escape character is '^]'. GET / HTTP1.1 HTTP/1.1 505 HTTP Version Not Supported Server: Apache-Coyote/1.1 Date: Thu, 11 Feb 2010 15:42:24 GMT Connection: close Connection closed by foreign host. I had to hit enter twice to get the result. Does it sound ok? If yes, then I am not sure why 1.1 be a incorrect version. > > I tried using "HTTP6.0" and Apache httpd gladly responded in the same > way. Tomcat does the same, apparently, which I hadn't expected. > > I wonder if your BigIP has been configured to advertise "Coyote" as the > server. You might want to check the logs on the BigIP. > > - -chris > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.10 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAkt0Fy8ACgkQ9CaO5/Lv0PAxjACfTlvOzisSjEcFDIk+k8yZjDvA > risAoLcu+bgnCqq3WQkE8mHylnwZ0bV0 > =BvkX > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Http 505
On Wed, Feb 10, 2010 at 2:44 PM, Christopher Schultz wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Mohit, > > On 2/10/2010 5:28 PM, Mohit Anchlia wrote: >> There is a proxy F5 in between. But this server sends 100s of request >> per sec. to the same URL. Essentially it's the same code. Only few of >> them fail. This application is non browser based application. > > I think you'll need to instrument either these clients or your webapp to > write more detailed logs in order to diagnose this. Is there a way I can try and reproduce. What bothers me is that I don't see it in our logs. I was wondering if I can write a small code to validate that. Do I just need to add HTTP 6.0 in the header or something like that? Or can I do it from the browser? > - -chris > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.10 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAktzNt0ACgkQ9CaO5/Lv0PAQBwCdHMFnDCbF1Jf6lA4Ub9F6hFgg > +NwAoLFbuX/o73ThJ9nF+SHj/GEtKFtx > =5kCM > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Http 505
Yes I have been asking for it. But clients are not wiling to make a code change. I might have put a sniffer. Strange thing is that we are not seeing the request but they see it as Apache/Coyote 1.1 Thanks On Wed, Feb 10, 2010 at 2:44 PM, Christopher Schultz wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Mohit, > > On 2/10/2010 5:28 PM, Mohit Anchlia wrote: >> There is a proxy F5 in between. But this server sends 100s of request >> per sec. to the same URL. Essentially it's the same code. Only few of >> them fail. This application is non browser based application. > > I think you'll need to instrument either these clients or your webapp to > write more detailed logs in order to diagnose this. > > - -chris > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.10 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAktzNt0ACgkQ9CaO5/Lv0PAQBwCdHMFnDCbF1Jf6lA4Ub9F6hFgg > +NwAoLFbuX/o73ThJ9nF+SHj/GEtKFtx > =5kCM > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Http 505
There is a proxy F5 in between. But this server sends 100s of request per sec. to the same URL. Essentially it's the same code. Only few of them fail. This application is non browser based application. On Wed, Feb 10, 2010 at 11:13 AM, Christopher Schultz wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Mohit, > > On 2/9/2010 11:01 PM, Mohit Anchlia wrote: >> Tomcat 6 > > Tomcat 6.what? > >> Our application non-java client (C/Java) are occasionally seeing >> Http 505. > > Do you know what the HTTP 505 response code means? It means that the > HTTP version of the client is not supported. See > http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html for more information. > > Does the server reply with a response body? > >> But there is no such error being logged in the tomcat access >> log. > > Maybe Tomcat isn't causing the error. Do you have: > > 1. Apache httpd out front? > 2. Any proxy servers between the Internet and your server? > 3. Any proxy servers between the client and the Internet? > >> Clients are for sure seeing 505 but we are not so I am wondering >> if someone can help me understand why that might be occurring? In the >> response header they see: >> >> Response header: Apaache-Coyote/1.1 >> Response header: connection close > > What about the body? You should also find out what the URI request lines > look like that are coming from the client. If they look like this: > > GET / HTTP/6.0 > > ...then you are probably going to get errors. > > - -chris > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.10 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAktzBWEACgkQ9CaO5/Lv0PDyxACglDL0xlm/vjruprdzeTkZOEr/ > /OcAoJUTJUnRWRPuDm9D9hJt9yigscv9 > =guHh > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Http 505
Tomcat 6 Our application non-java client (C/Java) are occassionally seeing Http 505. But there is no such error being logged in the tomcat access log. Clients are for sure seeing 505 but we are not so I am wondering if someone can help me understand why that might be occuring? In the response header they see: Response header: Apaache-Coyote/1.1 Response header: connection close - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Http 500 and %b in access log
On Wed, Jan 20, 2010 at 2:00 PM, Christopher Schultz wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Mohit, > > On 1/20/2010 3:08 PM, Mohit Anchlia wrote: >> > connectionTimeout="12" >> maxThreads="300" >> redirectPort="8443" /> > > Okay, so you're using the standard HTTP connector. Is APR involved? I > notice that your connectionTimeout is 2 minutes: is there a reason to > increase that timeout from the default 1 minute? 1 minute is a long time > to wait around for the client to simply make a request. > >>> I've never see this class before. What is it? In this some kind of >>> instrumentation? If so, what happens if you turn it off? >> >> Yes it's Wily that we use to instrument to get the throughput, >> response time etc. > > So... what happens if you take-out the instrumentation? Does the > exception still occur? > >>> I'll bet that 2657 bytes is the size of your "500 error" page. Can you >>> check that? > > Did you check this? > >>> Does your servlet usually emit fewer than 2657 bytes? That's a pretty >>> small response for many HTTP requests. >> >> Yes we don't send much data because it's just an acknwoledgment that's >> parsed by home grown client application > > Interesting: you have a home-grown client application. I wonder if the > client application isn't working properly. For instance, if the client > sends a Content-Length but then doesn't send enough bytes, Tomcat will > wait for a long time and then throw a SocketTimeoutException. It's > possible this is happening in this case. If the client doesn't close the > output stream (from the client to the server) then the server might wait > forever (until it times out) for the remaining data. Again, check that > your client is sane. I suspect the following as you mentioned. Is there a way I can write small application that simulates this behaviour? How do I write in a way that content-length goes through but bytes are not sent. >>> So, you're copying a byte array from the client. Where are you copying >>> it to? >> >> Copying it to byte array. >> >> transmission = IOUtils.toByteArray(request.getInputStream()) > > Ok. You might want to modify the code so that you repeatedly read and > then report the maximum number of bytes read before the pipe stalls. > Logging the Content-Length from the request might also prove useful. > >>> So, regular web browsers like Firefox, MSIE, Safari? When you say "GUI >>> application" do you mean a web-based application, or do you have >>> something else that's running on the client? >> >> Something else which home grown application running on client > > I would encourage you to use a well-known client such as "wget" to check > the server behavior: if wget still has problems, then you know that a > server-side solution is necessary. If wget works with no problems, > you're client app is probably broken. > >> [Tomcat] didn't throw warning when I changed [the soTimeout attribute]. > > Try setting that to 10 seconds (1) and seeing if the client/server > communication fails after 10 seconds. Then, set it to 120 seconds > (12) and see if the same error takes 2 minutes. If so, that setting > is correct, although it won't help you: it will just set the amount of > time necessary before the server gives up on your client. > > Again, I'd really recommend that you check into your client app code so > make sure it's following the rules. > > - -chris > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.10 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAktXfO8ACgkQ9CaO5/Lv0PD8kQCfSi4pTOuBgQazu7MMT63kAbFU > +c4AoJR/5thGws3IFd0KNfO23+2BItYX > =VvCH > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Http 500 and %b in access log
On the same note. Is there a way to log in access log at what time the request was received and time response was sent? I am planning to add more debug to see how long it waits before timing out. On Wed, Jan 20, 2010 at 12:08 PM, Mohit Anchlia wrote: > On Wed, Jan 20, 2010 at 11:41 AM, Christopher Schultz > wrote: >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> Mohit, >> >> On 1/20/2010 2:11 PM, Mohit Anchlia wrote: >>>> Server version: Apache Tomcat/6.0.18 >>>> >>>> We don't any other web server in front >> >> Okay. What connector(s) are you using? I'm not sure it matters, given >> the other information you've provided. > > connectionTimeout="12" > maxThreads="300" > redirectPort="8443" /> > > >>>> Interesting. Do all responses with fewer than 2657 bytes succeed? Do all >>>> responses with more than 2656 bytes fail? >>> >>> YES >> >> Hmm. >> >>> Please post the entire stack trace of the exception. >>> >>>> SEVERE: Servlet.service() for servlet SwitchServlet threw exception >>>> java.net.SocketTimeoutException: Read timed out >>>> at java.net.SocketInputStream.socketRead0(Native Method) >>>> at java.net.SocketInputStream.read(SocketInputStream.java:129) >>>> at java.io.FilterInputStream.read(FilterInputStream.java:111) >>>> at >>>> com.wily.introscope.agent.probe.net.ManagedSocketInputStream.read(ManagedSocketInputStream.java:214) >> >> I've never see this class before. What is it? In this some kind of >> instrumentation? If so, what happens if you turn it off? > > Yes it's Wily that we use to instrument to get the throughput, > response time etc. > >> Another interesting thing is that this fails during a read() operation. >> So, your servlet isn't failing to send data to the client, it's failing >> to read the data in the first place. > > YES that is correct. > >> I'll bet that 2657 bytes is the size of your "500 error" page. Can you >> check that? > > >> Does your servlet usually emit fewer than 2657 bytes? That's a pretty >> small response for many HTTP requests. > > Yes we don't send much data because it's just an acknwoledgment that's > parsed by home grown client application > >>>> at >>>> org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:746) >>>> at >>>> org.apache.coyote.http11.InternalInputBuffer$InputStreamInputBuffer.doRead(InternalInputBuffer.java:776) >>>> at >>>> org.apache.coyote.http11.filters.IdentityInputFilter.doRead(IdentityInputFilter.java:116) >>>> at >>>> org.apache.coyote.http11.InternalInputBuffer.doRead(InternalInputBuffer.java:705) >>>> at org.apache.coyote.Request.doRead(Request.java:428) >>>> at >>>> org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:304) >>>> at >>>> org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:405) >>>> at >>>> org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:327) >>>> at >>>> org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:162) >>>> at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1025) >>>> at org.apache.commons.io.IOUtils.copy(IOUtils.java:999) >>>> at org.apache.commons.io.IOUtils.toByteArray(IOUtils.java:218) >>>> at >>>> com.intuit.engine.efp.efe.efileswitch.SwitchServlet.doPostOrGet(SwitchServlet.java:174) >>>> at >>>> com.intuit.engine.efp.efe.common.servlet.BaseServlet.doPost(BaseServlet.java:48) >> >> So, you're copying a byte array from the client. Where are you copying >> it to? > > Copying it to byte array. > > transmission = IOUtils.toByteArray(request.getInputStream()) > >>> Yes it always fail with desktop clients on the broadband/modem etc.. >>> Basically ones that are using our GUI application. >> >> So, regular web browsers like Firefox, MSIE, Safari? When you say "GUI >> application" do you mean a web-based application, or do you have >> something else that's running on the client? > > Something else which home grown application running on client > >>
Re: Http 500 and %b in access log
On Wed, Jan 20, 2010 at 11:41 AM, Christopher Schultz wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Mohit, > > On 1/20/2010 2:11 PM, Mohit Anchlia wrote: >>> Server version: Apache Tomcat/6.0.18 >>> >>> We don't any other web server in front > > Okay. What connector(s) are you using? I'm not sure it matters, given > the other information you've provided. >>> Interesting. Do all responses with fewer than 2657 bytes succeed? Do all >>> responses with more than 2656 bytes fail? >> >> YES > > Hmm. > >> Please post the entire stack trace of the exception. >> >>> SEVERE: Servlet.service() for servlet SwitchServlet threw exception >>> java.net.SocketTimeoutException: Read timed out >>> at java.net.SocketInputStream.socketRead0(Native Method) >>> at java.net.SocketInputStream.read(SocketInputStream.java:129) >>> at java.io.FilterInputStream.read(FilterInputStream.java:111) >>> at >>> com.wily.introscope.agent.probe.net.ManagedSocketInputStream.read(ManagedSocketInputStream.java:214) > > I've never see this class before. What is it? In this some kind of > instrumentation? If so, what happens if you turn it off? Yes it's Wily that we use to instrument to get the throughput, response time etc. > Another interesting thing is that this fails during a read() operation. > So, your servlet isn't failing to send data to the client, it's failing > to read the data in the first place. YES that is correct. > I'll bet that 2657 bytes is the size of your "500 error" page. Can you > check that? > Does your servlet usually emit fewer than 2657 bytes? That's a pretty > small response for many HTTP requests. Yes we don't send much data because it's just an acknwoledgment that's parsed by home grown client application >>> at >>> org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:746) >>> at >>> org.apache.coyote.http11.InternalInputBuffer$InputStreamInputBuffer.doRead(InternalInputBuffer.java:776) >>> at >>> org.apache.coyote.http11.filters.IdentityInputFilter.doRead(IdentityInputFilter.java:116) >>> at >>> org.apache.coyote.http11.InternalInputBuffer.doRead(InternalInputBuffer.java:705) >>> at org.apache.coyote.Request.doRead(Request.java:428) >>> at >>> org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:304) >>> at >>> org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:405) >>> at >>> org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:327) >>> at >>> org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:162) >>> at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1025) >>> at org.apache.commons.io.IOUtils.copy(IOUtils.java:999) >>> at org.apache.commons.io.IOUtils.toByteArray(IOUtils.java:218) >>> at >>> com.intuit.engine.efp.efe.efileswitch.SwitchServlet.doPostOrGet(SwitchServlet.java:174) >>> at >>> com.intuit.engine.efp.efe.common.servlet.BaseServlet.doPost(BaseServlet.java:48) > > So, you're copying a byte array from the client. Where are you copying > it to? Copying it to byte array. transmission = IOUtils.toByteArray(request.getInputStream()) >> Yes it always fail with desktop clients on the broadband/modem etc.. >> Basically ones that are using our GUI application. > > So, regular web browsers like Firefox, MSIE, Safari? When you say "GUI > application" do you mean a web-based application, or do you have > something else that's running on the client? Something else which home grown application running on client >> Is there also a timeout where connection is closed when 'n' secs >> expire irrespecitve of if the client and server are actively talking >> to each other. > > That would be the SocketTimeout itself which I don't believe is settable > through Tomcat's configuration. The default socket timeout > for ServerSocket is 0 (infinity: wait forever) so it must be that this > default is being changed somewhere along the way. > > It's possible that the configurator will pass-through any > settings onto the socket (I haven't read the code). It would be simple > to try adding "soTimeout=6" (that's 60 seconds) to your > configuration and see if that works. Check the logs after sta
Re: Http 500 and %b in access log
On Wed, Jan 20, 2010 at 10:47 AM, Christopher Schultz wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Mohit, > > On 1/20/2010 12:06 PM, Mohit Anchlia wrote: >> Tomcat 6: > > Which specific version, please. Also, what connector(s) are you using. > Please provide the configuration for them. Are you using another web > server in front of Tomcat? If so, which one, and how are you connecting > them (mod_jk, mod_proxy_ajp, mod_proxy_http, etc.)? Using CATALINA_BASE: /usr/local/tomcat Using CATALINA_HOME: /usr/local/tomcat Using CATALINA_TMPDIR: /usr/local/tomcat/temp Using JRE_HOME: /usr/local/java Server version: Apache Tomcat/6.0.18 Server built: Jul 22 2008 02:00:36 Server number: 6.0.18.0 OS Name:Linux OS Version: 2.6.9-42.0.10.ELhugemem Architecture: i386 JVM Version:1.5.0_08-b03 JVM Vendor: Sun Microsystems Inc. We don't any other web server in front > >> I am seeing Exception in localhost java.net.SocketTimeoutException: >> Read time out. I looked at the access log and I see tomcat returning >> Http 500. Only thing in common is that "%b" (bytes sent) for all the >> timeouts are 2657. For rest of them where requests are successful >> it's less than 2657. > > Interesting. Do all responses with fewer than 2657 bytes succeed? Do all > responses with more than 2656 bytes fail? YES > Please post the entire stack trace of the exception. SEVERE: Servlet.service() for servlet SwitchServlet threw exception java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at java.io.FilterInputStream.read(FilterInputStream.java:111) at com.wily.introscope.agent.probe.net.ManagedSocketInputStream.read(ManagedSocketInputStream.java:214) at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:746) at org.apache.coyote.http11.InternalInputBuffer$InputStreamInputBuffer.doRead(InternalInputBuffer.java:776) at org.apache.coyote.http11.filters.IdentityInputFilter.doRead(IdentityInputFilter.java:116) at org.apache.coyote.http11.InternalInputBuffer.doRead(InternalInputBuffer.java:705) at org.apache.coyote.Request.doRead(Request.java:428) at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:304) at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:405) at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:327) at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:162) at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1025) at org.apache.commons.io.IOUtils.copy(IOUtils.java:999) at org.apache.commons.io.IOUtils.toByteArray(IOUtils.java:218) at com.intuit.engine.efp.efe.efileswitch.SwitchServlet.doPostOrGet(SwitchServlet.java:174) at com.intuit.engine.efp.efe.common.servlet.BaseServlet.doPost(BaseServlet.java:48) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:595) >> Could someone help me understand what %b is for in localhost access >> logs and if what I am seeing makes sense. > > %b is, as you say, the number of bytes sent (presumably to the client, > in the response). > > Does this always fail with certain clients? If so, which ones? Are these > normal web browsers, or are you using a custom client? Yes it always fail with desktop clients on the broadband/modem etc.. Basically ones that are using our GUI application. >
Http 500 and %b in access log
Tomcat 6: I am seeing Exception in localhost java.net.SocketTimeoutException: Read time out. I looked at the access log and I see tomcat returning Http 500. Only thing in common is that "%b" (bytes sent) for all the timeouts are 2657. For rest of them where requests are successfull it's less than 2657. Could someone help me understand what %b is for in localhost access logs and if what I am seeing makes sense. Does SocketTimeoutException correspond to ConnectionTimeout in the connector? We tried increasing it but didn't make any difference. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Timeout
Tomcat 6: Are there any other kind of timeout values other than ConnectionTimeout? Does Connection Timeout come into affect when there is an ESTABLISHED socket connection from the client? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Exception in localhost file
Using CATALINA_BASE: /usr/local/tomcat Using CATALINA_HOME: /usr/local/tomcat Using CATALINA_TMPDIR: /usr/local/tomcat/temp Using JRE_HOME: /usr/local/java Server version: Apache Tomcat/6.0.18 Server built: Jul 22 2008 02:00:36 Server number: 6.0.18.0 OS Name:Linux OS Version: 2.6.9-42.0.10.ELhugemem Architecture: i386 JVM Version:1.5.0_08-b03 JVM Vendor: Sun Microsystems Inc. On Wed, Jan 13, 2010 at 3:54 PM, Konstantin Kolinko wrote: > I have asked already: > what is your Tomcat version and your Java version? > > If you do not know, please run "catalina.sh version" > > org.apache.juli.FileHandler uses java.util.logging.SimpleFormatter by default, > and you should look in your JDK sources to see how that class is implemented. > > As of 6u16 it calls printStackTrace(pw) on the exception. > > > > 2010/1/14 Mohit Anchlia : >> I am looking at file in "vi" and don't see stack trace >> On Wed, Jan 13, 2010 at 11:02 AM, Christopher Schultz >> wrote: >>> -BEGIN PGP SIGNED MESSAGE- >>> Hash: SHA1 >>> >>> Mohit, >>> >>> On 1/11/2010 9:10 PM, Mohit Anchlia wrote: >>>> I am seeing following exception in localhost file with no stack trace. >>> >>> [snip] >>> >>>> Jan 11, 2010 4:12:57 PM org.apache.catalina.core.StandardWrapperValve >>>> invoke >>>> SEVERE: Servlet.service() for servlet SwchServlet threw exception >>>> java.lang.ArrayIndexOutOfBoundsException >>> >>> As others have pointed out, /your/ servlet has a problem. >>> >>> It looks like StandardWrapperValve is catching the exception and logging >>> it (see StandardWrapperValve.java:153 in Tomcat 6.0.20). The call to the >>> logger includes the exception object, so a stack trace should be emitted >>> to the log using a SEVERE level (which you can see above). >>> >>> There is no configuration that I know of that can optionally omit stack >>> traces from the logs. >>> >>> Are you looking at the whole file, or are you just grepping for >>> "Exception" and not seeing the exception's stack trace? >>> >>> - -chris >>> -BEGIN PGP SIGNATURE- >>> -END PGP SIGNATURE- >>> >> > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Exception in localhost file
I am looking at file in "vi" and don't see stack trace On Wed, Jan 13, 2010 at 11:02 AM, Christopher Schultz wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Mohit, > > On 1/11/2010 9:10 PM, Mohit Anchlia wrote: >> I am seeing following exception in localhost file with no stack trace. > > [snip] > >> Jan 11, 2010 4:12:57 PM org.apache.catalina.core.StandardWrapperValve invoke >> SEVERE: Servlet.service() for servlet SwchServlet threw exception >> java.lang.ArrayIndexOutOfBoundsException > > As others have pointed out, /your/ servlet has a problem. > > It looks like StandardWrapperValve is catching the exception and logging > it (see StandardWrapperValve.java:153 in Tomcat 6.0.20). The call to the > logger includes the exception object, so a stack trace should be emitted > to the log using a SEVERE level (which you can see above). > > There is no configuration that I know of that can optionally omit stack > traces from the logs. > > Are you looking at the whole file, or are you just grepping for > "Exception" and not seeing the exception's stack trace? > > - -chris > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.10 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAktOGMUACgkQ9CaO5/Lv0PDtpgCgkIAwz0xX7kGo5quDsD4/kDFi > ApoAn2J1j4GZhEZEtgQ1nj82MUO/MG8D > =Rp86 > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Exception in localhost file
Yes. I understand that. I was trying to understand why full stack trace is not being logged in localhost On Tue, Jan 12, 2010 at 8:11 AM, Joseph Morgan wrote: > This isn't a Tomcat issue at all, just code in SwchServlet behaving badly or > getting unexpected data. > > -Original Message----- > From: Mohit Anchlia [mailto:mohitanch...@gmail.com] > Sent: Tuesday, January 12, 2010 9:58 AM > To: Tomcat Users List > Subject: Re: Exception in localhost file > > There seems to be no code. This is logging properties. I am not sure > why the exception is not getting logged. I do have application > specific log4j.xml but that's only for application logs that is > working fine. > > #org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO > org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO > org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers > = 2localhost.org.apache.juli.FileHandler > > org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level > = INFO > org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers > = 3manager.org.apache.juli.FileHandler > > org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/admin].level > = INFO > org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/admin].handlers > = 4admin.org.apache.juli.FileHandler > > org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level > = INFO > org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers > = 5host-manager.org.apache.juli.FileHandler > > On Tue, Jan 12, 2010 at 5:29 AM, Joseph Morgan > wrote: >>>> Jan 11, 2010 4:12:57 PM org.apache.catalina.core.StandardWrapperValve >> invoke >>>> SEVERE: Servlet.service() for servlet SwchServlet threw exception >>>> java.lang.ArrayIndexOutOfBoundsException >> >>>> There is no clue as to why this might be happening. >> >> False, that IS the clue. SwchServlet code is using an index into an >> array (or something ultimately treated as an array) and simply stepping >> outside the bounds. >> >> Is the code using a logger? Check how that is used/configured, as that >> might be why you're not seeing a full stack trace. Someone may have >> written code to trap an exception and then issue their own message. >> >> -Original Message- >> From: Mohit Anchlia [mailto:mohitanch...@gmail.com] >> Sent: Monday, January 11, 2010 8:10 PM >> To: Tomcat Users List >> Subject: Exception in localhost file >> >> tomcat 6: >> >> I am seeing following exception in localhost file with no stack trace. >> There is no clue as to why this might be happening. How do I get the >> full stack trace to narrow down the problem? We also have our >> application log where our application specific exceptions get logged >> with full stack trace but this is not being logged there. >> >> Jan 11, 2010 4:12:57 PM org.apache.catalina.core.StandardWrapperValve >> invoke >> SEVERE: Servlet.service() for servlet SwchServlet threw exception >> java.lang.ArrayIndexOutOfBoundsException >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Exception in localhost file
There seems to be no code. This is logging properties. I am not sure why the exception is not getting logged. I do have application specific log4j.xml but that's only for application logs that is working fine. #org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.FileHandler org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/admin].level = INFO org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/admin].handlers = 4admin.org.apache.juli.FileHandler org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = INFO org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 5host-manager.org.apache.juli.FileHandler On Tue, Jan 12, 2010 at 5:29 AM, Joseph Morgan wrote: >>> Jan 11, 2010 4:12:57 PM org.apache.catalina.core.StandardWrapperValve > invoke >>> SEVERE: Servlet.service() for servlet SwchServlet threw exception >>> java.lang.ArrayIndexOutOfBoundsException > >>> There is no clue as to why this might be happening. > > False, that IS the clue. SwchServlet code is using an index into an > array (or something ultimately treated as an array) and simply stepping > outside the bounds. > > Is the code using a logger? Check how that is used/configured, as that > might be why you're not seeing a full stack trace. Someone may have > written code to trap an exception and then issue their own message. > > -Original Message- > From: Mohit Anchlia [mailto:mohitanch...@gmail.com] > Sent: Monday, January 11, 2010 8:10 PM > To: Tomcat Users List > Subject: Exception in localhost file > > tomcat 6: > > I am seeing following exception in localhost file with no stack trace. > There is no clue as to why this might be happening. How do I get the > full stack trace to narrow down the problem? We also have our > application log where our application specific exceptions get logged > with full stack trace but this is not being logged there. > > Jan 11, 2010 4:12:57 PM org.apache.catalina.core.StandardWrapperValve > invoke > SEVERE: Servlet.service() for servlet SwchServlet threw exception > java.lang.ArrayIndexOutOfBoundsException > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Exception in localhost file
tomcat 6: I am seeing following exception in localhost file with no stack trace. There is no clue as to why this might be happening. How do I get the full stack trace to narrow down the problem? We also have our application log where our application specific exceptions get logged with full stack trace but this is not being logged there. Jan 11, 2010 4:12:57 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet SwchServlet threw exception java.lang.ArrayIndexOutOfBoundsException - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Changing request address to x-forwarded-for
I found this site http://code.google.com/p/xebia-france/wiki/RemoteIpValve Can I directly download and install it in 6.0.18? On Wed, Jan 6, 2010 at 7:41 AM, Mohit Anchlia wrote: > Could you please point me to an example of how I can do this? We are > using apache-tomcat-6.0.18 > > On Tue, Jan 5, 2010 at 11:41 PM, Mark Thomas wrote: >> On 06/01/2010 04:14, Mohit Anchlia wrote: >>> tomcat 6: >>> >>> Is it possible to inject or change remote address to what's in >>> x-forwaded-for in http header such that when Servlet received the >>> request it's already in the request.getRemoteAddress()? Otherwise >>> we'll need to make a urgent change to read from the HTTP header. We >>> didn't realize it earlier since we are using F5 LTM. >> >> The next release of Tomcat 6 will include a new valve (RemoteIpValve) to >> do exactly this. If you can't wait for the next 6.0.x release (should be >> soon - hopefully next week or so) then you can always use that as the >> basis to write your own valve. Alternatively, Tomcat 7 also has a filter >> that does the same thing that you could use as a startign point. >> >> Mark >> >> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Changing request address to x-forwarded-for
Could you please point me to an example of how I can do this? We are using apache-tomcat-6.0.18 On Tue, Jan 5, 2010 at 11:41 PM, Mark Thomas wrote: > On 06/01/2010 04:14, Mohit Anchlia wrote: >> tomcat 6: >> >> Is it possible to inject or change remote address to what's in >> x-forwaded-for in http header such that when Servlet received the >> request it's already in the request.getRemoteAddress()? Otherwise >> we'll need to make a urgent change to read from the HTTP header. We >> didn't realize it earlier since we are using F5 LTM. > > The next release of Tomcat 6 will include a new valve (RemoteIpValve) to > do exactly this. If you can't wait for the next 6.0.x release (should be > soon - hopefully next week or so) then you can always use that as the > basis to write your own valve. Alternatively, Tomcat 7 also has a filter > that does the same thing that you could use as a startign point. > > Mark > > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Changing request address to x-forwarded-for
tomcat 6: Is it possible to inject or change remote address to what's in x-forwaded-for in http header such that when Servlet received the request it's already in the request.getRemoteAddress()? Otherwise we'll need to make a urgent change to read from the HTTP header. We didn't realize it earlier since we are using F5 LTM. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: errno 110 in mod_jk
Thanks. Looks like we are hitting the same bug. I am still looking for an answer to one of my questions that I posted earlier. To narrow down I just left one node running and started the test. When I look at JkStatus worker I see that even though all other nodes are down it's still showing "OK" in the status for those workers. I am not sure why it would do that. I expect it to show the workers in ERR status. Do you know the default timeout of connectionTimeout? I am getting conflicting results. Some place it says 6 and other places 60. Is there any disadvantage of setting this value too low? On Sun, Nov 8, 2009 at 9:59 AM, Rainer Jung wrote: > On 08.11.2009 01:36, Mohit Anchlia wrote: >> Could someone please help me understand this? > > What about adding connectionTimeout to the JBoss Connector element (and > keep its value in sync with connection_pool_timeout^for the ajp workers. > Note that the Connector attribute is in milliseconds, the worker > attribute in seconds. > > Also make sure that you weren't hit by > > https://jira.jboss.org/jira/browse/JBPAPP-366 > > Regards, > > Rainer > >> On Sat, Nov 7, 2009 at 8:50 AM, Mohit Anchlia wrote: >>> I am also seeing that in Jboss (Back End) that there are lot of keep >>> alive sessions and I think that's the reason I am seeing the timeout. >>> As I add new web server it hits the 250 MaxThreads limit and then it >>> start to timeout. Those threads are there even though not doing any >>> work. I tried disabling keepalive in worker.properties but still those >>> threads are not being freed up. >>> >>> Could someone please tell me why that might be happening? >>> >>> On Sat, Nov 7, 2009 at 7:25 AM, Mohit Anchlia >>> wrote: >>>> To narrow down I just left one node running and started test. When I >>>> look at JkStatus worker I see even though all other nodes are down >>>> it's still showing "OK" in the status. I am not sure why it would do >>>> that. Could this be the reason why I am seeing slow response times in >>>> mod-jk? >>>> >>>> On Fri, Nov 6, 2009 at 6:30 PM, Mohit Anchlia >>>> wrote: >>>>> I am looking at the tcpdump but I don't see packet retransmits. What >>>>> should I expect to see in tcpdump? thanks for your help. >>>>> >>>>> On Fri, Nov 6, 2009 at 4:05 PM, Rainer Jung >>>>> wrote: >>>>>> $ grep 110 /usr/include/*/errno.h >>>>>> >>>>>> #define ETIMEDOUT 110 /* Connection timed out */ >>>>>> >>>>>> On 07.11.2009 00:56, Mohit Anchlia wrote: >>>>>>> I turned on mod_jk debug and see: >>>>>> >>>>>>> [Fri Nov 06 15:48:31.190 2009] [31055:4143340384] [info] >>>>>>> ajp_handle_cping_cpong::jk_ajp_common.c (865): timeout in reply cpong >>>>>> >>>>>> So your backend doesn't send the required cpong answer during the >>>>>> timeout ou configured. >>>>>> >>>>>>> [Fri Nov 06 15:48:31.191 2009] [31055:4143340384] [debug] >>>>>>> jk_shutdown_socket::jk_connect.c (680): About to shutdown socket 14 >>>>>>> [Fri Nov 06 15:48:31.256 2009] [31044:4143340384] [debug] >>>>>>> jk_shutdown_socket::jk_connect.c (731): Shutdown socket 14 and read 0 >>>>>>> lingering bytes >>>>>>> [Fri Nov 06 15:48:31.256 2009] [31044:4143340384] [error] >>>>>>> ajp_connect_to_endpoint::jk_ajp_common.c (957): (eitappfe2) >>>>>>> cping/cpong after connecting to the backend server failed (errno=110) >>>>>>> [Fri Nov 06 15:48:31.257 2009] [31044:4143340384] [error] >>>>>>> ajp_send_request::jk_ajp_common.c (1467): (eitappfe2) connecting to >>>>>>> backend failed. Tomcat is probably not started or is listening on the >>>>>>> wrong port (errno=110) >>>>>>> [Fri Nov 06 15:48:31.257 2009] [31044:4143340384] [info] >>>>>>> ajp_service::jk_ajp_common.c (2407): (eitappfe2) sending request to >>>>>>> tomcat failed (recoverable), because of error during request sending >>>>>>> (attempt=1) >>>>>>> [Fri Nov 06 15:48:31.257 2009] [31044:4143340384] [debug] >>>>>>> ajp_service::jk_ajp_common.c (2267): retry 1, sleeping for 100 ms >>>>>>> before retrying >>>&g
Re: errno 110 in mod_jk
Could someone please help me understand this? On Sat, Nov 7, 2009 at 8:50 AM, Mohit Anchlia wrote: > I am also seeing that in Jboss (Back End) that there are lot of keep > alive sessions and I think that's the reason I am seeing the timeout. > As I add new web server it hits the 250 MaxThreads limit and then it > start to timeout. Those threads are there even though not doing any > work. I tried disabling keepalive in worker.properties but still those > threads are not being freed up. > > Could someone please tell me why that might be happening? > > On Sat, Nov 7, 2009 at 7:25 AM, Mohit Anchlia wrote: >> To narrow down I just left one node running and started test. When I >> look at JkStatus worker I see even though all other nodes are down >> it's still showing "OK" in the status. I am not sure why it would do >> that. Could this be the reason why I am seeing slow response times in >> mod-jk? >> >> On Fri, Nov 6, 2009 at 6:30 PM, Mohit Anchlia wrote: >>> I am looking at the tcpdump but I don't see packet retransmits. What >>> should I expect to see in tcpdump? thanks for your help. >>> >>> On Fri, Nov 6, 2009 at 4:05 PM, Rainer Jung wrote: >>>> $ grep 110 /usr/include/*/errno.h >>>> >>>> #define ETIMEDOUT 110 /* Connection timed out */ >>>> >>>> On 07.11.2009 00:56, Mohit Anchlia wrote: >>>>> I turned on mod_jk debug and see: >>>> >>>>> [Fri Nov 06 15:48:31.190 2009] [31055:4143340384] [info] >>>>> ajp_handle_cping_cpong::jk_ajp_common.c (865): timeout in reply cpong >>>> >>>> So your backend doesn't send the required cpong answer during the >>>> timeout ou configured. >>>> >>>>> [Fri Nov 06 15:48:31.191 2009] [31055:4143340384] [debug] >>>>> jk_shutdown_socket::jk_connect.c (680): About to shutdown socket 14 >>>>> [Fri Nov 06 15:48:31.256 2009] [31044:4143340384] [debug] >>>>> jk_shutdown_socket::jk_connect.c (731): Shutdown socket 14 and read 0 >>>>> lingering bytes >>>>> [Fri Nov 06 15:48:31.256 2009] [31044:4143340384] [error] >>>>> ajp_connect_to_endpoint::jk_ajp_common.c (957): (eitappfe2) >>>>> cping/cpong after connecting to the backend server failed (errno=110) >>>>> [Fri Nov 06 15:48:31.257 2009] [31044:4143340384] [error] >>>>> ajp_send_request::jk_ajp_common.c (1467): (eitappfe2) connecting to >>>>> backend failed. Tomcat is probably not started or is listening on the >>>>> wrong port (errno=110) >>>>> [Fri Nov 06 15:48:31.257 2009] [31044:4143340384] [info] >>>>> ajp_service::jk_ajp_common.c (2407): (eitappfe2) sending request to >>>>> tomcat failed (recoverable), because of error during request sending >>>>> (attempt=1) >>>>> [Fri Nov 06 15:48:31.257 2009] [31044:4143340384] [debug] >>>>> ajp_service::jk_ajp_common.c (2267): retry 1, sleeping for 100 ms >>>>> before retrying >>>>> [Fri Nov 06 15:48:31.314 2009] [31032:4143340384] [debug] >>>>> jk_shutdown_socket::jk_connect.c (731): Shutdown socket 14 and read 0 >>>>> lingering bytes >>>>> [Fri Nov 06 15:48:31.315 2009] [31032:4143340384] [error] >>>>> ajp_connect_to_endpoint::jk_ajp_common.c (957): (eitappfe2) >>>>> cping/cpong after connecting to the backend server failed (errno=110) >>>>> [Fri Nov 06 15:48:31.315 2009] [31032:4143340384] [error] >>>>> ajp_send_request::jk_ajp_common.c (1467): (eitappfe2) connecting to >>>>> backend failed. Tomcat is probably not started or is listening on the >>>>> wrong port (errno=110) >>>>> >>>>> -- >>>>> All nodes are up and have plenty of threads configured and free. >>>> >>>> Yet they are still not responding in time. >>>> >>>> You can verify using a apcket sniff. >>>> >>>>> On Fri, Nov 6, 2009 at 3:47 PM, Mohit Anchlia >>>>> wrote: >>>>>> I am continously seeing the following even though all these nodes are >>>>>> up and running and receving requests. >>>>>> >>>>>> [Fri Nov 06 15:43:47.627 2009] [29200:4143332192] [error] >>>>>> ajp_send_request::jk_ajp_common.c (1467): (eitappfe3) connecting to >>>>>> backend failed. Tomcat is probably not started or is listening on the >>>>>> wrong port (errno=110) >>>>>> [Fri Nov 06 15:43:47.627 2009] [29200:4143332192] [error] >>>>>> ajp_service::jk_ajp_common.c (2426): (eitappfe3) connecting to tomcat >>>>>> failed. >>>> >>>> Regards, >>>> >>>> Rainer >>>> >>>> - >>>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >>>> For additional commands, e-mail: users-h...@tomcat.apache.org >>>> >>>> >>> >> > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: errno 110 in mod_jk
I am also seeing that in Jboss (Back End) that there are lot of keep alive sessions and I think that's the reason I am seeing the timeout. As I add new web server it hits the 250 MaxThreads limit and then it start to timeout. Those threads are there even though not doing any work. I tried disabling keepalive in worker.properties but still those threads are not being freed up. Could someone please tell me why that might be happening? On Sat, Nov 7, 2009 at 7:25 AM, Mohit Anchlia wrote: > To narrow down I just left one node running and started test. When I > look at JkStatus worker I see even though all other nodes are down > it's still showing "OK" in the status. I am not sure why it would do > that. Could this be the reason why I am seeing slow response times in > mod-jk? > > On Fri, Nov 6, 2009 at 6:30 PM, Mohit Anchlia wrote: >> I am looking at the tcpdump but I don't see packet retransmits. What >> should I expect to see in tcpdump? thanks for your help. >> >> On Fri, Nov 6, 2009 at 4:05 PM, Rainer Jung wrote: >>> $ grep 110 /usr/include/*/errno.h >>> >>> #define ETIMEDOUT 110 /* Connection timed out */ >>> >>> On 07.11.2009 00:56, Mohit Anchlia wrote: >>>> I turned on mod_jk debug and see: >>> >>>> [Fri Nov 06 15:48:31.190 2009] [31055:4143340384] [info] >>>> ajp_handle_cping_cpong::jk_ajp_common.c (865): timeout in reply cpong >>> >>> So your backend doesn't send the required cpong answer during the >>> timeout ou configured. >>> >>>> [Fri Nov 06 15:48:31.191 2009] [31055:4143340384] [debug] >>>> jk_shutdown_socket::jk_connect.c (680): About to shutdown socket 14 >>>> [Fri Nov 06 15:48:31.256 2009] [31044:4143340384] [debug] >>>> jk_shutdown_socket::jk_connect.c (731): Shutdown socket 14 and read 0 >>>> lingering bytes >>>> [Fri Nov 06 15:48:31.256 2009] [31044:4143340384] [error] >>>> ajp_connect_to_endpoint::jk_ajp_common.c (957): (eitappfe2) >>>> cping/cpong after connecting to the backend server failed (errno=110) >>>> [Fri Nov 06 15:48:31.257 2009] [31044:4143340384] [error] >>>> ajp_send_request::jk_ajp_common.c (1467): (eitappfe2) connecting to >>>> backend failed. Tomcat is probably not started or is listening on the >>>> wrong port (errno=110) >>>> [Fri Nov 06 15:48:31.257 2009] [31044:4143340384] [info] >>>> ajp_service::jk_ajp_common.c (2407): (eitappfe2) sending request to >>>> tomcat failed (recoverable), because of error during request sending >>>> (attempt=1) >>>> [Fri Nov 06 15:48:31.257 2009] [31044:4143340384] [debug] >>>> ajp_service::jk_ajp_common.c (2267): retry 1, sleeping for 100 ms >>>> before retrying >>>> [Fri Nov 06 15:48:31.314 2009] [31032:4143340384] [debug] >>>> jk_shutdown_socket::jk_connect.c (731): Shutdown socket 14 and read 0 >>>> lingering bytes >>>> [Fri Nov 06 15:48:31.315 2009] [31032:4143340384] [error] >>>> ajp_connect_to_endpoint::jk_ajp_common.c (957): (eitappfe2) >>>> cping/cpong after connecting to the backend server failed (errno=110) >>>> [Fri Nov 06 15:48:31.315 2009] [31032:4143340384] [error] >>>> ajp_send_request::jk_ajp_common.c (1467): (eitappfe2) connecting to >>>> backend failed. Tomcat is probably not started or is listening on the >>>> wrong port (errno=110) >>>> >>>> -- >>>> All nodes are up and have plenty of threads configured and free. >>> >>> Yet they are still not responding in time. >>> >>> You can verify using a apcket sniff. >>> >>>> On Fri, Nov 6, 2009 at 3:47 PM, Mohit Anchlia >>>> wrote: >>>>> I am continously seeing the following even though all these nodes are >>>>> up and running and receving requests. >>>>> >>>>> [Fri Nov 06 15:43:47.627 2009] [29200:4143332192] [error] >>>>> ajp_send_request::jk_ajp_common.c (1467): (eitappfe3) connecting to >>>>> backend failed. Tomcat is probably not started or is listening on the >>>>> wrong port (errno=110) >>>>> [Fri Nov 06 15:43:47.627 2009] [29200:4143332192] [error] >>>>> ajp_service::jk_ajp_common.c (2426): (eitappfe3) connecting to tomcat >>>>> failed. >>> >>> Regards, >>> >>> Rainer >>> >>> - >>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >>> For additional commands, e-mail: users-h...@tomcat.apache.org >>> >>> >> > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: errno 110 in mod_jk
To narrow down I just left one node running and started test. When I look at JkStatus worker I see even though all other nodes are down it's still showing "OK" in the status. I am not sure why it would do that. Could this be the reason why I am seeing slow response times in mod-jk? On Fri, Nov 6, 2009 at 6:30 PM, Mohit Anchlia wrote: > I am looking at the tcpdump but I don't see packet retransmits. What > should I expect to see in tcpdump? thanks for your help. > > On Fri, Nov 6, 2009 at 4:05 PM, Rainer Jung wrote: >> $ grep 110 /usr/include/*/errno.h >> >> #define ETIMEDOUT 110 /* Connection timed out */ >> >> On 07.11.2009 00:56, Mohit Anchlia wrote: >>> I turned on mod_jk debug and see: >> >>> [Fri Nov 06 15:48:31.190 2009] [31055:4143340384] [info] >>> ajp_handle_cping_cpong::jk_ajp_common.c (865): timeout in reply cpong >> >> So your backend doesn't send the required cpong answer during the >> timeout ou configured. >> >>> [Fri Nov 06 15:48:31.191 2009] [31055:4143340384] [debug] >>> jk_shutdown_socket::jk_connect.c (680): About to shutdown socket 14 >>> [Fri Nov 06 15:48:31.256 2009] [31044:4143340384] [debug] >>> jk_shutdown_socket::jk_connect.c (731): Shutdown socket 14 and read 0 >>> lingering bytes >>> [Fri Nov 06 15:48:31.256 2009] [31044:4143340384] [error] >>> ajp_connect_to_endpoint::jk_ajp_common.c (957): (eitappfe2) >>> cping/cpong after connecting to the backend server failed (errno=110) >>> [Fri Nov 06 15:48:31.257 2009] [31044:4143340384] [error] >>> ajp_send_request::jk_ajp_common.c (1467): (eitappfe2) connecting to >>> backend failed. Tomcat is probably not started or is listening on the >>> wrong port (errno=110) >>> [Fri Nov 06 15:48:31.257 2009] [31044:4143340384] [info] >>> ajp_service::jk_ajp_common.c (2407): (eitappfe2) sending request to >>> tomcat failed (recoverable), because of error during request sending >>> (attempt=1) >>> [Fri Nov 06 15:48:31.257 2009] [31044:4143340384] [debug] >>> ajp_service::jk_ajp_common.c (2267): retry 1, sleeping for 100 ms >>> before retrying >>> [Fri Nov 06 15:48:31.314 2009] [31032:4143340384] [debug] >>> jk_shutdown_socket::jk_connect.c (731): Shutdown socket 14 and read 0 >>> lingering bytes >>> [Fri Nov 06 15:48:31.315 2009] [31032:4143340384] [error] >>> ajp_connect_to_endpoint::jk_ajp_common.c (957): (eitappfe2) >>> cping/cpong after connecting to the backend server failed (errno=110) >>> [Fri Nov 06 15:48:31.315 2009] [31032:4143340384] [error] >>> ajp_send_request::jk_ajp_common.c (1467): (eitappfe2) connecting to >>> backend failed. Tomcat is probably not started or is listening on the >>> wrong port (errno=110) >>> >>> -- >>> All nodes are up and have plenty of threads configured and free. >> >> Yet they are still not responding in time. >> >> You can verify using a apcket sniff. >> >>> On Fri, Nov 6, 2009 at 3:47 PM, Mohit Anchlia >>> wrote: >>>> I am continously seeing the following even though all these nodes are >>>> up and running and receving requests. >>>> >>>> [Fri Nov 06 15:43:47.627 2009] [29200:4143332192] [error] >>>> ajp_send_request::jk_ajp_common.c (1467): (eitappfe3) connecting to >>>> backend failed. Tomcat is probably not started or is listening on the >>>> wrong port (errno=110) >>>> [Fri Nov 06 15:43:47.627 2009] [29200:4143332192] [error] >>>> ajp_service::jk_ajp_common.c (2426): (eitappfe3) connecting to tomcat >>>> failed. >> >> Regards, >> >> Rainer >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: So many timeout values
I actually have worked on C but didn't read the line about bit mask. Sorry. On Wed, Oct 28, 2009 at 12:44 PM, Christopher Schultz wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Mohit, > > On 10/28/2009 2:29 PM, Mohit Anchlia wrote: >> Regarding recovery_options: Is there a default value it's set to? On >> the link http://tomcat.apache.org/connectors-doc/reference/workers.html >> it doesn't have option "7" > > That's because 7 isn't a power of 2, and recovery_options is a /bit > mask/ (http://en.wikipedia.org/wiki/Bit_mask). > > Everybody ought to learn a little C at some point. It will make you > really appreciate a relatively clean language like Java. (No comments > from the Smalltalk or LISP folks out there, please). > > - -chris > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.10 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAkronyEACgkQ9CaO5/Lv0PCDXwCeL1fX0nErWfqEmDYTnTLhsYH6 > 5WwAnieOO4YVyYdthW6UGLkhhLVQlS4W > =EcMF > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: So many timeout values
Thanks. I couldn't find what option retry_options 7 in http://tomcat.apache.org/connectors-doc/reference/workers.html is for. On Wed, Oct 28, 2009 at 11:37 AM, Rainer Jung wrote: > On 28.10.2009 19:29, Mohit Anchlia wrote: >> Thanks a lot! >> >> Would this work with 1.2.27? > > Remove the escalation parameter, I guess that's the only 1.2.28 special > param. > >> Regarding recovery_options: Is there a default value it's set to? On >> the link http://tomcat.apache.org/connectors-doc/reference/workers.html >> it doesn't have option "7" > > Yes, the default is "0" and that's bad. > >> Regarding ping_mode: >> What happens when Cping returns error for ping_mode "C"? Does it send >> that user request that's using that connection to other lb node? > > Yes after retries, because if not CPong is received the node is ery > likely broken. > >> Wouldn't using "Pre Post" be the best thing to do? > > Both. Connect cping is done after the initial connection setup, prepost > cping is done directly before each followup request (2nd, 3rd, ...). > >> On Wed, Oct 28, 2009 at 10:55 AM, Rainer Jung >> wrote: >>> On 28.10.2009 17:29, Mohit Anchlia wrote: >>>> Based on what I have seen is that we often get HTTP code 502 and by >>>> increasing socket timeout those errors disappear. I am not sure why >>>> that happens. >>>> >>>> Based on the feedback I got it looks like the below properties file is >>>> ok except the socket timeout piece and I should probably remove that? >>> >>> Yes. See below. >>> >>>> Here is workers.properties file: >>>> ## >>>> worker.list=status,tc >>>> >>>> ## Worker Configuration## >>>> >>>> # All entries in this section take the form: >>>> # worker..= >>>> # Worker names are defined in the worker.list directive above. >>>> >>>> >>>> # Configuration specifying the worker named "status" as a status worker. >>>> # This worker can be used to administer the other configured workers. >>>> worker.status.type=status >>>> >>>> >>>> # Configuration for the default load balancer worker. >>>> # Uncomment the configuration for the "tc" >>>> # worker, and the two "node" workers below to enable. >>>> # Also add "lb" to the workers.list directive >>>> # above. The default for the load balancer worker is >>>> # round-robin distribution of requests over >>>> # all active nodes. There are currently two nodes set >>>> # up for the load balanced worker, add more >>>> # to this list if required. Sticky sessions is defaulted to true. >>>> worker.tc.type=lb >>>> worker.tc.balance_workers=appfe1,appfe2,appfe3,appfe4 >>>> >>>> worker.tc.sticky_session=true >>> >>> That's default, but setting it does not harm. >>> >>>> # Two load balanced workers, called node1 and node2. >>>> # Copy the configurations and add to the >>>> # worker.tc.balanced_workers >>>> # list above to add more nodes to the Tomcat cluster. >>> >>> Think about using a template, which makes config management easier: >>> >>> # template >>> worker.template.type=ajp13 >>> worker.template.port=8009 >>> worker.template.socket_timeout=5 >>> worker.template.socket_keepalive=true >>> worker.template.prepost_timeout=5 >>> worker.template.connect_timeout=5000 >>> worker.template.retries=3 >>> worker.template.recycle_timeout=900 >>> >>> then >>> >>> worker.appfe1.reference=worker.template >>> worker.appfe1.host=appfe1 >>> >>> worker.appfe2.reference=worker.template >>> worker.appfe2.host=appfe2 >>> >>> ... >>> >>> Concerning the following config: prepost timeout is in milliseconds. 5 >>> is way to short. >>> >>>> # appfe1 >>>> worker.appfe1.type=ajp13 >>>> worker.appfe1.port=8009 >>>> worker.appfe1.host=appfe1 >>>> worker.appfe1.socket_timeout=5 >>>> worker.appfe1.socket_keepalive=true >>>> worker.appfe1.prepost_timeout=5 >>>> worker.appfe1.connect_timeout=5000 >>>> worker.appfe1.retries=3 >>>> worker.appfe1.recycle_timeout=900 >>>> >>
Re: So many timeout values
Thanks a lot! Would this work with 1.2.27? Regarding recovery_options: Is there a default value it's set to? On the link http://tomcat.apache.org/connectors-doc/reference/workers.html it doesn't have option "7" Regarding ping_mode: What happens when Cping returns error for ping_mode "C"? Does it send that user request that's using that connection to other lb node? Wouldn't using "Pre Post" be the best thing to do? On Wed, Oct 28, 2009 at 10:55 AM, Rainer Jung wrote: > On 28.10.2009 17:29, Mohit Anchlia wrote: >> Based on what I have seen is that we often get HTTP code 502 and by >> increasing socket timeout those errors disappear. I am not sure why >> that happens. >> >> Based on the feedback I got it looks like the below properties file is >> ok except the socket timeout piece and I should probably remove that? > > Yes. See below. > >> Here is workers.properties file: >> ## >> worker.list=status,tc >> >> ## Worker Configuration## >> >> # All entries in this section take the form: >> # worker..= >> # Worker names are defined in the worker.list directive above. >> >> >> # Configuration specifying the worker named "status" as a status worker. >> # This worker can be used to administer the other configured workers. >> worker.status.type=status >> >> >> # Configuration for the default load balancer worker. >> # Uncomment the configuration for the "tc" >> # worker, and the two "node" workers below to enable. >> # Also add "lb" to the workers.list directive >> # above. The default for the load balancer worker is >> # round-robin distribution of requests over >> # all active nodes. There are currently two nodes set >> # up for the load balanced worker, add more >> # to this list if required. Sticky sessions is defaulted to true. >> worker.tc.type=lb >> worker.tc.balance_workers=appfe1,appfe2,appfe3,appfe4 >> >> worker.tc.sticky_session=true > > That's default, but setting it does not harm. > >> # Two load balanced workers, called node1 and node2. >> # Copy the configurations and add to the >> # worker.tc.balanced_workers >> # list above to add more nodes to the Tomcat cluster. > > Think about using a template, which makes config management easier: > > # template > worker.template.type=ajp13 > worker.template.port=8009 > worker.template.socket_timeout=5 > worker.template.socket_keepalive=true > worker.template.prepost_timeout=5 > worker.template.connect_timeout=5000 > worker.template.retries=3 > worker.template.recycle_timeout=900 > > then > > worker.appfe1.reference=worker.template > worker.appfe1.host=appfe1 > > worker.appfe2.reference=worker.template > worker.appfe2.host=appfe2 > > ... > > Concerning the following config: prepost timeout is in milliseconds. 5 > is way to short. > >> # appfe1 >> worker.appfe1.type=ajp13 >> worker.appfe1.port=8009 >> worker.appfe1.host=appfe1 >> worker.appfe1.socket_timeout=5 >> worker.appfe1.socket_keepalive=true >> worker.appfe1.prepost_timeout=5 >> worker.appfe1.connect_timeout=5000 >> worker.appfe1.retries=3 >> worker.appfe1.recycle_timeout=900 >> >> # Refererence BHP Apache tuning guide before uncomment the following >> line. The unit of reply_timeout is millisecond. >> #worker.appfe1.reply_timeout=0 >> >> # appfe2 >> worker.appfe2.type=ajp13 >> worker.appfe2.port=8009 >> worker.appfe2.host=appfe2 >> worker.appfe2.socket_timeout=5 >> worker.appfe2.socket_keepalive=true >> worker.appfe2.prepost_timeout=5 >> worker.appfe2.connect_timeout=5000 >> worker.appfe2.retries=3 >> worker.appfe2.recycle_timeout=900 >> >> # Refererence BHP Apache tuning guide before uncomment the following >> line. The unit of reply_timeout is millisecond. >> #worker.appfe2.reply_timeout=0 >> >> # appfe3 >> worker.appfe3.type=ajp13 >> worker.appfe3.port=8009 >> worker.appfe3.host=appfe3 >> worker.appfe3.socket_timeout=5 >> worker.appfe3.socket_keepalive=true >> worker.appfe3.prepost_timeout=5 >> worker.appfe3.connect_timeout=5000 >> worker.appfe3.retries=3 >> worker.appfe3.recycle_timeout=900 >> >> # Refererence BHP Apache tuning guide before uncomment the following >> line. The unit of reply_timeout is millisecond. >> #worker.appfe3.reply_timeout=0 >> >> # appfe4 >> worker.appfe4.type=ajp13 >> worker.appfe4.port=8009 >> worker.appfe4.host=appfe
Re: So many timeout values
Based on what I have seen is that we often get HTTP code 502 and by increasing socket timeout those errors disappear. I am not sure why that happens. Based on the feedback I got it looks like the below properties file is ok except the socket timeout piece and I should probably remove that? Here is workers.properties file: ## worker.list=status,tc ## Worker Configuration## # All entries in this section take the form: # worker..= # Worker names are defined in the worker.list directive above. # Configuration specifying the worker named "status" as a status worker. # This worker can be used to administer the other configured workers. worker.status.type=status # Configuration for the default load balancer worker. # Uncomment the configuration for the "tc" # worker, and the two "node" workers below to enable. # Also add "lb" to the workers.list directive # above. The default for the load balancer worker is # round-robin distribution of requests over # all active nodes. There are currently two nodes set # up for the load balanced worker, add more # to this list if required. Sticky sessions is defaulted to true. worker.tc.type=lb worker.tc.balance_workers=appfe1,appfe2,appfe3,appfe4 worker.tc.sticky_session=true # Two load balanced workers, called node1 and node2. # Copy the configurations and add to the # worker.tc.balanced_workers # list above to add more nodes to the Tomcat cluster. # appfe1 worker.appfe1.type=ajp13 worker.appfe1.port=8009 worker.appfe1.host=appfe1 worker.appfe1.socket_timeout=5 worker.appfe1.socket_keepalive=true worker.appfe1.prepost_timeout=5 worker.appfe1.connect_timeout=5000 worker.appfe1.retries=3 worker.appfe1.recycle_timeout=900 # Refererence BHP Apache tuning guide before uncomment the following line. The unit of reply_timeout is millisecond. #worker.appfe1.reply_timeout=0 # appfe2 worker.appfe2.type=ajp13 worker.appfe2.port=8009 worker.appfe2.host=appfe2 worker.appfe2.socket_timeout=5 worker.appfe2.socket_keepalive=true worker.appfe2.prepost_timeout=5 worker.appfe2.connect_timeout=5000 worker.appfe2.retries=3 worker.appfe2.recycle_timeout=900 # Refererence BHP Apache tuning guide before uncomment the following line. The unit of reply_timeout is millisecond. #worker.appfe2.reply_timeout=0 # appfe3 worker.appfe3.type=ajp13 worker.appfe3.port=8009 worker.appfe3.host=appfe3 worker.appfe3.socket_timeout=5 worker.appfe3.socket_keepalive=true worker.appfe3.prepost_timeout=5 worker.appfe3.connect_timeout=5000 worker.appfe3.retries=3 worker.appfe3.recycle_timeout=900 # Refererence BHP Apache tuning guide before uncomment the following line. The unit of reply_timeout is millisecond. #worker.appfe3.reply_timeout=0 # appfe4 worker.appfe4.type=ajp13 worker.appfe4.port=8009 worker.appfe4.host=appfe4 worker.appfe4.socket_timeout=5 worker.appfe4.socket_keepalive=true worker.appfe4.prepost_timeout=5 worker.appfe4.connect_timeout=5000 worker.appfe4.retries=3 worker.appfe4.recycle_timeout=900 On Tue, Oct 27, 2009 at 1:01 PM, Christopher Schultz wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Mohit, > > On 10/26/2009 6:40 PM, Mohit Anchlia wrote: >> Christopher in one of his earlier replies mentioned that we don't have >> failover set. I am not sure why he said that because we have >> worker.list and also we have loadbalancer set in our >> worker.properties. > > Here is the original workers.properties you listed: > >> worker.host2533.type=ajp13 >> worker.host2533.port=8009 >> worker.host2533.host=host2533 >> worker.host2533.socket_timeout=5 >> worker.host2533.socket_keepalive=true >> worker.host2533.prepost_timeout=5 >> worker.host2533.connect_timeout=5000 >> worker.host2533.retries=3 >> worker.host2533.recycle_timeout=900 > > I see that type=ajp13, not type=lb. I also don't see a worker.list in > there at all. Perhaps you didn't post as much configuration as you think > you did? > > - -chris > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.10 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAkrnUaAACgkQ9CaO5/Lv0PDywQCfd3b03RtlQUjTc3HDAJAbyOlD > a00An0h5vjYzErYfoSc3V5V6/aVSraTg > =IF6M > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: So many timeout values
I read about timeouts but I still have following questions: 1. From 1.2.28 onwards, if I don't set the ping_mode then the request will still be sent to the BE node from workers.list even if that node is down? 2. Does socket_timeout mean how long the socket connection will be kept open? So it actually is like a session timeout? 3. In 1.2.28 is there a way to dynamically tell mod_jk to stop sending new requests to one of the nodes instead of stopping the worker itself? Christopher in one of his earlier replies mentioned that we don't have failover set. I am not sure why he said that because we have worker.list and also we have loadbalancer set in our worker.properties. On Mon, Oct 26, 2009 at 10:54 AM, Mohit Anchlia wrote: > thanks I'll read that and let you know if I have any questions. > > On Mon, Oct 26, 2009 at 9:21 AM, Rainer Jung wrote: >> On 26.10.2009 16:19, Christopher Schultz wrote: >>> On 10/25/2009 12:12 PM, Mohit Anchlia wrote: >>>> I also trying to understand cpong, prepost and all other timeouts. But >>>> it's confusing in terms of which one should be used and which ones can >>>> be left alone. We currently have following values, do you see any >>>> problem? >>> >> ... >> >>> Why assume when you can read the documentation for that setting? >>> >>> http://tomcat.apache.org/connectors-doc/reference/workers.html >> >> and also >> >> http://tomcat.apache.org/connectors-doc/generic_howto/timeouts.html >> >> which tries to collect all necessary infos about timeouts. >> >> Regards, >> >> Rainer >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: So many timeout values
thanks I'll read that and let you know if I have any questions. On Mon, Oct 26, 2009 at 9:21 AM, Rainer Jung wrote: > On 26.10.2009 16:19, Christopher Schultz wrote: >> On 10/25/2009 12:12 PM, Mohit Anchlia wrote: >>> I also trying to understand cpong, prepost and all other timeouts. But >>> it's confusing in terms of which one should be used and which ones can >>> be left alone. We currently have following values, do you see any >>> problem? >> > ... > >> Why assume when you can read the documentation for that setting? >> >> http://tomcat.apache.org/connectors-doc/reference/workers.html > > and also > > http://tomcat.apache.org/connectors-doc/generic_howto/timeouts.html > > which tries to collect all necessary infos about timeouts. > > Regards, > > Rainer > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Status worker not stopping or disabling worker through JkStatus
Thanks. Is the JkShmfile something new? It worked when we had mod_jk 1.25. What is JkshmFile used for? On Sun, Oct 25, 2009 at 8:42 AM, Rainer Jung wrote: > On 25.10.2009 16:00, Mohit Anchlia wrote: >> I think I got it. It was JkShmFile that was missing. > > yes, and the default didn't work, see below. > >> Do you know how load balancing was working then if the status worker >> wasn't running? During our perf test I did see that it was getting >> load balanced. > > Each Apache process will be able to load balance for itself, but the > result will not be coordinated between the various processes. So the > result will be slightly worse and also each process will need to detect > error situations independently. > >> On Sun, Oct 25, 2009 at 7:50 AM, Mohit Anchlia >> wrote: >>> mod_jk 1.27 came with the rpm that we installed on linux. Later we got >>> the binary for mod_jk 1.28 and followed the instructions of copying >>> the .so. Below are the snippet from the properties file. >>> >>> Interesting thing is that setup looks fine. I get the JkStatus page on >>> the browser and it lets me set it to stop. But then it never gets >>> stopped or disabled. I also tried wget but didn't work. It definitely >>> worked in mod_jk 1.25. >>> >>> From logs: >>> >>> -- >>> [Sun Oct 25 07:49:46.459 2009] [5261:3083893600] [error] >>> init_jk::mod_jk.c (3166): Initializing >>> shm:/usr/local/apache2/logs/jk-runtime-status.5261 errno=2. Load >>> balancing workers will not function properly. > > That's the problem. You need to take "error" log lines seriously. > > Regards, > > Rainer > >>> [Sun Oct 25 07:49:46.481 2009] [5261:3083893600] [info] >>> init_jk::mod_jk.c (3183): mod_jk/1.2.28 initialized >>> [Sun Oct 25 07:49:46.614 2009] [5269:3083893600] [error] >>> init_jk::mod_jk.c (3166): Initializing >>> shm:/usr/local/apache2/logs/jk-runtime-status.5269 errno=2. Load >>> balancing workers will not function properly. >>> [Sun Oct 25 07:49:46.633 2009] [5269:3083893600] [info] >>> init_jk::mod_jk.c (3183): mod_jk/1.2.28 initialized >>> -- >>> >>> We use: >>> >>> mod-jk.conf >>> -- >>> JkWorkersFile conf/workers.properties >>> >>> # Where to put jk logs >>> JkLogFile /var/log/apache2/mod_jk.log >>> >>> # Set the jk log level [debug/error/info] >>> JkLogLevel error >>> >>> >>> # Order deny,allow >>> # Deny from all >>> # Allow from localhost >>> Allow from all >>> >>> >>> httpd conf >>> --- >>> >>> Include conf/mod-jk.conf >>> >>> >>> LoadModule jk_module modules/mod_jk.so >>> >>> >>> On Sun, Oct 25, 2009 at 7:34 AM, Rainer Jung >>> wrote: >>>> What's you operating system and how exactly did you configure and make >>>> mod_jk? >>>> >>>> What JK directives do you use in your httpd configuration? >>>> >>>> If you set JkLogLevel to info, are there any log messages during startup? >>>> >>>> Regards, >>>> >>>> Rainer >>>> >>>> On 25.10.2009 15:18, Mohit Anchlia wrote: >>>>> I posted this earlier to old thread. I am posting it with new thread. >>>>> >>>>> Apache 2.2.11, mod_jk/1.2.28: >>>>> >>>>> There seems to be a problem with activation of status worker JkStatus. >>>>> Even after explicitly saying "stopped" for one of the workers the >>>>> "Act" keeps going back and forth. When I refresh that page it keeps >>>>> >>>>> switching between "OK" and "STP". I even tried using wget but that >>>>> doesn't work either. And I still see traffic being sent >>>>> to that worker. >>>>> >>>>> wget: >>>>> >>>>> http://host2535.pharos.in.com/JkStatus?cmd=update&from=list&w=tc&sw=host2532&vwa=2&wf=1&wn=host2532&wr=&wc=&wd=0&mime=txt"; >>>>> >>>>> I have even tried vwa=s. I also tried opening one browser session >>>>> stopping the worker (jkStatus) and then opening a new session to check >>>>> the status. The status still keeps going back and forth. It shows >>>>> "ACT"
So many timeout values
Apache 2.2.11 I also trying to understand cpong, prepost and all other timeouts. But it's confusing in terms of which one should be used and which ones can be left alone. We currently have following values, do you see any problem? worker.host2533.type=ajp13 worker.host2533.port=8009 worker.host2533.host=host2533 worker.host2533.socket_timeout=5 worker.host2533.socket_keepalive=true worker.host2533.prepost_timeout=5 worker.host2533.connect_timeout=5000 worker.host2533.retries=3 worker.host2533.recycle_timeout=900 I am assuming prepost_timeout means that try and connect before making a connection and if that timesout then use other server to send the request. So if server A prepost timeout then try Server B from the worker.list. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Status worker not stopping or disabling worker through JkStatus
I think I got it. It was JkShmFile that was missing. Do you know how load balancing was working then if the status worker wasn't running? During our perf test I did see that it was getting load balanced. On Sun, Oct 25, 2009 at 7:50 AM, Mohit Anchlia wrote: > mod_jk 1.27 came with the rpm that we installed on linux. Later we got > the binary for mod_jk 1.28 and followed the instructions of copying > the .so. Below are the snippet from the properties file. > > Interesting thing is that setup looks fine. I get the JkStatus page on > the browser and it lets me set it to stop. But then it never gets > stopped or disabled. I also tried wget but didn't work. It definitely > worked in mod_jk 1.25. > > From logs: > > -- > [Sun Oct 25 07:49:46.459 2009] [5261:3083893600] [error] > init_jk::mod_jk.c (3166): Initializing > shm:/usr/local/apache2/logs/jk-runtime-status.5261 errno=2. Load > balancing workers will not function properly. > [Sun Oct 25 07:49:46.481 2009] [5261:3083893600] [info] > init_jk::mod_jk.c (3183): mod_jk/1.2.28 initialized > [Sun Oct 25 07:49:46.614 2009] [5269:3083893600] [error] > init_jk::mod_jk.c (3166): Initializing > shm:/usr/local/apache2/logs/jk-runtime-status.5269 errno=2. Load > balancing workers will not function properly. > [Sun Oct 25 07:49:46.633 2009] [5269:3083893600] [info] > init_jk::mod_jk.c (3183): mod_jk/1.2.28 initialized > -- > > We use: > > mod-jk.conf > -- > JkWorkersFile conf/workers.properties > > # Where to put jk logs > JkLogFile /var/log/apache2/mod_jk.log > > # Set the jk log level [debug/error/info] > JkLogLevel error > > > # Order deny,allow > # Deny from all > # Allow from localhost > Allow from all > > > httpd conf > --- > > Include conf/mod-jk.conf > > > LoadModule jk_module modules/mod_jk.so > > > On Sun, Oct 25, 2009 at 7:34 AM, Rainer Jung wrote: >> What's you operating system and how exactly did you configure and make >> mod_jk? >> >> What JK directives do you use in your httpd configuration? >> >> If you set JkLogLevel to info, are there any log messages during startup? >> >> Regards, >> >> Rainer >> >> On 25.10.2009 15:18, Mohit Anchlia wrote: >>> I posted this earlier to old thread. I am posting it with new thread. >>> >>> Apache 2.2.11, mod_jk/1.2.28: >>> >>> There seems to be a problem with activation of status worker JkStatus. >>> Even after explicitly saying "stopped" for one of the workers the >>> "Act" keeps going back and forth. When I refresh that page it keeps >>> >>> switching between "OK" and "STP". I even tried using wget but that >>> doesn't work either. And I still see traffic being sent >>> to that worker. >>> >>> wget: >>> >>> http://host2535.pharos.in.com/JkStatus?cmd=update&from=list&w=tc&sw=host2532&vwa=2&wf=1&wn=host2532&wr=&wc=&wd=0&mime=txt"; >>> >>> I have even tried vwa=s. I also tried opening one browser session >>> stopping the worker (jkStatus) and then opening a new session to check >>> the status. The status still keeps going back and forth. It shows >>> "ACT" and then you refresh it shows "STP" and then you refresh again >>> it shows "ACT". Nothing seems to be working. >>> >>> >>> Is this a known bug? >>> >>> >>> Earlier when we were on previous version of mod_jk this used to work >>> fine. Attached is the screen shot >>> >>> worker.properties >>> >>> worker.list=jkstatus,tc >>> worker.jkstatus.type=status >>> >>> worker.tc.type=lb >>> worker.tc.balance_workers=host2532,host2533 >>> worker.tc.sticky_session=true >>> >>> worker.host2532.type=ajp13 >>> worker.host2532.port=8009 >>> worker.host2532.host=host2532 >>> worker.host2532.socket_timeout=5 >>> worker.host2532.socket_keepalive=true >>> worker.host2532.prepost_timeout=5 >>> worker.host2532.connect_timeout=5000 >>> worker.host2532.retries=3 >>> worker.host2532.recycle_timeout=900 >>> >>> worker.host2533.type=ajp13 >>> worker.host2533.port=8009 >>> worker.host2533.host=host2533 >>> worker.host2533.socket_timeout=5 >>> worker.host2533.socket_keepalive=true >>> worker.host2533.prepost_timeout=5 >>> worker.host2533.connect_timeout=5000 >>> worker.host2533.retries=3 >>> worker.host2533.recycle_timeout=900 >>> >>> httpd conf in VirtualHosts >>> >>> JkMount /JkStatus jkstatus >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Status worker not stopping or disabling worker through JkStatus
mod_jk 1.27 came with the rpm that we installed on linux. Later we got the binary for mod_jk 1.28 and followed the instructions of copying the .so. Below are the snippet from the properties file. Interesting thing is that setup looks fine. I get the JkStatus page on the browser and it lets me set it to stop. But then it never gets stopped or disabled. I also tried wget but didn't work. It definitely worked in mod_jk 1.25. >From logs: -- [Sun Oct 25 07:49:46.459 2009] [5261:3083893600] [error] init_jk::mod_jk.c (3166): Initializing shm:/usr/local/apache2/logs/jk-runtime-status.5261 errno=2. Load balancing workers will not function properly. [Sun Oct 25 07:49:46.481 2009] [5261:3083893600] [info] init_jk::mod_jk.c (3183): mod_jk/1.2.28 initialized [Sun Oct 25 07:49:46.614 2009] [5269:3083893600] [error] init_jk::mod_jk.c (3166): Initializing shm:/usr/local/apache2/logs/jk-runtime-status.5269 errno=2. Load balancing workers will not function properly. [Sun Oct 25 07:49:46.633 2009] [5269:3083893600] [info] init_jk::mod_jk.c (3183): mod_jk/1.2.28 initialized -- We use: mod-jk.conf -- JkWorkersFile conf/workers.properties # Where to put jk logs JkLogFile /var/log/apache2/mod_jk.log # Set the jk log level [debug/error/info] JkLogLevel error #Order deny,allow #Deny from all #Allow from localhost Allow from all httpd conf --- Include conf/mod-jk.conf LoadModule jk_module modules/mod_jk.so On Sun, Oct 25, 2009 at 7:34 AM, Rainer Jung wrote: > What's you operating system and how exactly did you configure and make > mod_jk? > > What JK directives do you use in your httpd configuration? > > If you set JkLogLevel to info, are there any log messages during startup? > > Regards, > > Rainer > > On 25.10.2009 15:18, Mohit Anchlia wrote: >> I posted this earlier to old thread. I am posting it with new thread. >> >> Apache 2.2.11, mod_jk/1.2.28: >> >> There seems to be a problem with activation of status worker JkStatus. >> Even after explicitly saying "stopped" for one of the workers the >> "Act" keeps going back and forth. When I refresh that page it keeps >> >> switching between "OK" and "STP". I even tried using wget but that >> doesn't work either. And I still see traffic being sent >> to that worker. >> >> wget: >> >> http://host2535.pharos.in.com/JkStatus?cmd=update&from=list&w=tc&sw=host2532&vwa=2&wf=1&wn=host2532&wr=&wc=&wd=0&mime=txt"; >> >> I have even tried vwa=s. I also tried opening one browser session >> stopping the worker (jkStatus) and then opening a new session to check >> the status. The status still keeps going back and forth. It shows >> "ACT" and then you refresh it shows "STP" and then you refresh again >> it shows "ACT". Nothing seems to be working. >> >> >> Is this a known bug? >> >> >> Earlier when we were on previous version of mod_jk this used to work >> fine. Attached is the screen shot >> >> worker.properties >> >> worker.list=jkstatus,tc >> worker.jkstatus.type=status >> >> worker.tc.type=lb >> worker.tc.balance_workers=host2532,host2533 >> worker.tc.sticky_session=true >> >> worker.host2532.type=ajp13 >> worker.host2532.port=8009 >> worker.host2532.host=host2532 >> worker.host2532.socket_timeout=5 >> worker.host2532.socket_keepalive=true >> worker.host2532.prepost_timeout=5 >> worker.host2532.connect_timeout=5000 >> worker.host2532.retries=3 >> worker.host2532.recycle_timeout=900 >> >> worker.host2533.type=ajp13 >> worker.host2533.port=8009 >> worker.host2533.host=host2533 >> worker.host2533.socket_timeout=5 >> worker.host2533.socket_keepalive=true >> worker.host2533.prepost_timeout=5 >> worker.host2533.connect_timeout=5000 >> worker.host2533.retries=3 >> worker.host2533.recycle_timeout=900 >> >> httpd conf in VirtualHosts >> >> JkMount /JkStatus jkstatus > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Status worker not stopping or disabling worker through JkStatus
I posted this earlier to old thread. I am posting it with new thread. Apache 2.2.11, mod_jk/1.2.28: There seems to be a problem with activation of status worker JkStatus. Even after explicitly saying "stopped" for one of the workers the "Act" keeps going back and forth. When I refresh that page it keeps switching between "OK" and "STP". I even tried using wget but that doesn't work either. And I still see traffic being sent to that worker. wget: http://host2535.pharos.in.com/JkStatus?cmd=update&from=list&w=tc&sw=host2532&vwa=2&wf=1&wn=host2532&wr=&wc=&wd=0&mime=txt"; I have even tried vwa=s. I also tried opening one browser session stopping the worker (jkStatus) and then opening a new session to check the status. The status still keeps going back and forth. It shows "ACT" and then you refresh it shows "STP" and then you refresh again it shows "ACT". Nothing seems to be working. Is this a known bug? Earlier when we were on previous version of mod_jk this used to work fine. Attached is the screen shot worker.properties worker.list=jkstatus,tc worker.jkstatus.type=status worker.tc.type=lb worker.tc.balance_workers=host2532,host2533 worker.tc.sticky_session=true worker.host2532.type=ajp13 worker.host2532.port=8009 worker.host2532.host=host2532 worker.host2532.socket_timeout=5 worker.host2532.socket_keepalive=true worker.host2532.prepost_timeout=5 worker.host2532.connect_timeout=5000 worker.host2532.retries=3 worker.host2532.recycle_timeout=900 worker.host2533.type=ajp13 worker.host2533.port=8009 worker.host2533.host=host2533 worker.host2533.socket_timeout=5 worker.host2533.socket_keepalive=true worker.host2533.prepost_timeout=5 worker.host2533.connect_timeout=5000 worker.host2533.retries=3 worker.host2533.recycle_timeout=900 httpd conf in VirtualHosts JkMount /JkStatus jkstatus - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk not working as expected - is there a bug??
Resending with more information and attachment: Apache 2.11, mod_jk/1.2.28: There seems to be a problem with activation of status worker JkStatus. Even after explicitly saying "stopped" for one of the workers the "Act" keeps going back and forth. When I refresh that page it keeps switching between "OK" and "STP". I even tried using wget but that doesn't work either. And I still see traffic being sent to that worker. wget: http://host2535.pharos.in.com/JkStatus?cmd=update&from=list&w=tc&sw=host2532&vwa=2&wf=1&wn=host2532&wr=&wc=&wd=0&mime=txt"; I have even tried vwa=s. I also tried opening one browser session stopping the worker (jkStatus) and then opening a new session to check the status. The status still keeps going back and forth. It shows "ACT" and then you refresh it shows "STP" and then you refresh again it shows "ACT". Nothing seems to be working. Is this a known bug? Earlier when we were on previous version of mod_jk this used to work fine. Attached is the screen shot On Sat, Oct 24, 2009 at 7:51 AM, Mohit Anchlia wrote: > Apache 2.11, mod_jk/1.2.28: > > There seems to be a problem with activation of status worker JkStatus. > Even after explicitly saying "stopped" for one of the workers the > "Act" keeps going back and forth. When I refresh that page it keeps > switching between "OK" and "STP". And I still see traffic being sent > to that worker. Is this a known bug? > > Earlier when we were on previous version of mod_jk this > > On Fri, Mar 6, 2009 at 2:02 PM, Rainer Jung wrote: >> On 06.03.2009 21:42, Mohit Anchlia wrote: >>> >>> In addition to questions that I have in below email, I have couple of >>> question. >>> >>> 1. activation property disable - Does it first turn off new requests >>> to that worker and then disable the worker after finishing old >>> requests. So is this the best way to see 0 customer impact? >>> 2. activation propery stopped - Does it throw away existing sessions >>> and also stop taking new requests. >> >> Please read about activation on >> >> http://tomcat.apache.org/connectors-doc/reference/workers.html >> >> Stopped: do not allow any requests being send to the worker. >> >> Disabled: Only requests which carry a session, that is sticky on the worker >> will go the the worker. No other requests will be send there. >> >> Use "disable" to dry out a worker, use "stoppped" directly before you >> actually want to take it out of production. >> >>> Also I couldn't find way to see how mod_jk is behaving in the log >>> file. I turned tracing on for JkLogLevel. >> >> I don't know what you mean by "behaving". >> >> Regards, >> >> Rainer >> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk not working as expected - is there a bug??
Apache 2.11, mod_jk/1.2.28: There seems to be a problem with activation of status worker JkStatus. Even after explicitly saying "stopped" for one of the workers the "Act" keeps going back and forth. When I refresh that page it keeps switching between "OK" and "STP". And I still see traffic being sent to that worker. Is this a known bug? Earlier when we were on previous version of mod_jk this On Fri, Mar 6, 2009 at 2:02 PM, Rainer Jung wrote: > On 06.03.2009 21:42, Mohit Anchlia wrote: >> >> In addition to questions that I have in below email, I have couple of >> question. >> >> 1. activation property disable - Does it first turn off new requests >> to that worker and then disable the worker after finishing old >> requests. So is this the best way to see 0 customer impact? >> 2. activation propery stopped - Does it throw away existing sessions >> and also stop taking new requests. > > Please read about activation on > > http://tomcat.apache.org/connectors-doc/reference/workers.html > > Stopped: do not allow any requests being send to the worker. > > Disabled: Only requests which carry a session, that is sticky on the worker > will go the the worker. No other requests will be send there. > > Use "disable" to dry out a worker, use "stoppped" directly before you > actually want to take it out of production. > >> Also I couldn't find way to see how mod_jk is behaving in the log >> file. I turned tracing on for JkLogLevel. > > I don't know what you mean by "behaving". > > Regards, > > Rainer > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Using multiple DataSource's for fail-over.
I don't think. Did you try shutting down one node? You can also look at netadmin tutorial to see what "FAILOVER" means. On Fri, Sep 4, 2009 at 11:58 AM, Bill Davidson wrote: > Mohit Anchlia wrote: >> >> Something like this: >> >> >> (DESCRIPTION=(FAILOVER=ON)(ADDRESS_LIST=(LOAD_BALANCE=ON)(ADDRESS=(PROTOCOL=TCP)(HOST=x)(PORT=1526))(ADDRESS=(PROTOCOL=TCP)(HOST=)(PORT=1526)))(CONNECT_DATA=(SERVICE_NAME=somesid))) >> >> > > I still haven't been able to locate the documentation, but that seems to > make connections. > > I'm wondering if I need to configure the DBCP connectionProperties > attribute with anything special for fail-over? > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Using multiple DataSource's for fail-over.
Something like this: (DESCRIPTION=(FAILOVER=ON)(ADDRESS_LIST=(LOAD_BALANCE=ON)(ADDRESS=(PROTOCOL=TCP)(HOST=x)(PORT=1526))(ADDRESS=(PROTOCOL=TCP)(HOST=)(PORT=1526)))(CONNECT_DATA=(SERVICE_NAME=somesid))) On Wed, Sep 2, 2009 at 11:53 AM, Mohit Anchlia wrote: > Did you look at Oracle RAC docs? > > On Wed, Sep 2, 2009 at 11:10 AM, Bill Davidson wrote: >> Tim Funk wrote: >>>I thought the Oracle JDBC driver allowed for all the nodes to be placed >>>into the connect string and the driver was smart enough to detect failover. >>>[So its a configuration exercise on the connection string.] >> >> I'm having trouble finding documentation for this capability. Can you >> or someone else provide a pointer? >> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Using multiple DataSource's for fail-over.
Did you look at Oracle RAC docs? On Wed, Sep 2, 2009 at 11:10 AM, Bill Davidson wrote: > Tim Funk wrote: >>I thought the Oracle JDBC driver allowed for all the nodes to be placed >>into the connect string and the driver was smart enough to detect failover. >>[So its a configuration exercise on the connection string.] > > I'm having trouble finding documentation for this capability. Can you > or someone else provide a pointer? > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Access to home page
Yes there was good information. Most of the time I write to forum to see if someone has better or new ideas even though to some it may sound "stupid" :) On Mon, Aug 3, 2009 at 2:54 PM, Christopher Schultz wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Mohit, > > On 7/31/2009 1:07 AM, Mohit Anchlia wrote: >> And you do feel forced to comment. This is a forum and no one is >> forcing you to answer. > > My last post wasn't a complete troll: there's actually good information > in there. But you're right: I'm free to post or not. > > "mohitanch...@gmail.com"->bozo = 1; > > - -chris > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.9 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAkp3XIIACgkQ9CaO5/Lv0PDY2ACeNgMaKGJBVm9oAREC7aoDUt4z > K6IAn1JdPJ9lDn0DO6PwstXxmFoIG0dX > =ov74 > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Access to home page
And you do feel forced to comment. This is a forum and no one is forcing you to answer. On Wed, Jul 29, 2009 at 7:01 AM, Christopher Schultz wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Mohit, > > On 7/29/2009 12:49 AM, Mohit Anchlia wrote: >> How do I setup authentication? > > You sure do ask a lot of questions on the list without reading anything > in advance. If you've read all the responses to all of the stupid > questions you've asked over time, you should have come across this site > at one time or another: > > http://tomcat.apache.org/ > > It's great: you follow the link that takes you to the documentation for > the version of Tomcat you're running and, amazingly, there's > documentation for how to do all kinds of things. > > Unfortunately, the word "authentication" doesn't appear on those pages. > You have to know that "AAA" stands for "authentication, authorization, > and accounting". Here's the link. For the love of god, please read it: > > http://tomcat.apache.org/tomcat-6.0-doc/realm-howto.html > > You should actually start by reading the servlet specification's section > on authentication (it's chapter 12). In fact, read the whole document > before posting again. > > - -chris > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.9 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAkpwVlEACgkQ9CaO5/Lv0PBsSQCfQlWHUUGIGpiVlTSNgLYbPuyY > gvMAoIBLG992YNjms1WJ0Gc67b9O9XT8 > =8mAU > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Access to home page
How do I setup authentication? On Tue, Jul 28, 2009 at 9:32 PM, wrote: > You want authentication > --Original Message-- > From: Mohit Anchlia > To: Tomcat Users List > ReplyTo: Tomcat Users List > Subject: Access to home page > Sent: Jul 28, 2009 21:27 > > tomcat 6: > > How can I limit access to the home page so that people are not able to > access the home page? > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > > > Sent via BlackBerry from T-Mobile > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Access to home page
tomcat 6: How can I limit access to the home page so that people are not able to access the home page? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Stable tomcat release
We are currently using tomcat 6. How do I determine the most recent stable release of tomcat. I am looking at upgrading our tomcat with most recent stable release. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Throttling in mod_jk - Is it possible ?
mod_jk 1.2.25 - Is there a way to throttle traffic in apache. Something where we mention if requests on particular URL exceeded 'x' number then return 'y' message? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk not working as expected - is there a bug??
I am currently testing this. Hoping this will help us achieve 0 customer impact when we upgrade our system. Is it possible for mod_jk to check 2 ports to determine if that worker should be out of service? For eg: if 8010 is down but 8009 port is up then bring that worker out of service? But the data port will continue to be 8009. Here is the problem, to successfully receive the traffic we have 2 dependencies 1. App server (port 8009) and 2. Queue server (port 8010). If anyone of those servers are down then we can't receive the traffic. But mod_jk only knows about 8009. On Fri, Mar 6, 2009 at 2:02 PM, Rainer Jung wrote: > On 06.03.2009 21:42, Mohit Anchlia wrote: >> >> In addition to questions that I have in below email, I have couple of >> question. >> >> 1. activation property disable - Does it first turn off new requests >> to that worker and then disable the worker after finishing old >> requests. So is this the best way to see 0 customer impact? >> 2. activation propery stopped - Does it throw away existing sessions >> and also stop taking new requests. > > Please read about activation on > > http://tomcat.apache.org/connectors-doc/reference/workers.html > > Stopped: do not allow any requests being send to the worker. > > Disabled: Only requests which carry a session, that is sticky on the worker > will go the the worker. No other requests will be send there. > > Use "disable" to dry out a worker, use "stoppped" directly before you > actually want to take it out of production. > >> Also I couldn't find way to see how mod_jk is behaving in the log >> file. I turned tracing on for JkLogLevel. > > I don't know what you mean by "behaving". > > Regards, > > Rainer > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk not working as expected - is there a bug??
In addition to questions that I have in below email, I have couple of question. 1. activation property disable - Does it first turn off new requests to that worker and then disable the worker after finishing old requests. So is this the best way to see 0 customer impact? 2. activation propery stopped - Does it throw away existing sessions and also stop taking new requests. Also I couldn't find way to see how mod_jk is behaving in the log file. I turned tracing on for JkLogLevel. On Fri, Mar 6, 2009 at 10:41 AM, Mohit Anchlia wrote: > Thanks ..I got following URL from the browser, which is different then > what you suggested. Does this look ok? > > http://10.10.80.55/JkStatus?cmd=update&from=list&w=tc&sw=appfe1&wa=0&wf=1&wn=appfe1&wr=&wc=&wd=0 > > so it look like when I want one node out of service I do the following: > > Execute GET > http://10.10.80.55/JkStatus?cmd=update&from=list&w=tc&sw=appfe1&wa=2&wf=1&wn=appfe1&wr=&wc=&wd=0 > > and when I want that node in service I do: > > http://10.10.80.55/JkStatus?cmd=update&from=list&w=tc&sw=appfe1&wa=0&wf=1&wn=appfe1&wr=&wc=&wd=0 > > I tried enabling JkLog to trace but couldn't see where the requests > are being forwarded too? I see something like : > > [Fri Mar 06 10:20:25.377 2009] [673:4143913824] [debug] > ajp_connection_tcp_send_message::jk_ajp_common.c (911): 0180 48 50 > 01 02 85 15 30 24 D1 3E 54 09 54 4C C1 A1 - HP0$.>T.TL.. > [Fri Mar 06 10:20:25.377 2009] [675:4143913824] [debug] > status_get_string::jk_status.c (702): retrieved string arg 'wd' as '0' > [Fri Mar 06 10:20:25.377 2009] [673:4143913824] [debug] > ajp_connection_tcp_send_message::jk_ajp_common.c (911): 0190 7A 09 > 40 B8 B0 82 EA 4A 9F 00 46 2A E5 28 B5 02 - z...@j..f*.(.. > [Fri Mar 06 10:20:25.377 2009] [675:4143913824] [trace] > reset_lb_values::jk_lb_worker.c (257): enter > [Fri Mar 06 10:20:25.377 2009] [673:4143913824] [debug] > ajp_connection_tcp_send_message::jk_ajp_common.c (911): 01a0 15 08 > 40 09 2A A8 18 E2 09 47 28 01 62 C6 14 8A - @.*g(.b... > [Fri Mar 06 10:20:25.377 2009] [675:4143913824] [trace] > reset_lb_values::jk_lb_worker.c (263): exit > [Fri Mar 06 10:20:25.377 2009] [673:4143913824] [debug] > ajp_connection_tcp_send_message::jk_ajp_common.c (911): 01b0 22 49 > 01 CE CF 52 91 12 E4 48 49 A4 2A E0 82 00 - "I...R...HI.*... > > > But I can't tell if the requests to appfe1 are no longer being > directed to appfe1 node. > > On Fri, Mar 6, 2009 at 10:14 AM, Rainer Jung wrote: >> On 06.03.2009 18:57, Mohit Anchlia wrote: >>> >>> So I created new JkMount /JkStatus status under VirtualHost. Went to >>> the page and saw different properties, it looks like I need to change >>> the Activation on individual worker. When I click "E" in front of that >>> worker it takes me to the page where I can edit the activation >>> property. I think if I set it to "stopped" balancer will take it out >>> of service. Only question I have is how can I automatically do that. >> >>> Can I do something like: >> >>> >>> http://10.10.80.55/JkStatus?cmd=edit&from=list&w=tc&sw=appfe1&activation=stopped >> >> Yes you can. All requests to the status worker are GET requests, so >> everything you can do in the GUI you can also put into a script. Simply copy >> the URLs form your browser. >> >> The documentation page also lists all request attributes with their meaning. >> >> According to this page you need to use "vwa=s" instead of >> "activation=stopped" (at least for version 1.2.27; "s" instead of "stopped" >> is not important, but "vwa" instead of "activation" is). >> >> You can also add mime=txt so that your script gets back an easier to >> understand answer. >> >>> or something like that automatically will change the activiation as I >>> move servers in and out of service? >> >> You can write a script for this, that uses the above URLs with a tool like >> e.g. curl. >> >> Caution: >> >> 1) Secure the URL. Your web server has ways to do that, e.g. with a user and >> password. >> >> 2) Activation changes via the status worker are not persistent. When your >> web server is restarted, activation switches back to what is in your >> workers.proprties. If you want to change activation in a persistant way, you >> also have to change your workers.properties. >> >> Regards, >> >> Rainer >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk not working as expected - is there a bug??
Thanks ..I got following URL from the browser, which is different then what you suggested. Does this look ok? http://10.10.80.55/JkStatus?cmd=update&from=list&w=tc&sw=appfe1&wa=0&wf=1&wn=appfe1&wr=&wc=&wd=0 so it look like when I want one node out of service I do the following: Execute GET http://10.10.80.55/JkStatus?cmd=update&from=list&w=tc&sw=appfe1&wa=2&wf=1&wn=appfe1&wr=&wc=&wd=0 and when I want that node in service I do: http://10.10.80.55/JkStatus?cmd=update&from=list&w=tc&sw=appfe1&wa=0&wf=1&wn=appfe1&wr=&wc=&wd=0 I tried enabling JkLog to trace but couldn't see where the requests are being forwarded too? I see something like : [Fri Mar 06 10:20:25.377 2009] [673:4143913824] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (911): 018048 50 01 02 85 15 30 24 D1 3E 54 09 54 4C C1 A1 - HP0$.>T.TL.. [Fri Mar 06 10:20:25.377 2009] [675:4143913824] [debug] status_get_string::jk_status.c (702): retrieved string arg 'wd' as '0' [Fri Mar 06 10:20:25.377 2009] [673:4143913824] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (911): 01907A 09 40 B8 B0 82 EA 4A 9F 00 46 2A E5 28 B5 02 - z...@j..f*.(.. [Fri Mar 06 10:20:25.377 2009] [675:4143913824] [trace] reset_lb_values::jk_lb_worker.c (257): enter [Fri Mar 06 10:20:25.377 2009] [673:4143913824] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (911): 01a015 08 40 09 2A A8 18 E2 09 47 28 01 62 C6 14 8A - @.*g(.b... [Fri Mar 06 10:20:25.377 2009] [675:4143913824] [trace] reset_lb_values::jk_lb_worker.c (263): exit [Fri Mar 06 10:20:25.377 2009] [673:4143913824] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (911): 01b022 49 01 CE CF 52 91 12 E4 48 49 A4 2A E0 82 00 - "I...R...HI.*... But I can't tell if the requests to appfe1 are no longer being directed to appfe1 node. On Fri, Mar 6, 2009 at 10:14 AM, Rainer Jung wrote: > On 06.03.2009 18:57, Mohit Anchlia wrote: >> >> So I created new JkMount /JkStatus status under VirtualHost. Went to >> the page and saw different properties, it looks like I need to change >> the Activation on individual worker. When I click "E" in front of that >> worker it takes me to the page where I can edit the activation >> property. I think if I set it to "stopped" balancer will take it out >> of service. Only question I have is how can I automatically do that. > >> Can I do something like: > >> >> http://10.10.80.55/JkStatus?cmd=edit&from=list&w=tc&sw=appfe1&activation=stopped > > Yes you can. All requests to the status worker are GET requests, so > everything you can do in the GUI you can also put into a script. Simply copy > the URLs form your browser. > > The documentation page also lists all request attributes with their meaning. > > According to this page you need to use "vwa=s" instead of > "activation=stopped" (at least for version 1.2.27; "s" instead of "stopped" > is not important, but "vwa" instead of "activation" is). > > You can also add mime=txt so that your script gets back an easier to > understand answer. > >> or something like that automatically will change the activiation as I >> move servers in and out of service? > > You can write a script for this, that uses the above URLs with a tool like > e.g. curl. > > Caution: > > 1) Secure the URL. Your web server has ways to do that, e.g. with a user and > password. > > 2) Activation changes via the status worker are not persistent. When your > web server is restarted, activation switches back to what is in your > workers.proprties. If you want to change activation in a persistant way, you > also have to change your workers.properties. > > Regards, > > Rainer > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk not working as expected - is there a bug??
So I created new JkMount /JkStatus status under VirtualHost. Went to the page and saw different properties, it looks like I need to change the Activation on individual worker. When I click "E" in front of that worker it takes me to the page where I can edit the activation property. I think if I set it to "stopped" balancer will take it out of service. Only question I have is how can I automatically do that. Can I do something like: http://10.10.80.55/JkStatus?cmd=edit&from=list&w=tc&sw=appfe1&activation=stopped or something like that automatically will change the activiation as I move servers in and out of service? On Fri, Mar 6, 2009 at 12:35 AM, Rainer Jung wrote: > On 06.03.2009 09:27, Mohit Anchlia wrote: >> >> Is there a way to dynamically move workers in and out of service using >> status worker. > > Please first have a look at the status worker and get some experience with > it before posting more basic questions. > > Regards, > > Rainer > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk not working as expected - is there a bug??
I was looking at the manual and didn't see a way to automatically set the worker to stop. I'll test it today with the way you suggested and post more questions .. On Fri, Mar 6, 2009 at 12:35 AM, Rainer Jung wrote: > On 06.03.2009 09:27, Mohit Anchlia wrote: >> >> Is there a way to dynamically move workers in and out of service using >> status worker. > > Please first have a look at the status worker and get some experience with > it before posting more basic questions. > > Regards, > > Rainer > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk not working as expected - is there a bug??
Is there a way to dynamically move workers in and out of service using status worker. On Thu, Mar 5, 2009 at 10:34 PM, Rainer Jung wrote: > On 06.03.2009 01:44, Mohit Anchlia wrote: >> >> Thanks ..But how do I tie the status worker to the list of nodes that >> I have. For eg in below config how do I say that appfe1 is now >> "stopped" and still keep servicing appfe2,3 and 4 >> >> >> worker.status.type=status >> worker.tc.type=lb >> worker.tc.balance_workers=appfe1,appfe2,appfe3,appfe4 >> worker.tc.sticky_session=true > > mount the worker named status to a URL, e.g. > > JkMount /mystatus status > > and then point your browser to this URL. It will show you a GUI, where you > can edit the settings. E.g. there will be a block of data for the worker > "tc", and there you can see a drop down list of attributes to edt. Choose > activation then you get a page on which you can edit the activations of all > members of "tc". > > See: > > http://tomcat.apache.org/connectors-doc/reference/status.html > > Regards, > > Rainer > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk not working as expected - is there a bug??
Thanks ..But how do I tie the status worker to the list of nodes that I have. For eg in below config how do I say that appfe1 is now "stopped" and still keep servicing appfe2,3 and 4 worker.status.type=status worker.tc.type=lb worker.tc.balance_workers=appfe1,appfe2,appfe3,appfe4 worker.tc.sticky_session=true On Thu, Mar 5, 2009 at 4:07 PM, Rainer Jung wrote: > On 05.03.2009 23:57, Mohit Anchlia wrote: >> >> So I tested again and it looks like Jboss accepts new connection when >> it already undeployed the service. Do you have any advice of how I can >> handle this scenario. I need to cleanly take that node out of service >> from mod_jk with no customer impact. Is there anyway in apache to do >> that so that it detects below scenario ..any possible way? Thanks for >> your help. >> >> I see the following of http code 503: >> > ... > > Use the status worker and set the node to "stopped". All requests to the > status worker are GET requests, so you can easily script/automate them. > > That's the cleanest way. > > Regards, > > Rainer > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk not working as expected - is there a bug??
So I tested again and it looks like Jboss accepts new connection when it already undeployed the service. Do you have any advice of how I can handle this scenario. I need to cleanly take that node out of service from mod_jk with no customer impact. Is there anyway in apache to do that so that it detects below scenario ..any possible way? Thanks for your help. I see the following of http code 503: JBossWeb/2.0.0.GA_CP01 - Error report<!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--> HTTP Status 503 - This application is not currently availabletype Status reportmessage This application is not currently availabledescription The requested service (This application is not currently available) is not currently available.JBossWeb/2.0.0.GA_CP01 On Mon, Mar 2, 2009 at 5:01 PM, Rainer Jung wrote: > On 03.03.2009 01:45, Mohit Anchlia wrote: >> >> Is there a way to configure ping in workers.properties to also check >> for 503 in addition to cping/cpong? I am sure you are going to laugh >> at me. > > No I'm not laughing, but as I wrote, at the time Tomcat returns the cpong, > there is no http status. There isn't yet a request. > > So this feature doesn't make sense. > > Regards, > > Rainer > >> On Mon, Mar 2, 2009 at 1:26 PM, Rainer Jung >> wrote: >>> >>> On 02.03.2009 20:28, Mohit Anchlia wrote: >>>> >>>> I will change the JkLogLevel and post the results. I have a question >>>> though: Does prepost_timeout also detect if it received http code such >>>> as 503 from app server. >>> >>> prepost_timeout activates Cping/Cpong before each request. mod_jk will >>> send >>> a tiny test packet to the ap server before each request, and the AJP >>> protocol stack of the app server will immediately respond with a tiny >>> reply >>> packet, indicating that it is still alive and able to parse AJP messages. >>> The web application itself is not involved in this part of the >>> processing, >>> neither is any http request or response (or their AJP equivalent). >>> >>> So prepose_timeout will detect, if it receives some garbage (anything >>> different from a Cpong packet), but http responses with http status codes >>> are only generated much later and will thus not influence the prepose >>> Cping/Cpong result. >>> >>> See also: >>> >>> http://tomcat.apache.org/connectors-doc/generic_howto/timeouts.html >>> >>> Regards, >>> >>> Rainer >>> >>>> On Wed, Feb 25, 2009 at 9:05 AM, Rainer Jung >>>> wrote: >>>>> >>>>> On 25.02.2009 17:10, Mohit Anchlia wrote: >>>>>> >>>>>> you are right there is a mod-jk.conf. So given my workers.properties >>>>>> file what should I change so that mod_jk detects that app server is >>>>>> down before attempting to send the request. Shouldn't "retries" in >>>>>> workers.properties try to connect to some other app server instead. >>>>> >>>>> Just a wild guess: your prepost timeout of 5 milliseconds produces the >>>>> error >>>>> messages you cited. First correct this timeout, then do another clean >>>>> test >>>>> on your test system. You can even increase JkLogLevel to trace (not in >>>>> production) so we can see exactly what is going on. Do not send many >>>>> requests with JkLogLevel trace, just do a minimal test that shows the >>>>> problem. >>>>> >>>>> The early detection of a broken instance should be possible with your >>>>> configuration. >>>>> >>>>>> Here is mod-jk.conf >>>>>> >>>>>> # Where to find workers.properties >>>>>> JkWorkersFile conf/workers.properties >>>>>> >>>>>> # Where to put jk logs >>>>>> JkLogFile /var/log/apache2/mod_jk.log >>>>>> >>>>>> # Set the jk log level [debug/e
Re: mod_jk not working as expected - is there a bug??
Is there a way to configure ping in workers.properties to also check for 503 in addition to cping/cpong? I am sure you are going to laugh at me. On Mon, Mar 2, 2009 at 1:26 PM, Rainer Jung wrote: > On 02.03.2009 20:28, Mohit Anchlia wrote: >> >> I will change the JkLogLevel and post the results. I have a question >> though: Does prepost_timeout also detect if it received http code such >> as 503 from app server. > > prepost_timeout activates Cping/Cpong before each request. mod_jk will send > a tiny test packet to the ap server before each request, and the AJP > protocol stack of the app server will immediately respond with a tiny reply > packet, indicating that it is still alive and able to parse AJP messages. > The web application itself is not involved in this part of the processing, > neither is any http request or response (or their AJP equivalent). > > So prepose_timeout will detect, if it receives some garbage (anything > different from a Cpong packet), but http responses with http status codes > are only generated much later and will thus not influence the prepose > Cping/Cpong result. > > See also: > > http://tomcat.apache.org/connectors-doc/generic_howto/timeouts.html > > Regards, > > Rainer > >> On Wed, Feb 25, 2009 at 9:05 AM, Rainer Jung >> wrote: >>> >>> On 25.02.2009 17:10, Mohit Anchlia wrote: >>>> >>>> you are right there is a mod-jk.conf. So given my workers.properties >>>> file what should I change so that mod_jk detects that app server is >>>> down before attempting to send the request. Shouldn't "retries" in >>>> workers.properties try to connect to some other app server instead. >>> >>> Just a wild guess: your prepost timeout of 5 milliseconds produces the >>> error >>> messages you cited. First correct this timeout, then do another clean >>> test >>> on your test system. You can even increase JkLogLevel to trace (not in >>> production) so we can see exactly what is going on. Do not send many >>> requests with JkLogLevel trace, just do a minimal test that shows the >>> problem. >>> >>> The early detection of a broken instance should be possible with your >>> configuration. >>> >>>> Here is mod-jk.conf >>>> >>>> # Where to find workers.properties >>>> JkWorkersFile conf/workers.properties >>>> >>>> # Where to put jk logs >>>> JkLogFile /var/log/apache2/mod_jk.log >>>> >>>> # Set the jk log level [debug/error/info] >>>> JkLogLevel error >>>> >>>> # Allow mod_jk worker status reports, with the URL of >>>> http://servername/JkStatus >>>> ## This is very helpful for monitoring purposes, but should be >>>> ## allowed from the local machine. >>>> >>>> Order deny,allow >>>> Deny from all >>>> Allow from localhost >>>> >>>> >>>> #JkMount /JkStatus status >>>> >>>> # Below line forward all requests to application server >>>> #JkMount /* local >>>> >>>> >>>> On Wed, Feb 25, 2009 at 2:55 AM, Rainer Jung >>>> wrote: >>>>> >>>>> On 25.02.2009 02:47, Mohit Anchlia wrote: >>>>>> >>>>>> In httpd conf I just see JkMount and no other directive. I searched >>>>>> for >>>>>> Jk. >>>>> >>>>> There should be others as well, for instance JkWorkersFile to point to >>>>> your >>>>> workers.properties. The names of the directives are case insensitive, >>>>> they >>>>> can also be in files included to your main httpd configuration file via >>>>> include directives. >>>>> >>>>>> Here is workers.properties file: >>>>> >>>>> ... >>>>>> >>>>>> # appfe1 >>>>> >>>>> ... >>>>>> >>>>>> worker.appfe1.socket_timeout=5 >>>>> >>>>> I generally don't like socket_timeout. Others do :) >>>>> >>>>>> worker.appfe1.prepost_timeout=5 >>>>> >>>>> 5 milliseconds prepost timeout? You're kidding. I assume it should have >>>>> been >>>>> 5000. >>>>> >>>>>> worker.appfe1.recycle_timeout=900 >>>>> >>>>> This is d
Re: mod_jk not working as expected - is there a bug??
I will change the JkLogLevel and post the results. I have a question though: Does prepost_timeout also detect if it received http code such as 503 from app server. On Wed, Feb 25, 2009 at 9:05 AM, Rainer Jung wrote: > On 25.02.2009 17:10, Mohit Anchlia wrote: >> >> you are right there is a mod-jk.conf. So given my workers.properties >> file what should I change so that mod_jk detects that app server is >> down before attempting to send the request. Shouldn't "retries" in >> workers.properties try to connect to some other app server instead. > > Just a wild guess: your prepost timeout of 5 milliseconds produces the error > messages you cited. First correct this timeout, then do another clean test > on your test system. You can even increase JkLogLevel to trace (not in > production) so we can see exactly what is going on. Do not send many > requests with JkLogLevel trace, just do a minimal test that shows the > problem. > > The early detection of a broken instance should be possible with your > configuration. > >> Here is mod-jk.conf >> >> # Where to find workers.properties >> JkWorkersFile conf/workers.properties >> >> # Where to put jk logs >> JkLogFile /var/log/apache2/mod_jk.log >> >> # Set the jk log level [debug/error/info] >> JkLogLevel error >> >> # Allow mod_jk worker status reports, with the URL of >> http://servername/JkStatus >> ## This is very helpful for monitoring purposes, but should be >> ## allowed from the local machine. >> >> Order deny,allow >> Deny from all >> Allow from localhost >> >> >> #JkMount /JkStatus status >> >> # Below line forward all requests to application server >> #JkMount /* local >> >> >> On Wed, Feb 25, 2009 at 2:55 AM, Rainer Jung >> wrote: >>> >>> On 25.02.2009 02:47, Mohit Anchlia wrote: >>>> >>>> In httpd conf I just see JkMount and no other directive. I searched for >>>> Jk. >>> >>> There should be others as well, for instance JkWorkersFile to point to >>> your >>> workers.properties. The names of the directives are case insensitive, >>> they >>> can also be in files included to your main httpd configuration file via >>> include directives. >>> >>>> Here is workers.properties file: >>> >>> ... >>>> >>>> # appfe1 >>> >>> ... >>>> >>>> worker.appfe1.socket_timeout=5 >>> >>> I generally don't like socket_timeout. Others do :) >>> >>>> worker.appfe1.prepost_timeout=5 >>> >>> 5 milliseconds prepost timeout? You're kidding. I assume it should have >>> been >>> 5000. >>> >>>> worker.appfe1.recycle_timeout=900 >>> >>> This is deprecated. Use connection_pool_timeout instead. The value is OK, >>> you should set connectionTimeout on the Tomcat AJP connector to 90 >>> then. >>> >>> Since you are using prefork MPM, you might want to set >>> connection_pool_minsize to 0 if you want to keep the number of >>> established >>> connections low. >>> >>> And the same for the other members of the load balancer. >>> >>>> On Tue, Feb 24, 2009 at 4:50 PM, Rainer Jung >>>> wrote: >>>>> >>>>> On 25.02.2009 00:00, Mohit Anchlia wrote: >>>>>> >>>>>> Reposting: >>>>>> >>>>>> Apache Server - 2.2 >>>>>> Tomcat server 6 >>>>>> Jboss - 4.2 >>>>>> >>>>>> We have Web Servers talking to Jboss App Servers over mod_jk. When we >>>>>> do our patch or upgrade of software we do it in rolling fashion so >>>>>> that there is "0" customer impact. But it looks like mod_jk load >>>>>> balancer on Web server doesn't detect it as soon as Jboss App Server >>>>>> goes down. Our goal is to have 0 customer impact. So my question is >>>>>> what can we do to overcome this problem. Web Server sees Http Error >>>>>> Code 503. >>>>>> >>>>>> Information from log file: >>>>>> >>>>>> [Mon Feb 23 13:39:42.146 2009] [31682:4143745888] [error] >>>>>> ajp_connection_tcp_get_message::jk_ajp_common.c (966): (appfe4) can't >>>>>> receive the response message from tomcat, network problems or tomcat >&g
Re: mod_jk not working as expected - is there a bug??
you are right there is a mod-jk.conf. So given my workers.properties file what should I change so that mod_jk detects that app server is down before attempting to send the request. Shouldn't "retries" in workers.properties try to connect to some other app server instead. Here is mod-jk.conf # Where to find workers.properties JkWorkersFile conf/workers.properties # Where to put jk logs JkLogFile /var/log/apache2/mod_jk.log # Set the jk log level [debug/error/info] JkLogLevel error # Allow mod_jk worker status reports, with the URL of http://servername/JkStatus ## This is very helpful for monitoring purposes, but should be ## allowed from the local machine. Order deny,allow Deny from all Allow from localhost #JkMount /JkStatus status # Below line forward all requests to application server #JkMount /* local On Wed, Feb 25, 2009 at 2:55 AM, Rainer Jung wrote: > On 25.02.2009 02:47, Mohit Anchlia wrote: >> >> In httpd conf I just see JkMount and no other directive. I searched for >> Jk. > > There should be others as well, for instance JkWorkersFile to point to your > workers.properties. The names of the directives are case insensitive, they > can also be in files included to your main httpd configuration file via > include directives. > >> Here is workers.properties file: > > ... >> >> # appfe1 > > ... >> >> worker.appfe1.socket_timeout=5 > > I generally don't like socket_timeout. Others do :) > >> worker.appfe1.prepost_timeout=5 > > 5 milliseconds prepost timeout? You're kidding. I assume it should have been > 5000. > >> worker.appfe1.recycle_timeout=900 > > This is deprecated. Use connection_pool_timeout instead. The value is OK, > you should set connectionTimeout on the Tomcat AJP connector to 90 then. > > Since you are using prefork MPM, you might want to set > connection_pool_minsize to 0 if you want to keep the number of established > connections low. > > And the same for the other members of the load balancer. > >> On Tue, Feb 24, 2009 at 4:50 PM, Rainer Jung >> wrote: >>> >>> On 25.02.2009 00:00, Mohit Anchlia wrote: >>>> >>>> Reposting: >>>> >>>> Apache Server - 2.2 >>>> Tomcat server 6 >>>> Jboss - 4.2 >>>> >>>> We have Web Servers talking to Jboss App Servers over mod_jk. When we >>>> do our patch or upgrade of software we do it in rolling fashion so >>>> that there is "0" customer impact. But it looks like mod_jk load >>>> balancer on Web server doesn't detect it as soon as Jboss App Server >>>> goes down. Our goal is to have 0 customer impact. So my question is >>>> what can we do to overcome this problem. Web Server sees Http Error >>>> Code 503. >>>> >>>> Information from log file: >>>> >>>> [Mon Feb 23 13:39:42.146 2009] [31682:4143745888] [error] >>>> ajp_connection_tcp_get_message::jk_ajp_common.c (966): (appfe4) can't >>>> receive the response message from tomcat, network problems or tomcat >>>> (10.10.81.89:8009) is down (errno=104) >>>> [Mon Feb 23 13:39:42.147 2009] [31682:4143745888] [error] >>>> ajp_service::jk_ajp_common.c (2097): (appfe4) Connecting to tomcat >>>> failed. Tomcat is probably not started or is listening on the wrong >>>> port >>> >>> This means that mod_jk detected that your backend is down and thus puts >>> it >>> into an error state. All following requests will no longer be sent to >>> this >>> backend. Once a minute it will send a request there and try, but as long >>> as >>> it is down this test will not succeed and thus all requests will be sent >>> to >>> other nodes. >>> >>> The first request that gets sent to the backend you stopped might get an >>> error back. If you want to prevent that from happening, use Cping/Cpong: >>> >>> http://tomcat.apache.org/connectors-doc/generic_howto/timeouts.html >>> >>> so we will detect the broken node before actually sending a request >>> there. >>> More details are not possible to give without your JK configuration (Jk >>> directive sin httpd configuration files, workers.properties and if used >>> uriworkermap.properties). >>> >>> The line number of the above message tells me you are using mod_jk >>> 1.2.25. >>> Although there's nothing wrong in principal with 1.2.25, we always try to >>> improve and you might consider switching to 1.2.27. >>> >>> You should also increase your JkLogLevel to info. As long as only >>> occasional >>> info messages are in your log file everything is fine, but once error >>> messages show up, the additional info messages contain useful formation. >>> >>> Regards, >>> >>> Rainer > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk not working as expected - is there a bug??
In httpd conf I just see JkMount and no other directive. I searched for Jk. Here is workers.properties file: ## worker.list=status,tc ## Worker Configuration## # All entries in this section take the form: # worker..= # Worker names are defined in the worker.list directive above. # Configuration specifying the worker named "status" as a status worker. # This worker can be used to administer the other configured workers. worker.status.type=status # Configuration for the default load balancer worker. # Uncomment the configuration for the "tc" # worker, and the two "node" workers below to enable. # Also add "lb" to the workers.list directive # above. The default for the load balancer worker is # round-robin distribution of requests over # all active nodes. There are currently two nodes set # up for the load balanced worker, add more # to this list if required. Sticky sessions is defaulted to true. worker.tc.type=lb worker.tc.balance_workers=appfe1,appfe2,appfe3,appfe4 worker.tc.sticky_session=true # Two load balanced workers, called node1 and node2. # Copy the configurations and add to the # worker.tc.balanced_workers # list above to add more nodes to the Tomcat cluster. # appfe1 worker.appfe1.type=ajp13 worker.appfe1.port=8009 worker.appfe1.host=appfe1 worker.appfe1.socket_timeout=5 worker.appfe1.socket_keepalive=true worker.appfe1.prepost_timeout=5 worker.appfe1.connect_timeout=5000 worker.appfe1.retries=3 worker.appfe1.recycle_timeout=900 # Refererence BHP Apache tuning guide before uncomment the following line. The unit of reply_timeout is millisecond. #worker.appfe1.reply_timeout=0 # appfe2 worker.appfe2.type=ajp13 worker.appfe2.port=8009 worker.appfe2.host=appfe2 worker.appfe2.socket_timeout=5 worker.appfe2.socket_keepalive=true worker.appfe2.prepost_timeout=5 worker.appfe2.connect_timeout=5000 worker.appfe2.retries=3 worker.appfe2.recycle_timeout=900 # Refererence BHP Apache tuning guide before uncomment the following line. The unit of reply_timeout is millisecond. #worker.appfe2.reply_timeout=0 # appfe3 worker.appfe3.type=ajp13 worker.appfe3.port=8009 worker.appfe3.host=appfe3 worker.appfe3.socket_timeout=5 worker.appfe3.socket_keepalive=true worker.appfe3.prepost_timeout=5 worker.appfe3.connect_timeout=5000 worker.appfe3.retries=3 worker.appfe3.recycle_timeout=900 # Refererence BHP Apache tuning guide before uncomment the following line. The unit of reply_timeout is millisecond. #worker.appfe3.reply_timeout=0 # appfe4 worker.appfe4.type=ajp13 worker.appfe4.port=8009 worker.appfe4.host=appfe4 worker.appfe4.socket_timeout=5 worker.appfe4.socket_keepalive=true worker.appfe4.prepost_timeout=5 worker.appfe4.connect_timeout=5000 worker.appfe4.retries=3 worker.appfe4.recycle_timeout=900 # Refererence BHP Apache tuning guide before uncomment the following line. The unit of reply_timeout is millisecond. #worker.appfe4.reply_timeout=0 On Tue, Feb 24, 2009 at 4:50 PM, Rainer Jung wrote: > On 25.02.2009 00:00, Mohit Anchlia wrote: >> >> Reposting: >> >> Apache Server - 2.2 >> Tomcat server 6 >> Jboss - 4.2 >> >> We have Web Servers talking to Jboss App Servers over mod_jk. When we >> do our patch or upgrade of software we do it in rolling fashion so >> that there is "0" customer impact. But it looks like mod_jk load >> balancer on Web server doesn't detect it as soon as Jboss App Server >> goes down. Our goal is to have 0 customer impact. So my question is >> what can we do to overcome this problem. Web Server sees Http Error >> Code 503. >> >> Information from log file: >> >> [Mon Feb 23 13:39:42.146 2009] [31682:4143745888] [error] >> ajp_connection_tcp_get_message::jk_ajp_common.c (966): (appfe4) can't >> receive the response message from tomcat, network problems or tomcat >> (10.10.81.89:8009) is down (errno=104) >> [Mon Feb 23 13:39:42.147 2009] [31682:4143745888] [error] >> ajp_service::jk_ajp_common.c (2097): (appfe4) Connecting to tomcat >> failed. Tomcat is probably not started or is listening on the wrong >> port > > This means that mod_jk detected that your backend is down and thus puts it > into an error state. All following requests will no longer be sent to this > backend. Once a minute it will send a request there and try, but as long as > it is down this test will not succeed and thus all requests will be sent to > other nodes. > > The first request that gets sent to the backend you stopped might get an > error back. If you want to prevent that from happening, use Cping/Cpong: > > http://tomcat.apache.org/connectors-doc/generic_howto/timeouts.html > > so we will detect the broken node before actually sending a request there. > More details are not possible to give without your JK configuration (Jk > direct
mod_jk not working as expected - is there a bug??
Reposting: Apache Server - 2.2 Tomcat server 6 Jboss - 4.2 We have Web Servers talking to Jboss App Servers over mod_jk. When we do our patch or upgrade of software we do it in rolling fashion so that there is "0" customer impact. But it looks like mod_jk load balancer on Web server doesn't detect it as soon as Jboss App Server goes down. Our goal is to have 0 customer impact. So my question is what can we do to overcome this problem. Web Server sees Http Error Code 503. Information from log file: [Mon Feb 23 13:39:42.146 2009] [31682:4143745888] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (966): (appfe4) can't receive the response message from tomcat, network problems or tomcat (10.10.81.89:8009) is down (errno=104) [Mon Feb 23 13:39:42.147 2009] [31682:4143745888] [error] ajp_service::jk_ajp_common.c (2097): (appfe4) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port On Tue, Feb 24, 2009 at 1:41 PM, Rainer Jung wrote: > On 24.02.2009 19:18, Mohit Anchlia wrote: >> >> We have Web Servers talking to Jboss App Servers over mod_jk. When we >> do our patch or upgrade of software we do it in rolling fashion so >> that there is "0" customer impact. But it looks like mod_jk load >> balancer on Web server doesn't detect it as soon as Jboss App Server >> goes down. Our goal is to have 0 customer impact. So my question is >> what can we do to overcome this problem. Web Server sees Http Error >> Code 503. > > No configuration, no version information, no log files: not much we can help > with. > > Also: your message subject is not likely to attract helping people. > > Sorry, > > Rainer > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org