Solved

java.net.SocketException: Socket Closed exception after 1 minute

Posted on 2009-05-18
8
3,179 Views
Last Modified: 2013-12-10
Hi,

I have a web application deployed on Weblogic 10.0.  In the application there is hyperlink to download a resouce (say an PDF document).  Upon clicking the link, IE shows the Open/Save/Cancel dialog box.  If the Open/Save/Cancel dialog box is not acted upon by the user within 1 min after it pops up, Weblogic is closing the socket. This causes IE to only download a part of the file say 128 KB or something. Whereas the entire file maybe 1MB in size.

If however, user clicks on Open or Save within one minute from the time the dialog box showed up, the file gets downloaded just fine.

I am using IE 8. I have tested on IE 7 as well and the problem is there too.

Is there way to increase this timeout of 1 min?

Thanks,
-Piyush

Here is the stacktrace visible on the console:
 

- java.net.SocketException: Socket closed

at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:99)

at java.net.SocketOutputStream.write(SocketOutputStream.java:136)

at weblogic.servlet.internal.ChunkOutput.writeChunkNoTransfer(ChunkOutput.java:548)

at weblogic.servlet.internal.ChunkOutput.writeChunks(ChunkOutput.java:505)

at weblogic.servlet.internal.ChunkOutput.flush(ChunkOutput.java:382)

at weblogic.servlet.internal.ChunkOutput.checkForFlush(ChunkOutput.java:469)

at weblogic.servlet.internal.ChunkOutput.write(ChunkOutput.java:304)

at weblogic.servlet.internal.ChunkOutputWrapper.write(ChunkOutputWrapper.java:137)

at weblogic.servlet.internal.ServletOutputStreamImpl.write(ServletOutputStreamImpl.java:168)

at com.opensymphony.module.sitemesh.filter.RoutableServletOutputStream.write(RoutableServletOutputStream.java:118)

at com.opensymphony.webwork.dispatcher.StreamResult.doExecute(StreamResult.java:202)

at com.opensymphony.webwork.dispatcher.WebWorkResultSupport.execute(WebWorkResultSupport.java:143)

at com.opensymphony.xwork.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:311)

at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:206)

at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)

at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

at com.opensymphony.xwork.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:168)

at com.opensymphony.xwork.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)

at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

at com.opensymphony.xwork.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:115)

at com.opensymphony.xwork.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)

at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)

at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)

at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)

at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)

at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)

at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)

at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)

at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

at com.opensymphony.xwork.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:186)

at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

at com.opensymphony.xwork.DefaultActionProxy.execute(DefaultActionProxy.java:113)

at com.opensymphony.webwork.dispatcher.DispatcherUtils.serviceAction(DispatcherUtils.java:225)

at com.opensymphony.webwork.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:202)

at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)

at com.idsgrp.profinia.server.useractivity.filter.UserActivityFilter.doFilter(UserActivityFilter.java:41)

at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)

at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)

at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)

at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)

at com.opensymphony.webwork.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:88)

at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)

at com.idsgrp.profinia.serverutil.web.DebugFilter.doFilter(DebugFilter.java:31)

at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)

at com.idsgrp.profinia.server.web.UOWUnregisterFilter.doFilter(UOWUnregisterFilter.java:22)

at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)

at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3368)

at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)

at weblogic.security.service.SecurityManager.runAs(Unknown Source)

at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2117)

at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2023)

at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1359)

at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)

at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
 

java.net.SocketException: Socket closed

at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:99)

at java.net.SocketOutputStream.write(SocketOutputStream.java:136)

at weblogic.servlet.internal.ChunkOutput.writeChunkNoTransfer(ChunkOutput.java:548)

at weblogic.servlet.internal.ChunkOutput.writeChunks(ChunkOutput.java:505)

at weblogic.servlet.internal.ChunkOutput.flush(ChunkOutput.java:382)

at weblogic.servlet.internal.ChunkOutput.checkForFlush(ChunkOutput.java:469)

at weblogic.servlet.internal.ChunkOutput.write(ChunkOutput.java:304)

at weblogic.servlet.internal.ChunkOutputWrapper.write(ChunkOutputWrapper.java:137)

at weblogic.servlet.internal.ServletOutputStreamImpl.write(ServletOutputStreamImpl.java:168)

