Re: Is this a Tomcat problem? Someone please point me in the right direction to solve this problem...
Try burp proxy (Thanks again Mr Yansheng Lin) to see differences. Your server have only one ip ? No NAT on your network ? WAN adress ? My problem is not the same but perhaps it can help you in research : http://www.mail-archive.com/[EMAIL PROTECTED]/msg117526.html Good luck ! De : Chugh, Sanjay [EMAIL PROTECTED] Répondre à : Tomcat Users List [EMAIL PROTECTED] Date : Wed, 4 Feb 2004 12:43:40 -0700 À : Tomcat Users List [EMAIL PROTECTED] Objet : Is this a Tomcat problem? Someone please point me in the right direction to solve this problem... I am part of a large team working on a java project with Tomcat. We are using jdk1.3.1 and Tomcat 4.1.18. The problem is that the latest build of our application has a problem on my machine. I've tracked it down to what seems like a problem with the session. When code that retreives information from the session is executed, it is not giving a valid result back. The part that I am having problem with is that it is a problem only on my machine. In fact if I hit the Tomcat server on my machine from another machine on the network, then everything works fine as well. The same is true if I hit the Tomcat server on my machine from a virtual machine running also on my machine. It is only when I run the application itself on my machine. I did just check one other thing. That is I started IE on my machine but hit the tomcat server on another physical machine. This time the application worked fine on my machine. This is all very confusing, and I am at a loss to explain what is is on my machine or my tomcat server that is causing a problem. I've compared the different machine configuration (they are all pretty similar). The Internet Explore options on all the machines are identical. I would apreciate any ideas someone might have to offer. Thanks, -- Sanjay - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSESSIONID problem.
You say both IE are sames but you seems to have two differents OS windows XP(server 2003 ?) and windows 2000 You've a lot security problems with XP so with cookies too. Try to set the security very low, accept all type of cookies temporaly to be sure it's not a security's windows problem... Papillon De : Chugh, Sanjay [EMAIL PROTECTED] Répondre à : Tomcat Users List [EMAIL PROTECTED] Date : Wed, 4 Feb 2004 15:52:46 -0700 À : Tomcat Users List [EMAIL PROTECTED] Objet : JSESSIONID problem. Thanks. I have changed the subject because it better reflects the problem after some analysis. Thanks to Papillon for suggesting to use burp proxy. However, now I am at a loss to explain the behaviour after analyzing the log from burp proxy. When I run IE on my box and target TomCat on my box, and I click on a link in my app which launches another window, the http header is: == http://schughpc:8080 [10.32.2.41] == GET /Workplace/FormServlet?cmd=blankcontext=form HTTP/1.0 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, */* Referer: http://localhost:8080/Workplace/properties/DocumentForm.jsp?policyObject StoreName=eFormsobjectStoreName=eFormsvsId=%7B0A1D7877-B64B-4927-B698- 9642C6DB6B60%7DwindowId=56657policyId=%7B14CBF1E8-606C-4D7F-AE88-54033 5681DD7%7DreturnUrl=http%3A%2F%2Flocalhost%3A8080%2FWorkplace%2FWcmBrow se.jsp%3FwindowId%3DmainWindowid=%7B8121190B-BF94-454D-92EB-2262A3FD71D E%7D Accept-Language: en-us Proxy-Connection: Keep-Alive User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705) Host: schughpc:8080 == Here you can see the JSESSIONID cookie is missing when it was present in all the headers grabbed by burp proxy prior to this one. When I run IE on another machine but still target TomCat on my machine, the http header for the same request looks like: == http://schughpc:8080 [10.32.2.41] == GET /Workplace/FormServlet?cmd=blankcontext=form HTTP/1.0 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */* Referer: http://schughpc:8080/Workplace/properties/DocumentForm.jsp?policyObjectS toreName=eFormsobjectStoreName=eFormsvsId=%7B0A1D7877-B64B-4927-B698-9 642C6DB6B60%7DwindowId=87588policyId=%7B14CBF1E8-606C-4D7F-AE88-540335 681DD7%7DreturnUrl=http%3A%2F%2Fschughpc%3A8080%2FWorkplace%2FWcmBrowse .jsp%3FwindowId%3DmainWindowid=%7B8121190B-BF94-454D-92EB-2262A3FD71DE% 7D Accept-Language: en-us Proxy-Connection: Keep-Alive User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705) Host: schughpc:8080 Cookie: JSESSIONID=68AF13A9B0FE3C8A200BDB594E753ECC == You can see the cookie is present. The requests afterwards use this cookie and everything works fine. However in the latter case (where the cookie is missing), the next request receives a new cookie and everything starts falling apart. IE on both machine is set up identically. If anyone knows or has any suggestions as to the problem, it would be much appreciated. Thanks, -- Sanjay -Original Message- From: Papillon [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 04, 2004 2:02 PM To: Tomcat Users List Subject: Re: Is this a Tomcat problem? Someone please point me in theright direction to solve this problem... Try burp proxy (Thanks again Mr Yansheng Lin) to see differences. Your server have only one ip ? No NAT on your network ? WAN adress ? My problem is not the same but perhaps it can help you in research : http://www.mail-archive.com/[EMAIL PROTECTED]/msg117526.htm l Good luck ! De : Chugh, Sanjay [EMAIL PROTECTED] Répondre à : Tomcat Users List [EMAIL PROTECTED] Date : Wed, 4 Feb 2004 12:43:40 -0700 À : Tomcat Users List [EMAIL PROTECTED] Objet : Is this a Tomcat problem? Someone please point me in the right direction to solve this problem... I am part of a large team working on a java project with Tomcat. We are using jdk1.3.1 and Tomcat 4.1.18. The problem is that the latest build of our application has a problem on my machine. I've tracked it down to what seems like a problem with the session. When code that retreives information from the session is executed, it is not giving a valid result back. The part that I am having problem with is that it is a problem only on my machine. In fact if I hit the Tomcat server on my machine from another machine on the network, then everything works fine as well. The same is true if I hit the Tomcat server on my machine from a virtual machine running also on my machine. It is only when
RE: Tomcat 5.0.18 : Bad Cookie Names, the return ?
You're right : - No errors when I use http://localhost/appli/servlet/... - Yes, Burp proxy is really cool : HTTP/1.1 200 OK pragma: no cache Set-Cookie: JSESSIONID=9ADF1; Path=/appli Set-Cookie: MySession=vCookies Content-Type: text/html ... When the browser send the next request Path cookie is missing. Only JSESSIONID (phew !!!) and MySession is send : Cookie: MySession=vCookies; JSESSIONID=9ADF1 Watching the error about Path in the Tomcat Traces : 23 janv. 2004 07:12:22 org.apache.coyote.tomcat5.CoyoteAdapter parseCookies GRAVE: Bad Cookie Name: path /Value: / Why only the / appear and not /appli ? Thanks a lot for your help Best regards -Original Message- From: Yansheng Lin [mailto:[EMAIL PROTECTED] Sent: lundi 2 février 2004 18:24 To: 'Tomcat Users List' Subject: RE: Tomcat 5.0.18 : Bad Cookie Names, the return ? Do you get this error when you try to access the webapp inside of your firewall? For example, on the Win2K server itself with http://localhost:80/. Sorry I cannot be much of help there since we use a different network setup, and Apache-Tomcat combo. Speaking of sniffer, I found Burp proxy really cool. -Original Message- From: Papillon [mailto:[EMAIL PROTECTED] Sent: Monday, February 02, 2004 2:59 PM To: 'Tomcat Users List' Subject: RE: Tomcat 5.0.18 : Bad Cookie Names, the return ? Thanks a lot for your answer. I'm using Tomcat-StandAlone (port 80) So, I don't have this type of problems on anothers computers with the same classes and jsdk. I have used a sniffer and all cookies seems to have an argument. I will retry and be carefull on this point. Best regards -Original Message- From: Yansheng Lin [mailto:[EMAIL PROTECTED] Sent: lundi 2 février 2004 17:44 To: 'Tomcat Users List' Subject: RE: Tomcat 5.0.18 : Bad Cookie Names, the return ? Take a look at your request header(or response hearder). In this case, it's more likely to be the request. You are trying to set a cooking with no argument, you web container will throw an IllegalArgumentException. The syntax for cookie in request header: Cookie: NAME1=OPAQUE_STRING1; NAME2=OPAQUE_STRING2 ... Btw, do you use Tomcat-StandAlone or with Apache? -Original Message- From: Papillon [mailto:[EMAIL PROTECTED] Sent: Sunday, February 01, 2004 6:55 AM To: [EMAIL PROTECTED] Subject: Tomcat 5.0.18 : Bad Cookie Names, the return ? I've installed Tomcat 5.0.18 (binary release) and J2SE v 1.4.2_02 on a windows server 2000 OS. When Tomcat receive a request (or respond ?) I have pratically each time this type of error : 23 janv. 2004 07:12:22 org.apache.coyote.tomcat5.CoyoteAdapter parseCookies GRAVE: Bad Cookie Name: expires /Value: Fri java.lang.IllegalArgumentException: Le nom de cookie expires est un token rÚservÚ at javax.servlet.http.Cookie.init(Cookie.java:185) at org.apache.coyote.tomcat5.CoyoteAdapter.parseCookies(CoyoteAdapter.java:424) at org.apache.coyote.tomcat5.CoyoteAdapter.postParseRequest(CoyoteAdapter.java: 332) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:204) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:700) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:683) at java.lang.Thread.run(Thread.java:534) another one (cookie's name is different...) 23 janv. 2004 07:12:22 org.apache.coyote.tomcat5.CoyoteAdapter parseCookies GRAVE: Bad Cookie Name: path /Value: / java.lang.IllegalArgumentException: Le nom de cookie path est un token rÚservÚ at javax.servlet.http.Cookie.init(Cookie.java:185) at java.lang.Thread.run(Thread.java:534) I've undestand that path,expire,domain,etc are reserved names for cookies. All run fine with the same classes on an oldest tomcat version(3.3 who seems to have and similary corrected bug and or a tomcat 4.0.x) or when I copy the complete context (Tomcat 5 rep and Java rep) on anothers machines (windows 2000 pro or Mac OS X). A difference between the server and the computers : The server is behind a firewall and have two adress. All accesses are done by the WAN adress because using NAT. thanks for any informations, any help, any idea ;) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED
RE: Tomcat 5.0.18 : Bad Cookie Names, the return ?
Thanks a lot for your answer. I'm using Tomcat-StandAlone (port 80) So, I don't have this type of problems on anothers computers with the same classes and jsdk. I have used a sniffer and all cookies seems to have an argument. I will retry and be carefull on this point. Best regards -Original Message- From: Yansheng Lin [mailto:[EMAIL PROTECTED] Sent: lundi 2 février 2004 17:44 To: 'Tomcat Users List' Subject: RE: Tomcat 5.0.18 : Bad Cookie Names, the return ? Take a look at your request header(or response hearder). In this case, it's more likely to be the request. You are trying to set a cooking with no argument, you web container will throw an IllegalArgumentException. The syntax for cookie in request header: Cookie: NAME1=OPAQUE_STRING1; NAME2=OPAQUE_STRING2 ... Btw, do you use Tomcat-StandAlone or with Apache? -Original Message- From: Papillon [mailto:[EMAIL PROTECTED] Sent: Sunday, February 01, 2004 6:55 AM To: [EMAIL PROTECTED] Subject: Tomcat 5.0.18 : Bad Cookie Names, the return ? I've installed Tomcat 5.0.18 (binary release) and J2SE v 1.4.2_02 on a windows server 2000 OS. When Tomcat receive a request (or respond ?) I have pratically each time this type of error : 23 janv. 2004 07:12:22 org.apache.coyote.tomcat5.CoyoteAdapter parseCookies GRAVE: Bad Cookie Name: expires /Value: Fri java.lang.IllegalArgumentException: Le nom de cookie expires est un token rÚservÚ at javax.servlet.http.Cookie.init(Cookie.java:185) at org.apache.coyote.tomcat5.CoyoteAdapter.parseCookies(CoyoteAdapter.java:424) at org.apache.coyote.tomcat5.CoyoteAdapter.postParseRequest(CoyoteAdapter.java: 332) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:204) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:700) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:683) at java.lang.Thread.run(Thread.java:534) another one (cookie's name is different...) 23 janv. 2004 07:12:22 org.apache.coyote.tomcat5.CoyoteAdapter parseCookies GRAVE: Bad Cookie Name: path /Value: / java.lang.IllegalArgumentException: Le nom de cookie path est un token rÚservÚ at javax.servlet.http.Cookie.init(Cookie.java:185) at java.lang.Thread.run(Thread.java:534) I've undestand that path,expire,domain,etc are reserved names for cookies. All run fine with the same classes on an oldest tomcat version(3.3 who seems to have and similary corrected bug and or a tomcat 4.0.x) or when I copy the complete context (Tomcat 5 rep and Java rep) on anothers machines (windows 2000 pro or Mac OS X). A difference between the server and the computers : The server is behind a firewall and have two adress. All accesses are done by the WAN adress because using NAT. thanks for any informations, any help, any idea ;) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.0.18 : Bad Cookie Names, the return ?
I've installed Tomcat 5.0.18 (binary release) and J2SE v 1.4.2_02 on a windows server 2000 OS. When Tomcat receive a request (or respond ?) I have pratically each time this type of error : 23 janv. 2004 07:12:22 org.apache.coyote.tomcat5.CoyoteAdapter parseCookies GRAVE: Bad Cookie Name: expires /Value: Fri java.lang.IllegalArgumentException: Le nom de cookie expires est un token rÚservÚ at javax.servlet.http.Cookie.init(Cookie.java:185) at org.apache.coyote.tomcat5.CoyoteAdapter.parseCookies(CoyoteAdapter.java:424) at org.apache.coyote.tomcat5.CoyoteAdapter.postParseRequest(CoyoteAdapter.java: 332) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:204) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:700) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:683) at java.lang.Thread.run(Thread.java:534) another one (cookie's name is different...) 23 janv. 2004 07:12:22 org.apache.coyote.tomcat5.CoyoteAdapter parseCookies GRAVE: Bad Cookie Name: path /Value: / java.lang.IllegalArgumentException: Le nom de cookie path est un token rÚservÚ at javax.servlet.http.Cookie.init(Cookie.java:185) at java.lang.Thread.run(Thread.java:534) I've undestand that path,expire,domain,etc are reserved names for cookies. All run fine with the same classes on an oldest tomcat version(3.3 who seems to have and similary corrected bug and or a tomcat 4.0.x) or when I copy the complete context (Tomcat 5 rep and Java rep) on anothers machines (windows 2000 pro or Mac OS X). A difference between the server and the computers : The server is behind a firewall and have two adress. All accesses are done by the WAN adress because using NAT. thanks for any informations, any help, any idea ;) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: verbose gc
A good article : http://java.sun.com/docs/hotspot/gc1.4.2/ (Java's Sun site) Memory reserved by Tomcat via JVM is cut in three groups (more in reality...) : - Immortal - New object - Old Object Imaging you're reserved 512Mo for Tomcat. If you don't specify dispatch of the memory (at the Tomcat startup) you will be have the following (it's a funny example ^^ and certainly impossible in reality): - Immortal 64Mo - New object 224 Mo - Old Object 224 Mo If your application need to create a lot of immortals Tomcat will crash fastly than if you're are specifying more memory for immortal. Another funny dispatching : - Immortal 224Mo - New object 64 Mo - Old Object 224 Mo If your application need to create a lot of new objects, Tomcat will crash if garbace collector take his time to do his job. Regards, leakim -Original Message- From: Dhruva B. Reddy [mailto:[EMAIL PROTECTED] Sent: dimanche 1 février 2004 17:12 To: Tomcat Users List Subject: RE: verbose gc Check out Jeff Tulley's responses to my post OutOfMemoryError with Seemingly Plenty of Memory. You may also want to check out Sun's forums on the Java Virtual Machine. You will find a host of information on JVM tuning. As I said in my post, we would get the OutOfMemoryError about every 24 hours. I tried setting MaxPermSize to 256MB (haven't been able to determine the default value for Sun's JVM, but it's 64MB for HP's JVM). This sets the size of the permanent generation, into which longer-lived objects and class definitions are loaded (we have over 3500 classes over multiple web apps). I wasn't going to say anything to this list without being more certain, but Tomcat has been running with no problems since Friday afternoon (47 hours as of this writing)--the longest it's lasted all month. HTH, Dhruva --- Mohammed Javid - CTD, Chennai. [EMAIL PROTECTED] wrote: Hi, Thanks for all the help. We did loadtesting of our application running on tomcat 4.1.27 with jdk1.4 on solaris, we enabled the GC stack to get details of how GC works, we ran for 1 users with 5 users logging every 30 secs. We set min and max heap size as 512mb The test ran perfectly for first 2 hours and total heap ocupied was only 10448K out of total of 519168K , later as test case progessed for around 10 hours the tomcat stopped responding and it has thrown OutOfMemoryError , but as can be seen from GC output before outofmemory error the total heap occupied was only 30846K, though we have lot of more space on heap still tomcat crashed and give connectiontimeout for remaining pages. When we see the size occupied from top command , when tomcat is started it was 622Mb and at time of crash it was 723MB. We are looking for following clarifications 1 What could be the reason for tomcat to crash though we have lot of heap remaining. 2 Why the memory occupied as seend from top command increased though there was lot of space on heap 3 We noticed that though heap has space when size seen from top command reached 720 to 270 mb tomcat crashes. 4 How to make tomcat running without crash , certianly heap is not problem in this case 5 Is this a known issue, Any optimization to be done to avoid this problem. The below is the output of the GC after which we get outofmemory error [GC 55404.101: [DefNew Desired survivor size 2621440 bytes, new threshold 31 (max 31) - age 1: 359488 bytes, 359488 total - age 2: 314104 bytes, 673592 total : 167034K-657K(169600K), 0.2717012 secs] 197223K-30846K(519168K), 0.2745516 secs] java.lang.OutOfMemoryError: unable to create new native thread at java.lang.Thread.start(Native Method) at org.apache.catalina.connector.http.HttpProcessor.threadStart(HttpProcessor.j ava:1178) at org.apache.catalina.connector.http.HttpProcessor.start(HttpProcessor.java:12 62) at org.apache.catalina.connector.http.HttpConnector.newProcessor(HttpConnector. java:937) at org.apache.catalina.connector.http.HttpConnector.createProcessor(HttpConnect or.java:868) at org.apache.catalina.connector.http.HttpConnector.run(HttpConnector.java:1075 ) at java.lang.Thread.run(Thread.java:534) thanks and regards, Javid -Original Message- From: Mohammed Javid - CTD, Chennai. Sent: Wednesday, January 14, 2004 10:00 PM To: '[EMAIL PROTECTED]' Subject:RE: verbose gc we are using tomcat 4.1 withjdk1.3, we have folowing clarifications 1) [Full GC 34521K-15504K(38328K), 0.5953540 secs] [GC 27533K-16335K(38328K), 0.0396336 secs] is the statements got in catalina.out by adding -server -verbose:gc in catalina.sh 2) what does the above statements got in catalina.out means, is garbage collection active. When i execute top command on solaris and see the memory it shows size and resisdent memory , what