Closed ihudedi closed 2 years ago
Hi @ihudedi, You can always configure the system to run out of memory. Please paste the stack trace and your memory configuration and your system configuration here.
2021-07-29 02:16:21,859 ERROR [http-nio-10086-exec-1] (Http11NioProtocol:175) - Failed to complete processing of a request2021-07-29 02:16:21,859 ERROR [http-nio-10086-exec-1] (Http11NioProtocol:175) - Failed to complete processing of a requestjava.lang.OutOfMemoryError: Java heap space at com.helger.as2servlet.AbstractAS2ReceiveBaseXServletHandler.onRequest(AbstractAS2ReceiveBaseXServletHandler.java:210) ~[as2-servlet-4.7.1.jar!/:4.7.1] at com.helger.xservlet.AbstractXServlet._invokeHandler(AbstractXServlet.java:345) ~[ph-xservlet-9.6.0.jar!/:9.6.0] at com.helger.xservlet.AbstractXServlet.service(AbstractXServlet.java:529) ~[ph-xservlet-9.6.0.jar!/:9.6.0] at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) ~[tomcat-embed-core-9.0.45.jar!/:?] at com.helger.xservlet.AbstractXServlet.service(AbstractXServlet.java:583) ~[ph-xservlet-9.6.0.jar!/:9.6.0] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227) ~[tomcat-embed-core-9.0.45.jar!/:?] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.45.jar!/:?] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-9.0.45.jar!/:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.45.jar!/:?] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.45.jar!/:?] at com.bmc.ctm.mft.b2b.hub.configuration.http.RequestMethodFilter.doFilter(RequestMethodFilter.java:42) ~[classes!/:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.45.jar!/:?] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.45.jar!/:?] at com.bmc.ctm.mft.b2b.hub.configuration.http.B2BEnabledFilter.doFilter(B2BEnabledFilter.java:130) ~[classes!/:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.45.jar!/:?] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.45.jar!/:?] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327) ~[spring-security-web-5.4.6.jar!/:5.4.6] at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115) ~[spring-security-web-5.4.6.jar!/:5.4.6] at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81) ~[spring-security-web-5.4.6.jar!/:5.4.6] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) ~[spring-security-web-5.4.6.jar!/:5.4.6] at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119) ~[spring-security-web-5.4.6.jar!/:5.4.6] at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) ~[spring-security-web-5.4.6.jar!/:5.4.6] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) ~[spring-security-web-5.4.6.jar!/:5.4.6] at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126) ~[spring-security-web-5.4.6.jar!/:5.4.6] at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81) ~[spring-security-web-5.4.6.jar!/:5.4.6] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) ~[spring-security-web-5.4.6.jar!/:5.4.6] at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:105) ~[spring-security-web-5.4.6.jar!/:5.4.6] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) ~[spring-security-web-5.4.6.jar!/:5.4.6] at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149) ~[spring-security-web-5.4.6.jar!/:5.4.6] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) ~[spring-security-web-5.4.6.jar!/:5.4.6] at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) ~[spring-security-web-5.4.6.jar!/:5.4.6] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) ~[spring-security-web-5.4.6.jar!/:5.4.6]2021-07-29 02:16:23,247 ERROR [http-nio-10086-exec-2] (Http11NioProtocol:175) - Failed to complete processing of a requestjava.lang.OutOfMemoryError: Java heap space at com.helger.as2servlet.AbstractAS2ReceiveBaseXServletHandler.onRequest(AbstractAS2ReceiveBaseXServletHandler.java:210) ~[as2-servlet-4.7.1.jar!/:4.7.1] at com.helger.xservlet.AbstractXServlet._invokeHandler(AbstractXServlet.java:345) ~[ph-xservlet-9.6.0.jar!/:9.6.0] at com.helger.xservlet.AbstractXServlet.service(AbstractXServlet.java:529) ~[ph-xservlet-9.6.0.jar!/:9.6.0] at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) ~[tomcat-embed-core-9.0.45.jar!/:?] at com.helger.xservlet.AbstractXServlet.service(AbstractXServlet.java:583) ~[ph-xservlet-9.6.0.jar!/:9.6.0] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227) ~[tomcat-embed-core-9.0.45.jar!/:?] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.45.jar!/:?] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-9.0.45.jar!/:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.45.jar!/:?] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.45.jar!/:?] at com.bmc.ctm.mft.b2b.hub.configuration.http.RequestMethodFilter.doFilter(RequestMethodFilter.java:42) ~[classes!/:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.45.jar!/:?] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.45.jar!/:?] at com.bmc.ctm.mft.b2b.hub.configuration.http.B2BEnabledFilter.doFilter(B2BEnabledFilter.java:130) ~[classes!/:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.45.jar!/:?] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.45.jar!/:?] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327) ~[spring-security-web-5.4.6.jar!/:5.4.6] at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115) ~[spring-security-web-5.4.6.jar!/:5.4.6] at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81) ~[spring-security-web-5.4.6.jar!/:5.4.6] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) ~[spring-security-web-5.4.6.jar!/:5.4.6] at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119) ~[spring-security-web-5.4.6.jar!/:5.4.6] at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) ~[spring-security-web-5.4.6.jar!/:5.4.6] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) ~[spring-security-web-5.4.6.jar!/:5.4.6] at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126) ~[spring-security-web-5.4.6.jar!/:5.4.6] at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81) ~[spring-security-web-5.4.6.jar!/:5.4.6] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) ~[spring-security-web-5.4.6.jar!/:5.4.6] at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:105) ~[spring-security-web-5.4.6.jar!/:5.4.6] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) ~[spring-security-web-5.4.6.jar!/:5.4.6] at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149) ~[spring-security-web-5.4.6.jar!/:5.4.6] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) ~[spring-security-web-5.4.6.jar!/:5.4.6] at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) ~[spring-security-web-5.4.6.jar!/:5.4.6] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) ~[spring-security-web-5.4.6.jar!/:5.4.6]2021-07-29 02:16:24,279 ERROR [http-nio-10086-exec-3] (Http11NioProtocol:175) - Failed to complete processing of a request
I am using 1GB in the xmx I don't have any additioanl param in config? shuld I add something to suport large file The client support sending large file but the server is not working. Thanks, Itay
Hi @phax Do you know if I need to configure something for this? I don't see the largeFileSupport property in the code anymore. Thanks, Itay
Hi @phax I checked with version 4.6.3 and with soccket and not servlet and I can upload large file without any issue. Seems like the servlet save all file in memory instead of the file system as it was in socket. Thanks, Itay
You are right - when using the servlet, the message is read as a full in memory. I will try to find some time to fix this
Hi @phax Do you have estimation when this will be fixed? Thanks, Itay
Hi @phax Any updates regarding this issue? Thanks, Itay
No - unfortunately no update yet. I have it on the back of my head but no time to make it proper atm - sorry
@ihudedi I tried to fix it, and created a 4.8.0-SNAPSHOT
version. Please let me know, if it works for you - if so, I will create a new release
Hi @phax I can't downloads the version because it's snapshot. Could you please modify to 4.8.0 that I can fully tested this FR Thanks, Itay
Okidoki, will do tonight or tomorrow. Will ping you here
Release 4.8.0 is on its way to Maven Central. Should be available in the next 15 minutes.
@ihudedi so, does it work as expected now with v4.8.0?
Hi @phax In version 4.8.0 when asking for MDN we get an error for disposition. MDN is null and in the log we can see the following lines: 2021-11-03 12:30:02,212 INFO [http-nio-10086-exec-6] (AS2Exception:125) - as2-lib 4.8.0 IOException terminated: Failed to read Servlet Request: Invalid HTTP Request (0? *?H?÷) 2021-11-03 12:30:02,212 ERROR [http-nio-10086-exec-6] (AbstractAS2ReceiveBaseXServletHandler:235) - Not having a data source to operate on
This is the error from the client
2021-11-03 12:27:45,483 ERROR [qtp1225568095-26] (HostQuery:515) - Test Upload File failed to host 'dba-tlv-v3f3wm' , Error:Disposition type is empty java.lang.Exception: Test Upload File failed to host 'dba-tlv-v3f3wm' , Error:Disposition type is empty at com.bmc.cm.aft.client.HostQuery.connect(HostQuery.java:446) ~[classes!/:?] at com.bmc.cm.aft.client.HostQuery.validateHost(HostQuery.java:269) ~[classes!/:?] at com.bmc.cm.aft.account.AftAccountValidator.validateHost(AftAccountValidator.java:224) ~[classes!/:?] at com.bmc.cm.aft.account.AftAccountValidator.validateNonGroupAccount(AftAccountValidator.java:176) ~[classes!/:?] at com.bmc.cm.aft.account.AftAccountValidator.validate(AftAccountValidator.java:52) ~[classes!/:?] at com.bmc.cm.aft.account.AftValidateAccountCommand.buildValidateAccountResponseNode(AftValidateAccountCommand.java:78) ~[classes!/:?] at com.bmc.cm.aft.account.AftValidateAccountCommand.call(AftValidateAccountCommand.java:43) ~[classes!/:?] at com.bmc.cm.command.CommandManagerImpl.execute(CommandManagerImpl.java:69) ~[classes!/:?] at com.bmc.cm.invoker.InvokerImpl.invoke(InvokerImpl.java:98) ~[classes!/:?] at com.bmc.cm.invoker.InvokerImpl.handleRequest(InvokerImpl.java:65) ~[classes!/:?] at org.springframework.web.context.support.HttpRequestHandlerServlet.service(HttpRequestHandlerServlet.java:73) ~[spring-web-5.3.6.jar!/:5.3.6] at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[javax.servlet-api-3.1.0.jar!/:3.1.0] at org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1452) ~[jetty-servlet-9.4.40.v20210413.jar!/:9.4.40.v20210413] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:791) ~[jetty-servlet-9.4.40.v20210413.jar!/:9.4.40.v20210413] at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1626) ~[jetty-servlet-9.4.40.v20210413.jar!/:9.4.40.v20210413] at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-5.3.6.jar!/:5.3.6] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.6.jar!/:5.3.6] at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:201) ~[jetty-servlet-9.4.40.v20210413.jar!/:9.4.40.v20210413] at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601) ~[jetty-servlet-9.4.40.v20210413.jar!/:9.4.40.v20210413] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548) ~[jetty-servlet-9.4.40.v20210413.jar!/:9.4.40.v20210413] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[jetty-server-9.4.40.v20210413.jar!/:9.4.40.v20210413] at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602) ~[jetty-security-9.4.40.v20210413.jar!/:9.4.40.v20210413] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[jetty-server-9.4.40.v20210413.jar!/:9.4.40.v20210413] at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) ~[jetty-server-9.4.40.v20210413.jar!/:9.4.40.v20210413] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624) ~[jetty-server-9.4.40.v20210413.jar!/:9.4.40.v20210413] at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) ~[jetty-server-9.4.40.v20210413.jar!/:9.4.40.v20210413] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1435) ~[jetty-server-9.4.40.v20210413.jar!/:9.4.40.v20210413] at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) ~[jetty-server-9.4.40.v20210413.jar!/:9.4.40.v20210413] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501) ~[jetty-servlet-9.4.40.v20210413.jar!/:9.4.40.v20210413] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594) ~[jetty-server-9.4.40.v20210413.jar!/:9.4.40.v20210413] at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) ~[jetty-server-9.4.40.v20210413.jar!/:9.4.40.v20210413] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1350) ~[jetty-server-9.4.40.v20210413.jar!/:9.4.40.v20210413] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[jetty-server-9.4.40.v20210413.jar!/:9.4.40.v20210413] at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146) ~[jetty-server-9.4.40.v20210413.jar!/:9.4.40.v20210413] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[jetty-server-9.4.40.v20210413.jar!/:9.4.40.v20210413] at org.eclipse.jetty.server.Server.handle(Server.java:516) ~[jetty-server-9.4.40.v20210413.jar!/:9.4.40.v20210413] at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388) ~[jetty-server-9.4.40.v20210413.jar!/:9.4.40.v20210413] at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633) [jetty-server-9.4.40.v20210413.jar!/:9.4.40.v20210413] at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380) [jetty-server-9.4.40.v20210413.jar!/:9.4.40.v20210413] at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277) [jetty-server-9.4.40.v20210413.jar!/:9.4.40.v20210413] at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) [jetty-io-9.4.40.v20210413.jar!/:9.4.40.v20210413] at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) [jetty-io-9.4.40.v20210413.jar!/:9.4.40.v20210413] at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) [jetty-io-9.4.40.v20210413.jar!/:9.4.40.v20210413] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:882) [jetty-util-9.4.40.v20210413.jar!/:9.4.40.v20210413] at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1036) [jetty-util-9.4.40.v20210413.jar!/:9.4.40.v20210413] at java.lang.Thread.run(Unknown Source) [?:?] Caused by: com.helger.as2lib.exception.AS2Exception: Disposition type is empty at com.bmc.cm.aft.as2.AS2Utils.fetchMdnFromAS2ClientResponse(AS2Utils.java:428) ~[classes!/:?] at com.bmc.cm.aft.client.wrapper.AS2Wrapper.testUploadFile(AS2Wrapper.java:268) ~[classes!/:?] at com.bmc.cm.aft.client.HostQuery.connect(HostQuery.java:436) ~[classes!/:?] ... 45 more Caused by: com.helger.as2lib.exception.AS2Exception: Disposition type is empty at com.helger.as2lib.disposition.DispositionType.createFromString(DispositionType.java:181) ~[as2-lib-4.8.0.jar!/:4.8.0] at com.helger.as2lib.processor.sender.AS2SenderModule.receiveSyncMDN(AS2SenderModule.java:793) ~[as2-lib-4.8.0.jar!/:4.8.0] at com.helger.as2lib.processor.sender.AS2SenderModule._sendViaHTTP(AS2SenderModule.java:923) ~[as2-lib-4.8.0.jar!/:4.8.0] at com.helger.as2lib.processor.sender.AS2SenderModule.handle(AS2SenderModule.java:991) ~[as2-lib-4.8.0.jar!/:4.8.0] at com.helger.as2lib.client.AS2Client.sendSynchronous(AS2Client.java:470) ~[as2-lib-4.8.0.jar!/:4.8.0] at com.bmc.cm.aft.as2.AS2Utils.uploadFileToAS2Server(AS2Utils.java:358) ~[classes!/:?] at com.bmc.cm.aft.client.wrapper.AS2Wrapper.testUploadFile(AS2Wrapper.java:265) ~[classes!/:?] at com.bmc.cm.aft.client.HostQuery.connect(HostQuery.java:436) ~[classes!/:?] ... 45 more
Hi @phax Did you see this issue? Thanks, Itay
@ihudedi can you please check this with 4.9.1? Thx
Hi @phax Issues was resolved in 4.9.0 I already upgraded to 4.9.1 Thanks, Itay
Hi @phax I know that in the previous version there was support for large files(https://github.com/phax/as2-lib/pull/44) We had to add param in client and server to support send large file (largeFileSupport ) Do you know if it contained in the latest version? I tried to upload 1GB - it failed with OutOfMemoryError in server side when using servlet. Is the change works only with sockets? Thanks, Itay