smaldini/grailsTodos

NIO connector issue

kastork opened this issue · 1 comments

Thanks for this cool demo and the plugins it shows off.

Don't know if this is a bug or what. I've upgraded the project to Grails 2.2.4. When I run the app locally (grails run-app), I see that the tomcat nio protocol handler is being initialized.

2013-08-19 15:37:51,217 [localhost-startStop-1] INFO  navigation.NavigationImpl  - Reloading navigation structure
2013-08-19 15:37:53,383 [localhost-startStop-1] INFO  cpr.AtmosphereFramework  - Installed AtmosphereHandler org.atmosphere.handler.ReflectorServletProcessor mapped to context-path: /*
2013-08-19 15:37:54,538 [localhost-startStop-1] INFO  cpr.AtmosphereFramework  - Atmosphere is using org.atmosphere.cpr.DefaultAnnotationProcessor for processing annotation
2013-08-19 15:37:55,090 [localhost-startStop-1] INFO  cpr.BroadcasterConfig  - ExecutorServices will be shared amongts Broadcasters
2013-08-19 15:37:55,550 [localhost-startStop-1] INFO  cpr.BroadcasterConfig  - ExecutorServices will be shared amongts Broadcasters
2013-08-19 15:37:55,827 [localhost-startStop-1] INFO  cpr.AtmosphereFramework  - Installed WebSocketProtocol org.atmosphere.websocket.protocol.SimpleHttpProtocol 
2013-08-19 15:37:56,957 [localhost-startStop-1] INFO  cpr.AtmosphereFramework  - Atmosphere is using async support: org.atmosphere.container.Tomcat7AsyncSupportWithWebSocket running under container: Apache Tomcat/7.0.42
2013-08-19 15:37:56,957 [localhost-startStop-1] INFO  handler.ReflectorServletProcessor  - Installing Servlet org.grails.plugin.platform.events.push.EventsPushHandler
2013-08-19 15:37:56,961 [localhost-startStop-1] INFO  cpr.BroadcasterConfig  - ExecutorServices will be shared amongts Broadcasters
2013-08-19 15:37:57,261 [localhost-startStop-1] INFO  registry.SpringIntegrationEventsRegistry$GrailsPublishSubscribeChannel  - Channel 'gorm://afterInsert' has 1 subscriber(s).
2013-08-19 15:37:57,264 [localhost-startStop-1] INFO  registry.SpringIntegrationEventsRegistry$GrailsPublishSubscribeChannel  - Channel 'gorm://afterDelete' has 1 subscriber(s).
2013-08-19 15:37:57,266 [localhost-startStop-1] INFO  registry.SpringIntegrationEventsRegistry$GrailsPublishSubscribeChannel  - Channel 'gorm://afterUpdate' has 1 subscriber(s).
2013-08-19 15:37:57,268 [localhost-startStop-1] INFO  registry.SpringIntegrationEventsRegistry$GrailsPublishSubscribeChannel  - Channel 'browser://move' has 1 subscriber(s).
2013-08-19 15:37:57,269 [localhost-startStop-1] INFO  registry.SpringIntegrationEventsRegistry$GrailsPublishSubscribeChannel  - Channel 'browser://fire' has 2 subscriber(s).
2013-08-19 15:37:57,272 [localhost-startStop-1] INFO  registry.SpringIntegrationEventsRegistry$GrailsPublishSubscribeChannel  - Channel 'browser://leave' has 1 subscriber(s).
2013-08-19 15:37:57,276 [localhost-startStop-1] INFO  registry.SpringIntegrationEventsRegistry$GrailsPublishSubscribeChannel  - Channel 'eventsPush://eventsbus' has 1 subscriber(s).
2013-08-19 15:37:57,620 [localhost-startStop-1] INFO  cpr.AtmosphereFramework  - Installing Default AtmosphereInterceptor
2013-08-19 15:37:57,704 [localhost-startStop-1] INFO  cpr.AtmosphereFramework  -    org.atmosphere.interceptor.JSONPAtmosphereInterceptor : JSONP Interceptor Support
2013-08-19 15:37:57,962 [localhost-startStop-1] INFO  cpr.AtmosphereFramework  -    org.atmosphere.interceptor.SSEAtmosphereInterceptor : SSE Interceptor Support
2013-08-19 15:37:58,050 [localhost-startStop-1] INFO  cpr.AtmosphereFramework  -    org.atmosphere.interceptor.AndroidAtmosphereInterceptor : Android Interceptor Support
2013-08-19 15:37:58,138 [localhost-startStop-1] INFO  cpr.AtmosphereFramework  -    org.atmosphere.interceptor.StreamingAtmosphereInterceptor : Streaming Interceptor Support
2013-08-19 15:37:58,307 [localhost-startStop-1] INFO  cpr.AtmosphereFramework  -    org.atmosphere.interceptor.DefaultHeadersInterceptor : Default Response's Headers Interceptor
2013-08-19 15:37:58,307 [localhost-startStop-1] INFO  cpr.AtmosphereFramework  - Set org.atmosphere.cpr.AtmosphereInterceptor.disableDefaults in your xml to disable them.
2013-08-19 15:37:58,307 [localhost-startStop-1] WARN  cpr.AtmosphereFramework  - No BroadcasterCache configured. Broadcasted message between client reconnection will be LOST. It is recommended to configure the HeaderBroadcasterCache.
2013-08-19 15:37:58,307 [localhost-startStop-1] WARN  cpr.AtmosphereFramework  - Neither TrackMessageSizeInterceptor or TrackMessageSizeFilter are installed. atmosphere.js may receive glued and incomplete message.
2013-08-19 15:37:58,307 [localhost-startStop-1] INFO  cpr.AtmosphereFramework  - HttpSession supported: false
2013-08-19 15:37:58,307 [localhost-startStop-1] INFO  cpr.AtmosphereFramework  - Using BroadcasterFactory: org.atmosphere.cpr.DefaultBroadcasterFactory
2013-08-19 15:37:58,307 [localhost-startStop-1] INFO  cpr.AtmosphereFramework  - Using WebSocketProcessor: org.atmosphere.websocket.DefaultWebSocketProcessor
2013-08-19 15:37:58,307 [localhost-startStop-1] INFO  cpr.AtmosphereFramework  - Using Broadcaster: org.atmosphere.cpr.DefaultBroadcaster
2013-08-19 15:37:58,398 [localhost-startStop-1] INFO  cpr.AtmosphereFramework  - Atmosphere Framework 1.1.0-SNAPSHOT started.
2013-08-19 15:37:58,400 [localhost-startStop-1] INFO  [localhost].[/grailsTodo]  - Initializing Spring FrameworkServlet 'grails'
2013-08-19 15:37:58,482 [main] INFO  http11.Http11NioProtocol  - Starting ProtocolHandler ["http-nio-8080"]
| Server running. Browse to http://localhost:8080/grailsTodo
2

But then the atmosphere library complains

2013-08-19 15:41:10,994 [http-nio-8080-exec-2] INFO  [localhost].[/grailsTodo]  - Initializing Spring FrameworkServlet 'gsp'
2013-08-19 15:41:10,995 [http-nio-8080-exec-2] INFO  [localhost].[/grailsTodo]  - GSP servlet initialized
2013-08-19 15:42:41,207 [http-nio-8080-exec-3] WARN  cpr.AtmosphereFramework  - Failed using comet support: org.atmosphere.container.Tomcat7AsyncSupportWithWebSocket, error: Tomcat failed to detect this is a Comet application because context.xml is missing or the Http11NioProtocol Connector is not enabled.
If that's not the case, you can also remove META-INF/context.xml and WEB-INF/lib/atmosphere-compat-tomcat.jar Is the Nio or Apr Connector enabled?
2013-08-19 15:42:41,401 [http-nio-8080-exec-3] WARN  cpr.AtmosphereFramework  - Using org.atmosphere.container.Tomcat7BIOSupportWithWebSocket

Is this a matter of Tomcat configuration that's normally up to the server admin, or should the project make all this work out of the box?

Thanks again.

Just noticed. The ToDo part doesn't present these errors, it is the game part. I think this makes it a non-issue.