danjk159 / memcached-session-manager

Automatically exported from code.google.com/p/memcached-session-manager
0 stars 0 forks source link

Add async support for tomcat8 #208

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1.On adding memcached session manager in tomcat8 or 7, long polling stopped 
working. Without memcached it works perfectly fine.

2.I am getting following errors in tomcat logs:
java.lang.IllegalStateException: Not supported.
    at org.apache.catalina.connector.Request.startAsync(Request.java:1604) ~[catalina.jar:8.0.5]
    at org.apache.catalina.connector.RequestFacade.startAsync(RequestFacade.java:1037) ~[catalina.jar:8.0.5]
    at org.atmosphere.cpr.AtmosphereRequest.startAsync(AtmosphereRequest.java:692) ~[AtmosphereRequest.class:2.1.4]
    at org.atmosphere.container.Servlet30CometSupport.suspend(Servlet30CometSupport.java:93) ~[Servlet30CometSupport.class:2.1.4]
    at org.atmosphere.container.Servlet30CometSupport.service(Servlet30CometSupport.java:68) ~[Servlet30CometSupport.class:2.1.4]
    at org.atmosphere.cpr.AtmosphereFramework.doCometSupport(AtmosphereFramework.java:1801) ~[AtmosphereFramework.class:2.1.4]
    at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:210) [AtmosphereServlet.class:2.1.4]
    at org.atmosphere.cpr.AtmosphereServlet.doGet(AtmosphereServlet.java:196) [AtmosphereServlet.class:2.1.4]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:618) [servlet-api.jar:na]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:725) [servlet-api.jar:na]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:301) [catalina.jar:8.0.5]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:8.0.5]
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-websocket.jar:8.0.5]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [catalina.jar:8.0.5]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:8.0.5]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) [catalina.jar:8.0.5]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) [catalina.jar:8.0.5]
    at de.javakaffee.web.msm.RequestTrackingContextValve.invoke(RequestTrackingContextValve.java:99) [memcached-session-manager-1.8.1.jar:na]
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503) [catalina.jar:8.0.5]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136) [catalina.jar:8.0.5]
    at de.javakaffee.web.msm.RequestTrackingHostValve.invoke(RequestTrackingHostValve.java:124) [memcached-session-manager-1.8.1.jar:na]
    at de.javakaffee.web.msm.RequestTrackingHostValve.invoke(RequestTrackingHostValve.java:124) [memcached-session-manager-1.8.1.jar:na]
    at de.javakaffee.web.msm.RequestTrackingHostValve.invoke(RequestTrackingHostValve.java:124) [memcached-session-manager-1.8.1.jar:na]
    at de.javakaffee.web.msm.RequestTrackingHostValve.invoke(RequestTrackingHostValve.java:124) [memcached-session-manager-1.8.1.jar:na]
    at de.javakaffee.web.msm.RequestTrackingHostValve.invoke(RequestTrackingHostValve.java:124) [memcached-session-manager-1.8.1.jar:na]
    at de.javakaffee.web.msm.RequestTrackingHostValve.invoke(RequestTrackingHostValve.java:156) [memcached-session-manager-1.8.1.jar:na]
    at de.javakaffee.web.msm.RequestTrackingHostValve.invoke(RequestTrackingHostValve.java:124) [memcached-session-manager-1.8.1.jar:na]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:74) [catalina.jar:8.0.5]
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610) [catalina.jar:8.0.5]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [catalina.jar:8.0.5]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:526) [catalina.jar:8.0.5]
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1017) [tomcat-coyote.jar:8.0.5]
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:652) [tomcat-coyote.jar:8.0.5]
    at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222) [tomcat-coyote.jar:8.0.5]
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1575) [tomcat-coyote.jar:8.0.5]
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1533) [tomcat-coyote.jar:8.0.5]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_45]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_45]
    at java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]

What version of the product are you using? On what operating system?
memcached-session-manager-1.8.1 on ubuntu, this issue is also coming on windows 
machine

Please provide any additional information below.
I am using atmosphere framework for long-polling and websockets. websockets 
works fine, but long polling fails.

Original issue reported on code.google.com by Kartik...@gmail.com on 1 Jun 2014 at 9:48

GoogleCodeExporter commented 8 years ago
Async should be basically supported, at least with reading from the session, 
see issue #75 and this commit: 
https://github.com/magro/memcached-session-manager/commit/5a6b0b6d761dff086010d2
d0ef0bdf29c3f418d9

Have you tried using tomcat7? Perhaps this is missing for tomcat8.

Cheers,
Martin

Original comment by martin.grotzke on 1 Jun 2014 at 11:23

GoogleCodeExporter commented 8 years ago
Hi Martin,

Thank you for quick reply. Yes, it is working perfectly fine with tomcat7. 
Please push this change for tomcat8 also.

Thank you for looking on this.

Regards,
Kartik

Original comment by Kartik...@gmail.com on 2 Jun 2014 at 6:23

GoogleCodeExporter commented 8 years ago
Hi Martin,

Any idea of timeline by when we can see this update in tc8?

Regards,
Kartik

Original comment by Kartik...@gmail.com on 4 Jun 2014 at 7:05

GoogleCodeExporter commented 8 years ago
Hi Kartik,

I should find time for this next week.

Cheers,
Martin

Original comment by martin.grotzke on 4 Jun 2014 at 11:26

GoogleCodeExporter commented 8 years ago
Hi, any updates on this? Sorry to bug you again about this. As I want to go for 
tomcat8.

Original comment by Kartik...@gmail.com on 15 Jun 2014 at 7:59

GoogleCodeExporter commented 8 years ago
It's fixed now, I just released msm 1.8.2 containing this fix.

Original comment by martin.grotzke on 15 Jun 2014 at 10:35

GoogleCodeExporter commented 8 years ago
Its working fine. Thank you for looking into this.

Original comment by Kartik...@gmail.com on 19 Jun 2014 at 5:28