Packet misses in Tomcat
Hi, I have been experiencing missing packets during my application testing using Tomcat Server. If someone can help me to identify what is happening, it will be of great value. Issue: Few packets do not reach the application servlet but tomcat receives them. The missing packets reach the HTTP layer and thereafter they disappear. This issue is not frequent but occasionally consistent. For the POSTs of missing packet I am not able to find the entry in localhost_access_log. Version: apache-tomcat-7.0.42 Application entry point: Servlet OS: Windows 7(32 bit) Thanks. - DISCLAIMER: This electronic message and any attachments to this electronic message is intended for the exclusive use of the addressee(s) named herein and may contain legally privileged and confidential information. It is the property of Celstream Systems Private Limited. If you are not the intended recipient, you are hereby strictly notified not to copy, forward, distribute or use this message or any attachments thereto. If you have received this message in error, please delete it and all copies thereof, from your system and notify the sender at Celstream Systems or administrat...@celstream.com immediately. -
Re: Running native JNI calls in parallel from different Tomcat threads
On Jan 5, 2014, at 8:23 PM, Jasmeet Chhabra jasm...@chhabra-inc.com wrote: Hi, I have a Tomcat server that receives many web requests in parallel. The web requests make a native call using JNI to my library. These calls are long running (400 ms each call). What I have noticed is that even though I am getting web requests in parallel, the native calls seem to be serialized. I don't take any locks in the native code that would force serialization. Is there anything in Tomcat that prevents same native calls being called in parallel from separate Tomcat threads? Seems unlikely to me. Perhaps you can give us some basic info about you setup. Start with your JVM, Tomcat version and configuration (minus comments and sensitive info). Also, try taking some thread dumps while the server is busy. Not sure it'll show everything, but it could give you some clues. Dan Thanks, Jas - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Packet misses in Tomcat
Issue: Few packets do not reach the application servlet but tomcat receives them. The missing packets reach the HTTP layer and thereafter they disappear. This issue is not frequent but occasionally consistent. For the POSTs of missing packet I am not able to find the entry in localhost_access_log. How do you know that the packet reaches tomcat if there is no matching entry in localhost_access.log? Does all other access appear in this file? Chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Packet misses in Tomcat
Issue: Few packets do not reach the application servlet but tomcat receives them. The missing packets reach the HTTP layer and thereafter they disappear. This issue is not frequent but occasionally consistent. For the POSTs of missing packet I am not able to find the entry in localhost_access_log. How do you know that the packet reaches tomcat if there is no matching entry in localhost_access.log? Does all other access appear in this file? I could see the packet in the wireshark capture and it has reached HTTP layer so I thought it has reached Tomcat; I may be wrong here. Also, as far as my observation, every hit to the application URLs was getting logged in local access log. Thanks. - DISCLAIMER: This electronic message and any attachments to this electronic message is intended for the exclusive use of the addressee(s) named herein and may contain legally privileged and confidential information. It is the property of Celstream Systems Private Limited. If you are not the intended recipient, you are hereby strictly notified not to copy, forward, distribute or use this message or any attachments thereto. If you have received this message in error, please delete it and all copies thereof, from your system and notify the sender at Celstream Systems or administrat...@celstream.com immediately. - - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Packet misses in Tomcat
Divyaprakash Y wrote: Issue: Few packets do not reach the application servlet but tomcat receives them. The missing packets reach the HTTP layer and thereafter they disappear. This issue is not frequent but occasionally consistent. For the POSTs of missing packet I am not able to find the entry in localhost_access_log. How do you know that the packet reaches tomcat if there is no matching entry in localhost_access.log? Does all other access appear in this file? I could see the packet in the wireshark capture and it has reached HTTP layer so I thought it has reached Tomcat; I may be wrong here. Also, as far as my observation, every hit to the application URLs was getting logged in local access log. And is there anything in the Tomcat error logs ? (Or the Windows Event logs) A HTTP request might be discarded by Tomcat for various reasons (*) before it is ever mapped to an application. In such a case, there is probably also no log of the request in the Access log. But I would expect some error message in the Tomcat error logs. (*) Invalid HTTP request, incomplete request, etc.. If there are really packets being lost somewhere, then for POST requests the request size would not match the Content-length header, and that may be one of these cases. I must say that the packets lost hypothesis sound a bit iffy to me. This is TCP, which should detect missing packets and cause a client connection abort if it was the case. The invalid HTTP request being rejected by Tomcat sounds more probable to me. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: JSVC error
Can somebody please suggest that how can we integrate jsvc with PSI PROBE application in order to have restart functionality Thanks, Vicky On Jan 4, 2014, at 10:16 AM, vicky vicky007aggar...@yahoo.co.in wrote: I'm able to build the jsvc successfully from commons-daemon-1.0.15-native-src file. Thanks for suggesting that . I've configured below in my tomcat startup script with this I am able to start my tomcat without any Segmentation error. I need this JSVC setup in order to start/stop tomcat instance from PSI PROBE application (http://code.google.com/p/psi-probe/) The problem now is that my tomcat is getting started properly with below script even then on PROBE screen i'm seeing the below message. ++ PROBE Message on Wrapper Control link +++ this JVM is not controlled by Java Service Wrapper +++ I was under the impression with JSVC I'm able to start/stop JVM via PROBE but its not happening ,please suggest what wrong I m doing Startup script CATALINA_BASE=/root/test/tomcattest CATALINA_HOME=/root/test/apache-tomcat-7.0.39 cd $CATALINA_BASE ./bin/jsvc \ -cp $CATALINA_HOME/bin/bootstrap.jar:$CATALINA_HOME/bin/tomcat-juli.jar \ -outfile $CATALINA_BASE/logs/catalina.out \ -errfile $CATALINA_BASE/logs/catalina.err \ -Dcatalina.home=$CATALINA_HOME \ -pidfile /root/test/tomcattest/pid \ -Dcatalina.base=$CATALINA_BASE \ -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \ -Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties \ org.apache.catalina.startup.Bootstrap start + From: vicky vicky007aggar...@yahoo.co.in To: Tomcat Users List users@tomcat.apache.org; Tomcat Users List users@tomcat.apache.org Sent: Saturday, 4 January 2014 9:37 AM Subject: Re: JSVC error Thanks everybody for sharing your thoughts Can you also please suggest that out of following which file do I need to download for my Linux machine as I' m not sure which one to select Download link == http://www.apache.org/dist/commons/daemon/source/ commons-daemon-1.0.15-native-src.tar.gz 2013-04-02 14:03 200K GZIP compressed document commons-daemon-1.0.15-native-src.tar.gz.asc 2013-04-02 14:03 230 OpenPGP ASCII armored signature commons-daemon-1.0.15-native-src.tar.gz.md5 2013-04-02 14:03 74 MD5 checksum file commons-daemon-1.0.15-native-src.tar.gz.sha1 2013-04-02 14:03 82 SHA1 checksum file commons-daemon-1.0.15-native-src.zip 2013-04-02 14:03 255K ZIP compressed archive commons-daemon-1.0.15-native-src.zip.asc 2013-04-02 14:03 230 OpenPGP ASCII armored signature commons-daemon-1.0.15-native-src.zip.md5 2013-04-02 14:03 71 MD5 checksum file commons-daemon-1.0.15-native-src.zip.sha12013-04-02 14:03 79 SHA1 checksum file commons-daemon-1.0.15-src.tar.gz 2013-04-02 14:03 284K GZIP compressed document commons-daemon-1.0.15-src.tar.gz.asc 2013-04-02 14:03 230 OpenPGP ASCII armored signature commons-daemon-1.0.15-src.tar.gz.md5 2013-04-02 14:03 67 MD5 checksum file commons-daemon-1.0.15-src.tar.gz.sha12013-04-02 14:03 75 SHA1 checksum file commons-daemon-1.0.15-src.zip2013-04-02 14:03 377K ZIP compressed archive commons-daemon-1.0.15-src.zip.asc2013-04-02 14:03 230 OpenPGP ASCII armored signature commons-daemon-1.0.15-src.zip.md52013-04-02 14:03 64 MD5 checksum file commons-daemon-1.0.15-src.zip.sha1 2013-04-02 14:03 72 SHA1 checksum file Thanks Vicky From: André Warnier a...@ice-sa.com To: Tomcat Users List users@tomcat.apache.org Sent: Friday, 3 January 2014 3:18 AM Subject: Re: JSVC error Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 André, On 12/31/13, 10:04 AM, André Warnier wrote: vicky wrote: Even after defining the $CATALINA_PID $JAVA_HOME variable , i'm still the getting segmentation error(detailed error mentioned below) In my experience, a segmentation fault often occurs when the *binary* that you are trying to run, is not made for the platform on which you are trying to run it. Nah, you get way weirder errors when that happens. jsvc is probably somewhat fragile when it gets unexpected input. While that should probably be fixed, the problem here is very likely to be configuration-related. I was only talking about my experience. I don't usually do weird things. Your mileage may be different. The OP never told us what file jsvc is telling him though. For example on one of our systems : # uname -a Linux server.company.com 2.6.26-2-amd64 #1 SMP Tue Jan 25 05:59:43 UTC 2011
RE: Packet misses in Tomcat
Issue: Few packets do not reach the application servlet but tomcat receives them. The missing packets reach the HTTP layer and thereafter they disappear. This issue is not frequent but occasionally consistent. For the POSTs of missing packet I am not able to find the entry in localhost_access_log. How do you know that the packet reaches tomcat if there is no matching entry in localhost_access.log? Does all other access appear in this file? I could see the packet in the wireshark capture and it has reached HTTP layer so I thought it has reached Tomcat; I may be wrong here. Also, as far as my observation, every hit to the application URLs was getting logged in local access log. And is there anything in the Tomcat error logs ? (Or the Windows Event logs) A HTTP request might be discarded by Tomcat for various reasons (*) before it is ever mapped to an application. In such a case, there is probably also no log of the request in the Access log. But I would expect some error message in the Tomcat error logs. (*) Invalid HTTP request, incomplete request, etc.. If there are really packets being lost somewhere, then for POST requests the request size would not match the Content-length header, and that may be one of these cases. I must say that the packets lost hypothesis sound a bit iffy to me. This is TCP, which should detect missing packets and cause a client connection abort if it was the case. The invalid HTTP request being rejected by Tomcat sounds more probable to me. i I could not find anything (Exception) in tomcat std error log file or any file in the log folder. But I have not checked the Windows event logs. Will do that. Regarding the content length, there is no mismatch as I have validated using Wireshark and also the same packets(In terms of structure) have reached the application previously. W.r.t. the last point, I could see TCP ACK for the received packet in the wireshark and the packet has reached HTTP layer which goes missing thereafter. Is there any configuration to get more logs on the operations happening during the mapping of request to the application? - DISCLAIMER: This electronic message and any attachments to this electronic message is intended for the exclusive use of the addressee(s) named herein and may contain legally privileged and confidential information. It is the property of Celstream Systems Private Limited. If you are not the intended recipient, you are hereby strictly notified not to copy, forward, distribute or use this message or any attachments thereto. If you have received this message in error, please delete it and all copies thereof, from your system and notify the sender at Celstream Systems or administrat...@celstream.com immediately. - - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: rc-10 bug?
Thanks to an email from Martin, I had a strong indicator of where to look. I checked out tomcat 8 from trunk and validated in eclipse in debug mode. (FYI build.properties.default is broken due to missing commons pool, had to tweak a bit). From webappclassloader.java snippet below (line 737), jars[] does not only contain jars, but also any other resources. i added a howTo.txt file in WEB-INF/lib, which results in jars.length will NEVER equal jarModificationTimes.size(). Fix is simple - just filter out the non-jar, non-executable elements b4 comparing. Workaround is equally trivial - remove said elements from the the lib folder. Hope this helps, Peter // Check if JARs have been added or removed WebResource[] jars = resources.listResources(/WEB-INF/lib); if (jars.length jarModificationTimes.size()) { log.info(sm.getString(webappClassLoader.jarsAdded, resources.getContext().getName())); return true; } else if (jars.length jarModificationTimes.size()){ log.info(sm.getString(webappClassLoader.jarsRemoved, resources.getContext().getName())); return true; } for (WebResource jar : jars) { if (jar.getName().endsWith(.jar) jar.isFile() jar.canRead()) {
RE: Packet misses in Tomcat
Issue: Few packets do not reach the application servlet but tomcat receives them. The missing packets reach the HTTP layer and thereafter they disappear. This issue is not frequent but occasionally consistent. For the POSTs of missing packet I am not able to find the entry in localhost_access_log. How do you know that the packet reaches tomcat if there is no matching entry in localhost_access.log? Does all other access appear in this file? I could see the packet in the wireshark capture and it has reached HTTP layer so I thought it has reached Tomcat; I may be wrong here. Also, as far as my observation, every hit to the application URLs was getting logged in local access log. And is there anything in the Tomcat error logs ? (Or the Windows Event logs) A HTTP request might be discarded by Tomcat for various reasons (*) before it is ever mapped to an application. In such a case, there is probably also no log of the request in the Access log. But I would expect some error message in the Tomcat error logs. (*) Invalid HTTP request, incomplete request, etc.. If there are really packets being lost somewhere, then for POST requests the request size would not match the Content-length header, and that may be one of these cases. I must say that the packets lost hypothesis sound a bit iffy to me. This is TCP, which should detect missing packets and cause a client connection abort if it was the case. The invalid HTTP request being rejected by Tomcat sounds more probable to me. i I could not find anything (Exception) in tomcat std error log file or any file in the log folder. But I have not checked the Windows event logs. Will do that. Regarding the content length, there is no mismatch as I have validated using Wireshark and also the same packets(In terms of structure) have reached the application previously. W.r.t. the last point, I could see TCP ACK for the received packet in the wireshark and the packet has reached HTTP layer which goes missing thereafter. What do you mean exactly by the packet has reached HTTP layer ? Are you using the word packet in the TCP/IP sense here, or do you mean HTTP request (composed of one or more TCP/IP packets) ? Does one complete HTTP POST request (headers and body) fit into one TCP packet ? And how exactly do you recognise that some particular packet (or HTTP request) has not been processed by the application ? Do these disappearing requests have some special characteristic that allows you to distinguish them from other requests to the same application ? Or is it so that all the requests for that same application disappear ? Do all the ones that disappear have something in common, that other requests (which do not disappear) do not have ? Suggestion : paste the content of your Tomcat's server.xml file in your next message, after removing any private information such as host name or IP, passwords etc. (Do not send it as attachment, this list often removes them). Actually, I meant HTTP request has reached HTTP Layer. I could recognise the miss as some noticeable activity will happen upon the reception of the request in the application because of which it is easy to identify the misses in this case when compared to other requests. For the query regarding All requests, all requests do not disappear. More importantly, sometimes all requests reach the application when I POST same set of requests. To give a rough picture, 1-2 requests fail in a set of 45-50 requests and this behaviour varies [The request which failed in my one test cycle succeeds in another cycle]. I could see this in Tomcat 7.0 and Tomcat 7.0.42. Here is the server.xml details: ?xml version='1.0' encoding='utf-8'? !-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -- !-- Note: A Server is not itself a Container, so you may not define subcomponents such as Valves at this level. Documentation at /docs/config/server.html -- Server port=8105 shutdown=SHUTDOWN !-- Security listener. Documentation at /docs/config/listeners.html Listener className=org.apache.catalina.security.SecurityListener / -- !--APR library loader. Documentation at /docs/apr.html -- ! Listener