Websocket 'gatling.http.webSocket' was unexpectedly closed with status 1006 and message Connection was closed abnormally
I'm trying to troubleshoot, - why this exception happening?
I never can reproduce the issue, when repeating steps manually. And as you can see - I'm not really generating any load - it's just one user.
So, please assist - what can I do to troubleshoot?
One specific question I have:
- I can see some exception details, as you see above (status 1006), but where I can see the details of that exception (log, stack trace, etc...)?
val scn = scenario("WebSocket")
.exec(ws("Connect WS").open(""))
.exec(ws("Sending query")
.sendText(session => query())
.check(wsAwait.within(300).until(1).regex(""".*"status":"Finished".*""").saveAs("SiftOutput"))
)
.exec{ session =>
session("SiftOutput").asOption[String].foreach(println)
session
}
.exec(ws("Close WS").close)
setUp(scn.inject(atOnceUsers(1)).protocols(httpConf))
--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
#webSocketMaxFrameSize = 10240 # Maximum frame payload size
- why Gatling default value is so small? Why not increase the default size?
Is there any drawbacks to that?
- where I can see the details of the exceptions (log, stack trace, etc...)?
I would expect you to see a CorruptedFrameException in the logs.If you don't, it's probably swallowed somewhere, probably in AHC rather than in Gatling. When such exception occurs, Netty automatically closes the connection.
--
You received this message because you are subscribed to a topic in the Google Groups "Gatling User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gatling/6P0FBC_zdpg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gatling+u...@googlegroups.com.
12:49:16.566 [DEBUG] c.n.h.c.p.n.h.Processor - Unexpected I/O exception on channel [id: 0xc0a104e1, /10.20.40.16:56635 :> lassift02v.netiq.dmz/10.88.20.76:8080]org.jboss.netty.handler.codec.frame.CorruptedFrameException: Max frame length of 10240 has been exceeded.
logger name="io.gatling.http.ahc" level="TRACE"
root level="DEBUG"
--
login(lrs_login_url, lrs_auth_token_url, credentials_file, rememberMe)
.exec(
ws("Open Websocket").open("open")
).pause(1)
.exec(
ws("Connect to Websocket")
.sendText(session => "connect").check(wsListen.within(30).until(1).regex("""CONNECTED"""))
).pause(1)
.exec(
ws("Subscribe")
.sendText(session => "subscribe")
)
.exec(BookingHelper.getSpaceGuid(lrs_query_space_guid)).foreach("${SpaceGuid}", Constants.SPACE_GUID) {
exec(BookingHelper.getWaitlist(lrs_get_waitlist1, lrs_get_waitlist2))
.exec(BookingHelper.getAllBookings(lrs_get_bookings1, lrs_get_bookings2))
.foreach("${bookingidlist}", Constants.BOOKING_ID) {
pause(30).
exec(http(Constants.NOTIFY_ALL_BOOKING)
.post(StringBody(lrs_notify_bookings1 + "${bookingid}"+ lrs_notify_bookings2))
.header(Constants.AUTHORIZATION, """${token_type} ${access_token}""").header(Constants.CONTENT_TYPE, Constants.CONTENT_VALUE).body(StringBody(session => "somebody")).check(status.is(202)))
.exec(ws("Check Websocket")
.check(wsListen.within(60).until(1).regex("""NOTIFIED""")))
}
}
}
When I checked the log file, here is the error -
Get Token 129491809211402198-0 REQUEST Check Websocket 1535439248818 1535439276209 1535439276209 1535439276209 KO Websocket 'gatling.http.webSocket' was unexpectedly closed with status 1006 and message Connection was closed abnormally (that is, with no close frame being sent).
I found below on console -
12:24:36.208 [New I/O worker #14][DEBUG] c.n.h.c.p.n.h.Processor - Channel Closed: [id: 0x3bf1e500, /192.168.2.12:55190 :> devconnect.lrsus.com/35.170.43.64:443] with attribute NettyResponseFuture{currentRetry=2,
isDone=true,
isCancelled=false,
asyncHandler=com.ning.http.client.ws.WebSocketUpgradeHandler@476e929b,
nettyRequest=com.ning.http.client.providers.netty.request.NettyRequest@7f30e4de,
content=NettyWebSocket{channel=[id: 0x3bf1e500, /192.168.2.12:55190 :> devconnect.lrsus.com/35.170.43.64:443]},
uri=wss://devconnect.lrsus.com/gs-guide-websocket/888/0ufnkstq/websocket,
keepAlive=true,
httpHeaders=org.jboss.netty.handler.codec.http.DefaultHttpHeaders@2cc9011,
exEx=null,
redirectCount=0,
timeoutsHolder=null,
inAuth=false,
statusReceived=false,
touch=496358570}
12:24:36.210 [New I/O worker #14][DEBUG] c.n.h.c.p.n.c.ChannelManager - Closing Channel [id: 0x3bf1e500, /192.168.2.12:55190 :> devconnect.lrsus.com/35.170.43.64:443]
12:24:36.211 [GatlingSystem-akka.actor.default-dispatcher-2][DEBUG] i.g.h.a.w.WsActor - Websocket 'gatling.http.webSocket' closed by the server
I tried to change below parameters in Gatling.conf but no luck
webSocketTimeout = 120000 # Timeout when a used websocket connection stays idle
webSocketMaxFrameSize = 163840 # Maximum frame payload size
My logback.xml
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread{10}][%-5level] %logger{15} - %msg%n%rEx</pattern>
<immediateFlush>false</immediateFlush>
</encoder>
</appender>
<logger name="io.gatling.http.ahc" level="DEBUG" />
<logger name="io.gatling.http.response" level="DEBUG" />
<logger name="io.swagger.models.parameters.AbstractSerializableParameter" level="ERROR" />
<root level="DEBUG">
<appender-ref ref="CONSOLE" />
</root>
</configuration>
Anything wrong with my simulation, configuration? What can be added in configuration so that I can troubleshoot the problem.
thanks,
Vrushalee Ajotikar