at com.opensymphony.module.sitemesh.filter.RoutableServletOutputStream.write(RoutableServletOutputStream.java:118)

at com.opensymphony.webwork.dispatcher.StreamResult.doExecute(StreamResult.java:202)

at com.opensymphony.webwork.dispatcher.WebWorkResultSupport.execute(WebWorkResultSupport.java:143)

at com.opensymphony.xwork.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:311)

at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:206)

at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)

at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

at com.opensymphony.xwork.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:168)

at com.opensymphony.xwork.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)

at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

at com.opensymphony.xwork.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:115)

at com.opensymphony.xwork.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)

at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)

at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)

at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)

at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)

at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)

at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)

at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)

at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

at com.opensymphony.xwork.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:186)

at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

at com.opensymphony.xwork.DefaultActionProxy.execute(DefaultActionProxy.java:113)

at com.opensymphony.webwork.dispatcher.DispatcherUtils.serviceAction(DispatcherUtils.java:225)

at com.opensymphony.webwork.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:202)

at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)

at com.idsgrp.profinia.server.useractivity.filter.UserActivityFilter.doFilter(UserActivityFilter.java:41)

at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)

at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)

at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)

at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)

at com.opensymphony.webwork.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:88)

at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)

at com.idsgrp.profinia.serverutil.web.DebugFilter.doFilter(DebugFilter.java:31)

at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)

at com.idsgrp.profinia.server.web.UOWUnregisterFilter.doFilter(UOWUnregisterFilter.java:22)

at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)

at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3368)

at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)

at weblogic.security.service.SecurityManager.runAs(Unknown Source)

at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2117)

at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2023)

at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1359)

at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)

at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)

Open in new window

0
Comment
Question by:p3gasus
  • 4
  • 3
8 Comments
 
LVL 10

Expert Comment

by:rajesh_bala
ID: 24411945
Is it a http or https download?

You might want to increase keepalive timeout value and check it out

http://e-docs.bea.com/wls/docs81/ConsoleHelp/domain_virtualhost_config_http.html

0
 
LVL 10

Expert Comment

by:rajesh_bala
ID: 24412015
0
 
LVL 27

Expert Comment

by:Asta Cu
ID: 24412423
http://e-docs.bea.com/wls/docs100/pdf/plugins.pdf
This for version 10 is an excellent resouce, just search for "keep", quickly find some key options.
0
 

Author Comment

by:p3gasus
ID: 24412634
Rajesh_Bala: it is an http download. and we are on weblogic 10.0

I have tried increasing the <keep-alive-secs> in config.xml of weblogic.  but that is not taking effect.  What is perplexing is why does the socket get closed after 1 min (60 seconds) from the time, IE displays the File Download( Open/Save/Cancel) dialog box.

Any other thoughts?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 10

Expert Comment

by:rajesh_bala
ID: 24412658
well, It has to do with keepalive from my experience. Simple reason is that weblogic would maintain the socket open for sometime (until it gets back some data from client. Or server sending data to client).

If the socket is idle beyond this limit, it would simply close the connection.
0
 
LVL 10

Expert Comment

by:rajesh_bala
ID: 24412672
can you post the screenshot of your keepalive in weblogic console?
0
 

Author Comment

by:p3gasus
ID: 24412953
attaching the screenshot of weblogic console with http keepalive and timeout set
weblogic-keep-alive-time-out.PNG
0
 

Accepted Solution

by:
p3gasus earned 0 total points
ID: 24519109
Found the solution.  The parameter that needs tuning is the CompleteMessageTimeout.  It can be found under: Server -> AdminServer -> Protocols -> General (tab).

This value ranges from 0 to 480 seconds.

Make sure to bounce the server the after the change, even though weblogic console says, No restarts necessary!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Need recommendation for a DNS host provider. 3 83
DANE and Convergence 6 70
Installing Tor browser 15 98
WebBrowser Control in MS Access stopped working on a 64-bit system 11 51
Do you come here a lot? Are you lazy like me and don't want to go through the "trouble" of having to click your Dock's Safari icon and then having to click your Experts Exchange Favorites bookmark to get here? Well then this article is for you.
Several part series to implement Internet Explorer 11 Enterprise Mode
Google currently has a new report that is in beta and coming soon to Webmaster Tool accounts. This Micro Tutorial will highlight new features for Google Webmaster Tools.
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now