j.l.IllegalArgumentException: invalid version format: 0 in galing

I am facing j.l.IllegalArgumentException: invalid version format: 0 this is some of request not for all.

I am using gatling-charts-highcharts-bundle-3.3.1

I need help on this.

EIPortal.scala (34.6 KB)

gatling.conf (8.64 KB)


Impossible to say if this is a bug in Netty or in your application that sometimes sends incorrect TCP fragments.
I’m sorry but your sample is way too complex to investigate.
Please try to provide a more simple one, eg trying to narrow your problem down to a few request types (not a hundred like in your current sample).


Hi Stephane,

Sorry for the late reply, I have attached simple login example.
In this simulation, I am getting this error j.l.IllegalArgumentException: invalid version format: 0

Thank you

login.scala (3.53 KB)

Using WireShark, I see lots of duplicated and out-of-order packets under load.
It really doesn’t look like an issue on the Gatling side but on your network infrastructure.

Hi, im having same exception in request to locahost from within simulation (same request in vscode works fine) (also works fine if request is made from simulation to deployed app) :frowning:
Searching online i find several entries about this exception related with netty but not the solution, can someone help?

POST /messagehub/negotiate HTTP/1.1
Referer: https://xxx.com/
Origin: https://xxx.com
Connection: keep-alive
Content-Length: 0
Accept: /
Content-Type: text/plain;charset=UTF-8
DNT: 1
Accept-Language: en-GB,en;q=0.5
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:83.0) Gecko/20100101 Firefox/83.0
Host: localhost:44386
X-Requested-With: XMLHttpRequest
accept-encoding: gzip, deflate, content=null}
16:09:06.926 [DEBUG] i.g.h.c.i.HttpAppHandler - Read msg=‘DefaultFullHttpResponse(decodeResult: failure(java.lang.IllegalArgumentException: invalid version format: 0), version: HTTP/1.0, content: UnpooledByteBufAllocator$InstrumentedUnpooledUnsafeHeapByteBuf(ridx: 0, widx: 0, cap: 0))
HTTP/1.0 999 Unknown’
16:09:06.927 [INFO ] i.g.h.e.GatlingHttpListener - Request ‘api_negotiate_post’ failed for user 1
java.lang.IllegalArgumentException: invalid version format: 0
at io.netty.handler.codec.http.HttpVersion.(HttpVersion.java:123)
at io.netty.handler.codec.http.HttpVersion.valueOf(HttpVersion.java:78)
at io.netty.handler.codec.http.HttpResponseDecoder.createMessage(HttpResponseDecoder.java:118)

at io.netty.handler.codec.http.HttpObjectDecoder.decode(HttpObjectDecoder.java:210)

Thank you

Have you enabled HTTP/2 along with using WebSockets?