Connection getting closed to jetty server (websockets?)

Currently trying to send a request to my server from Gatling to log-in. I used recorder.sh to create the simulation, and this worked just fine. However, when I try to run it, I’m getting the following error on Gatling:

14:58:15.862 [WARN ] i.g.h.a.AsyncHandlerActor - Request ‘request_21 Redirect 2’ failed: java.io.IOException: Remotely closed

On the server side, I’m getting:

WARN [2015-01-13 15:25:18,722] [qtp2139493462-131] org.eclipse.jetty.websocket.WebSocketConnectionRFC6455 - Close: 1002 Not masked

WARN [2015-01-13 15:25:18,723] [qtp2139493462-131] org.eclipse.jetty.websocket.WebSocketConnectionRFC6455 - Close: 1002 Not masked

WARN [2015-01-13 15:25:18,724] [qtp2139493462-131] org.eclipse.jetty.websocket.WebSocketParserRFC6455 - Fragmented Control from SCEP@6993baa9{l(/127.0.0.1:60093)<->r(/127.0.0.1:3301),d=true,open=true,ishut=false,oshut=true,rb=false,wb=false,w=true,i=1r}-{WebSocketServletConnectionRFC6455 p=WebSocketParserRFC6455@36049b80 state=OPCODE buffer=

Accept: /

Content-Type: application/x-www-form-urlencoded; charset=UTF-8

Accept-Language: en-US,en;q=0.5

Accept-Encoding: gzip, deflate

User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:25.0) Gecko/20100101 Firefox/25.0

Referer: http://localhost:3301/app/pt.pg.login.userpass;jsessionid=z10imh6n1ctg1nx2vvt1i056z

Cookie: JSESSIONID=z10imh6n1ctg1nx2vvt1i056z

Host: localhost:3301

g=WebSocketGeneratorRFC6455@687d0c34 closed=true buffer=-1}

WARN [2015-01-13 15:25:18,724] [qtp2139493462-131] org.eclipse.jetty.websocket.WebSocketConnectionRFC6455 - Close: 1002 Fragmented control

WARN [2015-01-13 15:25:18,724] [qtp2139493462-131] org.eclipse.jetty.websocket.WebSocketParserRFC6455 - Fragmented Control from SCEP@6993baa9{l(/127.0.0.1:60093)<->r(/127.0.0.1:3301),d=true,open=true,ishut=false,oshut=true,rb=false,wb=false,w=true,i=1r}-{WebSocketServletConnectionRFC6455 p=WebSocketParserRFC6455@36049b80 state=OPCODE buffer=

Content-Type: application/x-www-form-urlencoded; charset=UTF-8

Accept-Language: en-US,en;q=0.5

Accept-Encoding: gzip, deflate

User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:25.0) Gecko/20100101 Firefox/25.0

Referer: http://localhost:3301/app/pt.pg.login.userpass;jsessionid=z10imh6n1ctg1nx2vvt1i056z

Cookie: JSESSIONID=z10imh6n1ctg1nx2vvt1i056z

Host: localhost:3301

I have to admit that I don’t really understand what’s happening. Something about websockets…are these not supported by Gatling? Is there a work-around for this?

The Recorder doesn’t support WebSockets atm, only the load engine does.
Some initial pre-handshake/upgrade requests might have sneaked in and should be removed. Could you share an example, please?

Hey Stéphane,

Thanks for the response!
So I’d need to write my own scala simulation script by hand using web sockets in order to connect to a jetty server is the idea? Or would that not work? What are you looking for an example of?

-Casey

I mean that if your application involves websocket traffic, this one has to be manually crafted, yes. But the regular HTTP traffic is fine. This is nothing specific to Jetty.