I'm actually in a nightmare. My webapp uses websockets for the chat and here comes the problem:
Using Glassfish 4.1u13 everything worked fine, until I activated the Access Log Monitoring. since that, every ws request was made 2 times and the web socket couldn't did the handshake. https://java.net/jira/browse/GLASSFISH-21007
Tried to update to glass fish 4.1.1 -> problem PERSIST
Tried to switch to Payara 4.1.1.115 (which is a patched version of glassfish) and everything went smooth. I could now have websockets AND access logging in my Glassfish instance.
Some minutes after noticed that when I reload the page, not always the communication between client app and server were done. Inspect network -> handshakes correctly but can't exchange data.
On server side then, I made 2 system out: one in the filter of the request servlet and one in the websocket endpoint. Every request arrives to the server and do the handshake BUT sometimes @OnOpen will not be called, even if the wss is upgraded to 101. How's that possible? tried to update to Tyrus 1.12 (payara uses 1.11) and also downgrade it to 1.8.1 (which is the version used by functioning Glassfish 4.1u13) but nothing happens.
How I can debug this behaviour?