File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes BEA/Weblogic and the fly likes duplicate requests (OR) responses Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "duplicate requests (OR) responses" Watch "duplicate requests (OR) responses" New topic
Author

duplicate requests (OR) responses

Allen Bandela
Ranch Hand

Joined: Feb 16, 2006
Posts: 128

Hello: It took me a while to decide on the subject for this post, as the issue seems to be quite confusing and hard to solve. I looked up the internet with the error message and see posts dating back years, but none having any solution documented. OK, the issue is as follows:

Our app is running on weblogic 10.0. Its a web app with just servlets and jsp's. (no ejb's).

Every so often we see an error in the $DOM/weblogicrestartms.log:
Servlet failed with IOException
weblogic.utils.NestedRuntimeException: Cannot parse POST parameters of request: '/xyz/Example.jsp'
at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.mergePostParams(ServletRequestImpl.java:1816)
at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.parseQueryParams(ServletRequestImpl.java:1703)
...
java.net.ProtocolException: EOF after reading only: '0' of: '71' promised bytes, out of which at least: '0' were already buffered


This leads me to believe that weblogic could not parse the request POST parameters.

I am unable to reproduce the issue when trying the same request. It is intermittent. (I ensured any javascript code is not submitting the request twice as some posts online have suggested.)

Now, I looked at the weblogic access.log to see what it shows. I do find a response 500 being sent. But not just that, for every such response, an immediate success code of 200 is also sent at the same timestamp.
Ex:
ip - - [25/Jul/2009:13:33:13 -0500] "POST /xyz/Example.jsp HTTP/1.1" 500 883
ip - - [25/Jul/2009:13:33:13 -0500] "POST /xyz/Example.jsp HTTP/1.1" 200 45064

Now, I don't know if the user is getting a 500 response or a success. There's one more thing to note that the response ip is that of the content switch.

If anyone have any suggestions, please let me know.

TIA
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6661
    
    5

I debugged something similar recently. Some web browsers / scenarios can cause a duplicate request to hit the server. When this happens, the parameters are not passed to the server. Instead a plain call is made without passing the required data, which might cause the server to return a 500. The user (in my case at least) did not receive the 500 response. The user received the 200 response and was unaware that the browser was making the duplicate request.

The problem turned out to be firebug Disabling it helped. There is also a related problem that has something to do with images and their path. I have not encountered that though.

Does this happen in one JSP alone or all JSPs ? Does it happen for all clients ? Does the header information in the request give any idea about which browser / plugins are used when the request call is made ?


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Allen Bandela
Ranch Hand

Joined: Feb 16, 2006
Posts: 128

Does this happen in one JSP alone or all JSPs ? Does it happen for all clients ? Does the header information in the request give any idea about which browser / plugins are used when the request call is made ?


It seems to happen only to a few JSP's.Requests to most of the JSP's are fine.

As to the question of if it is happening for all clients, how can I tell? The requests are coming through a Content switch (CS), and the IP address given in the access.log is that of the CS, not the actual client. I also read from JavaEE docs that HttpServletRequest.getRemoteAddr() only gives me the IP of the last proxy. I guess there's no way I can find out. The CS logs do not display such information.

The header information if parsed with the methods in the HttpServletRequest can give me the browser name, but if I add this logging info. in prod, I'm afraid its not a good idea as there are too many requests and will fill up the logs.


Allen
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6661
    
    5

Allen Sylvester wrote:
Does this happen in one JSP alone or all JSPs ? Does it happen for all clients ? Does the header information in the request give any idea about which browser / plugins are used when the request call is made ?


It seems to happen only to a few JSP's.Requests to most of the JSP's are fine.

As to the question of if it is happening for all clients, how can I tell? The requests are coming through a Content switch (CS), and the IP address given in the access.log is that of the CS, not the actual client. I also read from JavaEE docs that HttpServletRequest.getRemoteAddr() only gives me the IP of the last proxy. I guess there's no way I can find out. The CS logs do not display such information.

The header information if parsed with the methods in the HttpServletRequest can give me the browser name, but if I add this logging info. in prod, I'm afraid its not a good idea as there are too many requests and will fill up the logs.


Allen



Ah so you have a load balancer and its IP get registered. hmm... if the load balancer balances among several web servers, their log might be able to tell you something about the client ? Other factors to consider are time, resources. Does this happen at a specific time or when memory/CPU is crunched. Might not be related but it should be a useful analysis.

Have you tried to load test these JSPs to check if you can replicate the problem ? A web debugger like charles might help.
Allen Bandela
Ranch Hand

Joined: Feb 16, 2006
Posts: 128

if the load balancer balances among several web servers, their log might be able to tell you something about the client ?


The content switch (load balancer) does not log such info. as IP address of the client.

I checked our monitoring stats and the load is not quite a lot when this issue occurs. For intance the CPU is low, heap usage is only at 70% and number of sessions are not quite high when this error occured. It looks like the error request is occuring just like any other request at any time during the day.

 
Don't get me started about those stupid light bulbs.
 
subject: duplicate requests (OR) responses
 
Similar Threads
Cannot Parse POST parameters
SocketTimeoutException weblogic 9.2
Error 500 and also getting an ISAPI error.
IIS Plugin for weblogic throwing connection pool errors
Limit on Data/Key-Value Pairs in Form Submission