Websocket test

Swetha Swetha
Added about 2 years ago


We are using jaxmpp to write a websocket test to connect to xmpp server.Once the open stream is sent,we receive the below error,

2016.02.29 16:42:05 org.jivesoftware.openfire.websocket.XmppWebSocket - Error detected; session: WebSocketSession[websocket=JettyAnnotatedEventDriver[org.jivesoftware.openfire.websocket.XmppWebSocket@555c5272],behavior=SERVER,connection=WebSocketServerConnection@2028e626{FILLING}{f=Flusher[queueSize=0,aggregateSize=0,failure=null],g=Generator[SERVER,validating],p=Parser@5d1dd948[ExtensionStack,s=START,c=0,len=0,f=null,p=WebSocketPolicy@52a435ba[behavior=SERVER,maxTextMessageSize=65536,maxTextMessageBufferSize=32768,maxBinaryMessageSize=65536,maxBinaryMessageBufferSize=32768,asyncWriteTimeout=60000,idleTimeout=300000,inputBufferSize=4096]]},remote=WebSocketRemoteEndpoint@1ac370b9[batching=true],incoming=JettyAnnotatedEventDriver[org.jivesoftware.openfire.websocket.XmppWebSocket@555c5272],outgoing=ExtensionStack[queueSize=0,extensions=[],incoming=org.eclipse.jetty.websocket.common.WebSocketSession,outgoing=org.eclipse.jetty.websocket.server.WebSocketServerConnection]]

org.eclipse.jetty.websocket.api.ProtocolException: CONTINUATION frame without prior !FIN

at org.eclipse.jetty.websocket.common.Parser.parseFrame(

at org.eclipse.jetty.websocket.common.Parser.parse(




at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(

at org.eclipse.jetty.util.thread.QueuedThreadPool$


Below is the wireshark trace,

GET /ws HTTP/1.1


Connection: Upgrade

Upgrade: websocket

Sec-WebSocket-Key: f4d3c8c7-d58d-4cfe-869e-e815c950f51b

Sec-WebSocket-Protocol: xmpp,xmpp-framing

Sec-WebSocket-Version: 13

HTTP/1.1 101 Switching Protocols

Connection: Upgrade

Date: Mon, 29 Feb 2016 10:43:01 GMT

Transfer-Encoding: chunked

Sec-WebSocket-Accept: Q98K8mJfgd43Ot5biqYih601hyk=

Upgrade: websocket

Sec-WebSocket-Protocol: xmpp

.h.B..End fragment sent, but wasn't processing any previous fragments.

Any idea what is the problem ?

Replies (4)

Added by Andrzej Wójcik Tigase team member about 2 years ago

This looks like an issue with protocol implementation.

I created new task for analysis of this issue and providing fix for it #3982

Added by Andrzej Wójcik Tigase team member about 2 years ago

I checked this issue and it was caused by one field of WebSocket header being sent with incorrect value by WebSocket implementation in Jaxmpp2.

I changed it to send correct value for this header field and looks that this solved this issue.

This fix will be part of next snapshot build of Jaxmpp2 library 3.1.0-SNAPSHOT. It should be available tomorrow.

Added by Swetha Swetha about 2 years ago

Thanks Andrzej will pick up tomorrow's snapshot and give it a try

Added by Swetha Swetha about 2 years ago

The fix worked Andrzej,thanks a lot !