Am getting below exception in my local machine but the same code runs good in remote machine. Any idea on this please?
This error pops out irrespective of any gatling version that I use in my local.
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at io.gatling.mojo.MainWithArgsInFile.runMain(MainWithArgsInFile.java:50)
at io.gatling.mojo.MainWithArgsInFile.main(MainWithArgsInFile.java:33)
Caused by: java.util.concurrent.TimeoutException: Futures timed out after [5 seconds]
at scala.concurrent.impl.Promise$DefaultPromise.ready(Promise.scala:255)
at scala.concurrent.impl.Promise$DefaultPromise.result(Promise.scala:259)
at scala.concurrent.Await$.$anonfun$result$1(package.scala:215)
at scala.concurrent.BlockContext$DefaultBlockContext$.blockOn(BlockContext.scala:53)
at scala.concurrent.Await$.result(package.scala:142)
at io.gatling.core.stats.DataWritersStatsEngine$.apply(StatsEngine.scala:102)
at io.gatling.app.Runner.newStatsEngine(Runner.scala:64)
at io.gatling.app.Runner.run0(Runner.scala:83)
at io.gatling.app.Runner.run(Runner.scala:60)
at io.gatling.app.Gatling$.start(Gatling.scala:73)
at io.gatling.app.Gatling$.fromArgs(Gatling.scala:46)
at io.gatling.app.Gatling$.main(Gatling.scala:38)
at io.gatling.app.Gatling.main(Gatling.scala)
… 6 more
Simulation performance.simulations.AAACustomSimulation started...
23:26:33.271 [ERROR] i.g.c.c.Controller - Actor io.gatling.core.controller.Controller@1e5e65f7 crashed on message Some(Start(io.gatling.core.scenario.Scenarios@5fedf4c1))
java.util.concurrent.TimeoutException: Future timed out after [5 seconds]
was my primary error, no request was initiated
This error occurred at java 11 ,
After updating my gatling version to 3.10.0,and jdk to 17 The above error gone.
I am now getting below error. Although I am getting status code as 200.Atleast now the request is hitting.
07:57:31.399 [TRACE] i.g.h.u.package$ - Could not decode response body
java.lang.StringIndexOutOfBoundsException: begin 0, end 500000, length 7824
Log:
Could not decode response body
java.lang.StringIndexOutOfBoundsException: begin 0, end 500000, length 7824
at java.base/java.lang.String.checkBoundsBeginEnd(String.java:4604)
at java.base/java.lang.String.substring(String.java:2707)
at io.gatling.http.util.package$HttpStringBuilder$.appendResponse$extension(package.scala:101)
at io.gatling.http.engine.response.StatsProcessor.dump$1(StatsProcessor.scala:73)
at io.gatling.http.engine.response.StatsProcessor.logTx(StatsProcessor.scala:84)
at io.gatling.http.engine.response.StatsProcessor.reportStats(StatsProcessor.scala:37)
at io.gatling.http.engine.response.DefaultResponseProcessor.proceed(ResponseProcessor.scala:168)
at io.gatling.http.engine.response.DefaultResponseProcessor.onComplete(ResponseProcessor.scala:152)
at io.gatling.http.engine.GatlingHttpListener.onHttpResponseBodyChunk(GatlingHttpListener.scala:163)
at io.gatling.http.client.impl.HttpAppHandler.channelReadHttpContent(HttpAppHandler.java:187)
at io.gatling.http.client.impl.HttpAppHandler.channelRead(HttpAppHandler.java:210)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318)
at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1475)
at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1338)
at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1387)
at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:529)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:468)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:833)
07:57:31.403 [TRACE] i.g.h.e.r.DefaultStatsProcessor -
I have updated my maven to latest Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)
POM:
Issue resolved by updating gatling version to 3.10.5
but very intermittent issue TimeoutException coming in every 2/5 run cleaning up maven helps.
in 3.11.1
it. throws Jackson parser error :Jackson failed to parse into a valid AST
But this issue is not happening on other team member’s system.
The issue coming again even if I am using 3.10.5.
For some script it executed first time well then in next execution it throws Timeout error.
a.a.OneForOneStrategy akka://GatlingSystem/user/gatling-controller
Future timed out after [5 seconds]
The errors you’re reporting are completely different from the one mentioned by the author of this ticket => please open a dedicated thread instead of hijacking an existing unrelated one
If you’re using Gatling 3.10.5, please upgrade. We can only help if you’re using the latest version.
We require that you provide a reproducer. Help people help you.
“But this issue is not happening on other team member’s system.” Then there’s probably something different with your system.