Vaadin 8: Atmosphere, Websocket problems

I’ve encountered an application-breaker with Vaadin 8 and need a steer. Vaadin 8.0.4, Tomcat 8.5.11. Large project, 12 servlets, websocket push.

It’s worked well for years, but has recently become non-functional. Individual UIs can be opened, but multiple UIs don’t always open, nor do they talk to each other. Evidence is found during startup in the Eclipse console:

Mar 29, 2017 5:14:08 PM org.atmosphere.cpr.AtmosphereFramework info
INFO: Atmosphere Framework 2.4.5.vaadin2 started.
Mar 29, 2017 5:14:08 PM org.atmosphere.cpr.Universe broadcasterFactory
WARNING: More than one Universe configured. Universe class will gives wrong object reference org.atmosphere.cpr.DefaultBroadcasterFactory@76d0ddb1
Mar 29, 2017 5:14:08 PM org.atmosphere.cpr.Universe resourceFactory
WARNING: More than one Universe configured. Universe class will gives wrong object reference org.atmosphere.cpr.DefaultAtmosphereResourceFactory@3c99592c
Mar 29, 2017 5:14:08 PM org.atmosphere.cpr.Universe sessionResourceFactory
WARNING: More than one Universe configured. Universe class will gives wrong object reference org.atmosphere.cpr.DefaultAtmosphereResourceSessionFactory@56b42f85
Mar 29, 2017 5:14:08 PM org.atmosphere.cpr.Universe framework
WARNING: More than one Universe configured. Universe class will gives wrong object reference com.vaadin.server.communication.PushRequestHandler$1@630ca7c3
Mar 29, 2017 5:14:08 PM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFO: Installed AtmosphereInterceptor  Track Message Size Interceptor using | with priority BEFORE_DEFAULT

Starting a UI produces this warning:

WARNING: More than one Servlet Mapping defined. WebSocket may not work org.apache.catalina.core.ApplicationServletRegistration@5c1e45ea

I can see that Artur has been addressing related issues
#8734
and
#8967
and
#8292
.

I wonder if I can get some information about what is happening and what actions I might take? Moving backwards from 8.0.4 is impractical due to the blockers that have been fixed since 8.0.2. My application relies heavily on push amongst the various servlets.

I’m downgrading my concern on this file: Logic problems on my side introduced during V8 migration were the source of the “breaking” behaviour. The atmosphere warnings persist, but Push works. I’ve tried WEBSOCKET, WEBSOCKET_XHR and LONG_POLLING transport, finding no functional difference in superficial tests. It would be reassuring if someone might know any limitations that are implied by the warnings.

Any update on this? I seem to have a similar issue:
https://vaadin.com/forum/#!/thread/15665152/15665151

I am upgrading from Vaadin 7 to Vaadin 8.7.2, and I noted this error in my logs:

Apr 11, 2019 2:34:18 PM org.atmosphere.util.IOUtils guestRawServletPath
WARNING: More than one Servlet Mapping defined. WebSocket may not work org.apache.catalina.core.ApplicationServletRegistration@758fefbf

It’s unclear what, if anything, is actually going wrong. It doesn’t help than it doesn’t tell us what the servlet mappings it found are. We do map two URLs to Vaadin (in our web.xml) via:

<servlet-mapping>
	<servlet-name>YozonsESignFormsVaadinApplication</servlet-name>
	<url-pattern>/VAADIN/*</url-pattern>
	<url-pattern>/ui/*</url-pattern>
</servlet-mapping>

I think in that last case it’s not a problem, as there is only one URL mapping using websockets, which is /ui/*. The /VAADIN/* mapping is only used to serve static resources, so it doesn’t push anything. Multiple URL mappings pushing content (multiple UIs from the same servlet in Vaadin’s case) are not supported by Atmosphere’s WebSocket communication; I think long polling still works, though.

Thanks, Olli. Is there a setup that makes this more explicit, that the vaadin servlet will retrieve over both /ui/* and /VAADIN/* while atmosphere only use /ui/* ? We don’t use push directly in our app, but figured it still was more efficient and timely to let it run automatic.