Home > other >  Gatling: Executor not accepting task when polling
Gatling: Executor not accepting task when polling

Time:04-06

I have a gatling scenario in which I need to poll a specific endpoint for the duration of the test. However when polling the request it results in an and illegal state exception with the error executor not accepting task when polling.

I've had a look at the docs here, but Im not sure where I'm going wrong.

The snippet looks like this:

        .exec(
            poll()
                .every(5)
                .exec(http("getWingboard")
                .get(WingboardEnpoints.Wingboard)
                .headers(Config.header)
                .check(status().`is`(200))
            ))

Errors look like this:

 [gatling-1-2] DEBUG i.g.h.client.impl.DefaultHttpClient - Failed to connect to remoteAddress=xxxx/108.156.28.72:443 from localAddress=null
java.lang.IllegalStateException: executor not accepting a task
        at io.netty.resolver.AddressResolverGroup.getResolver(AddressResolverGroup.java:61)
        at io.netty.bootstrap.Bootstrap.doResolveAndConnect0(Bootstrap.java:194)
        at io.netty.bootstrap.Bootstrap.doResolveAndConnect(Bootstrap.java:162)
        at io.netty.bootstrap.Bootstrap.connect(Bootstrap.java:148)
        at io.gatling.http.client.impl.DefaultHttpClient.openNewChannelRec(DefaultHttpClient.java:809)
        at io.gatling.http.client.impl.DefaultHttpClient.lambda$openNewChannelRec$12(DefaultHttpClient.java:843)
        at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:578)
        at io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:571)
        at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:550)
        at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:491)
        at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:616)
        at io.netty.util.concurrent.DefaultPromise.setFailure0(DefaultPromise.java:609)
        at io.netty.util.concurrent.DefaultPromise.tryFailure(DefaultPromise.java:117)
        at io.netty.channel.nio.AbstractNioChannel.doClose(AbstractNioChannel.java:502)
        at io.netty.channel.socket.nio.NioSocketChannel.doClose(NioSocketChannel.java:342)
        at io.netty.channel.AbstractChannel$AbstractUnsafe.doClose0(AbstractChannel.java:754)
        at io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:731)
        at io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:620)
        at io.netty.channel.nio.NioEventLoop.closeAll(NioEventLoop.java:772)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:529)
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
        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)

Im using Gatling gradle plugin v3.7.4 with Kotlin.

CodePudding user response:

polling is a background task that only lasts as long as the virtual user is performing its main scenario. I suspect your users don't perform anything else than the polling.

Otherwise, please provide a full reproducer.

  • Related