ActiveMQ Artemis Netty exception - java.lang.IllegalStateException: executor not accepting a task

36 Views Asked by At

I'm currently using ActiveMQ Artemis 2.5.0. I'm embedding it in my application, and that is running within Tomcat. I'm not doing anything particularly special as far as configuration. I'm using it for communication between apps. I keep finding this exception popping up occasionally in the logs, and I'm not sure what to make of it.

It looks like ActiveMQ Artemis is having some issue with Netty when trying to resolve the connection. It seems to be a problem with the the Netty library. I don't seem to be able to reproduce it.

I'm looking for any clues to what might cause this.

java.lang.IllegalStateException: executor not accepting a task
    at io.netty.resolver.AddressResolverGroup.getResolver(AddressResolverGroup.java:60)
    at io.netty.bootstrap.Bootstrap.doResolveAndConnect0(Bootstrap.java:200)
    at io.netty.bootstrap.Bootstrap.access$000(Bootstrap.java:49)
    at io.netty.bootstrap.Bootstrap$1.operationComplete(Bootstrap.java:188)
    at io.netty.bootstrap.Bootstrap$1.operationComplete(Bootstrap.java:174)
    at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:511)
    at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:485)
    at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:424)
    at io.netty.util.concurrent.DefaultPromise.trySuccess(DefaultPromise.java:103)
    at io.netty.channel.DefaultChannelPromise.trySuccess(DefaultChannelPromise.java:84)
    at io.netty.channel.AbstractChannel$AbstractUnsafe.safeSetSuccess(AbstractChannel.java:978)
    at io.netty.channel.AbstractChannel$AbstractUnsafe.register0(AbstractChannel.java:512)
    at io.netty.channel.AbstractChannel$AbstractUnsafe.access$200(AbstractChannel.java:423)
    at io.netty.channel.AbstractChannel$AbstractUnsafe$1.run(AbstractChannel.java:482)
    at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
    at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:309)
    at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886)
    at org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118)

Appears to have started after a tomcat restart of the web application. Also found this in the catalina logs, but I'm not sure it's related

java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [io.netty.util.collection.IntObjectHashMap$2]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
        at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1432)
        at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1420)
        at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1259)
        at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1220)
        at io.netty.util.collection.IntObjectHashMap.values(IntObjectHashMap.java:221)
        at io.netty.channel.epoll.EpollEventLoop.closeAll(EpollEventLoop.java:355)
        at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:322)
        at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886)
        at org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118)

I'm wondering if the Tomcat restart happens and ActiveMQ Artemis isn't cleanly shutting down all of its threads and that's leading to issues. As I said, I can't seem to reproduce this.

These errors are all coming from the client side. I've not found any problems with the server itself, and logs appear clean.

0

There are 0 best solutions below