Weblogic不会关闭文件(但会关闭连接)

时间:2016-11-03 12:06:21

标签: java sockets weblogic cxf aix

逗人,

我们遇到了太多未打开的文件'问题。

我们取得了一些进展,但问题仍然存在......

我们在aix上的weblogic上使用cxf。

相关的cxf配置:

<http-conf:conduit name="*.http-conduit">
    <http-conf:client Connection="close" />
</http-conf:conduit>

执行此代码时:

        for(int i=0;i<1300;i++){
            response = callService(request).call();
        }

(我们不打算在生产中使用此代码,但是要解决问题)

- &GT;第一次运行成功;

- &GT;第二次运行暴露了问题

输出:

   netstat| wc -l

首先显示太多套接字保持打开状态(因此cxf配置发生变化)

现在打开的套接字保持稳定+ - 400行,在配置更改之前> 1000

但是...

lsof 2> /dev/null|grep TCP|wc -l

揭露了我们目前遇到的问题

开放套接字的数量是稳定的(因此套接字会关闭)但是打开的文件数量不会......

从托管服务器启动后的319,到引发异常时的+ -1688:

javax.xml.ws.soap.SOAPFaultException: NullPointerException invoking https://tst-cjcsr.just.fgov.be/cjcs-cg-ws/1.0-rc2/: null
    at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:158)
    at com.sun.proxy.$Proxy302.requestCriminalRecord(Unknown Source)
    at be.fgov.just.cjr.application.dossier.DossierBean$1.call(DossierBean.java:226)
    at be.fgov.just.cjr.application.dossier.DossierBean$1.call(DossierBean.java:222)
    at be.fgov.just.cjr.application.dossier.DossierBean.callService(DossierBean.java:153)
    at be.fgov.just.cjr.application.dossier.DossierBean.search(DossierBean.java:99)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:329)
    at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:342)
    at org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
    at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
    at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
    at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
    at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
    at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
    at javax.faces.component.UICommand.broadcast(UICommand.java:315)
    at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
    at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
    at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
    at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:409)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
    at be.fgov.just.cjr.application.authentication.UserbeanEnforceFilter.doFilter(UserbeanEnforceFilter.java:64)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at be.fgov.just.cjr.application.authentication.openam.OpenAmPingFilter.doFilter(OpenAmPingFilter.java:88)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at be.fgov.just.cjr.application.authentication.openam.OpenAmReverifyFilter.doFilter(OpenAmReverifyFilter.java:94)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at be.fgov.just.cjr.application.authentication.openam.OpenAmSessionFilter.doFilter(OpenAmSessionFilter.java:166)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3748)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3714)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2283)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2182)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1491)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:263)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
Caused by: java.lang.NullPointerException: NullPointerException invoking https://tst-cjcsr.just.fgov.be/cjcs-cg-ws/1.0-rc2/: null
    at sun.reflect.GeneratedConstructorAccessor108.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:39)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:527)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:1346)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1335)
    at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
    at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:632)
    at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
    at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:572)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:481)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:382)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:335)
    at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
    at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:136)
    ... 56 more
Caused by: java.lang.NullPointerException
    at weblogic.net.http.HttpURLConnection.getInputStream(HttpURLConnection.java:459)
    at weblogic.net.http.SOAPHttpsURLConnection.getInputStream(SOAPHttpsURLConnection.java:37)
    at weblogic.net.http.HttpURLConnection.getResponseCode(HttpURLConnection.java:1038)
    at org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream.getResponseCode(URLConnectionHTTPConduit.java:266)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.doProcessResponseCode(HTTPConduit.java:1550)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1579)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1520)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1317)
    ... 66 more

如果要提供更多信息,请询问,

非常感谢您解决此问题的任何帮助,

重新启动托管服务器&#39;解决问题&#39;问题但这在生产中没有选择......

TIME_WAIT设置为1(15秒),因此没有解决方案......

S上。

修改

描述了一个部分解决方案at DZone;的确:

ulimit -S -n

输出2000和

procfiles 15728790 | grep rlimit

输出

Current rlimit: 2000 file descriptors

我们现在正在实施他们的解决方案(将ulimit -S -n 65536添加到resetFd()的末尾)但根本原因(套接字泄漏)仍未解决: - /

任何帮助仍然非常感谢...

S上。

0 个答案:

没有答案