java.util.concurrent.RejectedExecutionException: Task com.datastax.driver.core.Connection$9$1@4db33871 rejected from java.util.concurrent.ThreadPoolExecutor@1d55fe0[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0]

DataStax JIRA | Vishy Kasar | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    [JAVA-914] Avoid executing on a shutdown executor - DataStax

    atlassian.net | 1 year ago
    java.util.concurrent.RejectedExecutionException: Task com.datastax.driver.core.Connection$9$1@4db33871 rejected from java.util.concurrent.ThreadPoolExecutor@1d55fe0[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0]
  2. 0

    We see the following WARN when bouncing our app servers which use java-driver. This is confusing the users. Can we avoid this by checking if the factory.manager.executor is not shutdown before calling execute on it? {code} lggr=io.netty.util.concurrent.DefaultPromise coztop="java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2047)" cozappfrm="java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2047)" cozcls=java.util.concurrent.RejectedExecutionException cozmsg="Task com.datastax.driver.core.Connection$9$1@7c3084de rejected from java.util.concurrent.ThreadPoolExecutor@77717ba1[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 6215]" thwcls=java.util.concurrent.RejectedExecutionException thwmsg=SameAsCauseMessage at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2047) at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:823) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1369) at com.google.common.util.concurrent.MoreExecutors$ListeningDecorator.execute(MoreExecutors.java:550) at com.datastax.driver.core.Connection$9.operationComplete(Connection.java:558) at com.datastax.driver.core.Connection$9.operationComplete(Connection.java:534) at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:680) at io.netty.util.concurrent.DefaultPromise.notifyLateListener(DefaultPromise.java:621) at io.netty.util.concurrent.DefaultPromise.addListener(DefaultPromise.java:138) at io.netty.channel.DefaultChannelPromise.addListener(DefaultChannelPromise.java:93) at io.netty.channel.DefaultChannelPromise.addListener(DefaultChannelPromise.java:28) at com.datastax.driver.core.Connection$Flusher.run(Connection.java:853) at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:380) at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:268) at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) at java.lang.Thread.run(Thread.java:745) {code} ----- *_Final fix:_* Reintroduce grace period when shutting down event loop group + testing if executors are shutdown before submitting tasks.

    DataStax JIRA | 2 years ago | Vishy Kasar
    java.util.concurrent.RejectedExecutionException: Task com.datastax.driver.core.Connection$9$1@4db33871 rejected from java.util.concurrent.ThreadPoolExecutor@1d55fe0[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0]
  3. 0

    Met "Could not connect to Cassandra cluster" in hawkular-metrics Pod

    GitHub | 2 years ago | chunyunchen
    java.util.concurrent.RejectedExecutionException: Task com.datastax.driver.core.Connection$9$1@48557a04 rejected from java.util.concurrent.ThreadPoolExecutor@706d85fa[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    EmbeddedCassandraServerHelper.cleanEmbeddedCassandra() hangs forever

    Stack Overflow | 1 year ago | gigi2
    java.util.concurrent.RejectedExecutionException: Task com.google.common.util.concurrent.ListenableFutureTask@9a7dd20 rejected from java.util.concurrent.ThreadPoolExecutor@6dc825bd[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 3]
  6. 0

    0.10 Want to know the meaning of this Exception

    GitHub | 1 month ago | arpankhagram
    com.fasterxml.jackson.databind.JsonMappingException: Task io.druid.query.PrioritizedListenableFutureTask@33893a rejected from java.util.concurrent.ThreadPoolExecutor@46 dad4b2[Terminated, pool size = 3, active threads = 0, queued tasks = 0, completed tasks = 24649]
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.util.concurrent.RejectedExecutionException

    Task com.datastax.driver.core.Connection$9$1@4db33871 rejected from java.util.concurrent.ThreadPoolExecutor@1d55fe0[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0]

    at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution()
  2. Java RT
    ThreadPoolExecutor.execute
    1. java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2047)[rt.jar:1.8.0_45]
    2. java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:823)[rt.jar:1.8.0_45]
    3. java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1369)[rt.jar:1.8.0_45]
    3 frames
  3. Guava
    MoreExecutors$ListeningDecorator.execute
    1. com.google.common.util.concurrent.MoreExecutors$ListeningDecorator.execute(MoreExecutors.java:484)[guava-16.0.1.jar:]
    1 frame
  4. DataStax Java Driver for Apache Cassandra - Core
    Connection$9.operationComplete
    1. com.datastax.driver.core.Connection$9.operationComplete(Connection.java:566)[cassandra-driver-core-2.2.0-rc2.jar:]
    2. com.datastax.driver.core.Connection$9.operationComplete(Connection.java:542)[cassandra-driver-core-2.2.0-rc2.jar:]
    2 frames
  5. Netty
    SingleThreadEventExecutor$2.run
    1. io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:680)[netty-common-4.0.27.Final.jar:4.0.27.Final]
    2. io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:603)[netty-common-4.0.27.Final.jar:4.0.27.Final]
    3. io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:563)[netty-common-4.0.27.Final.jar:4.0.27.Final]
    4. io.netty.util.concurrent.DefaultPromise.tryFailure(DefaultPromise.java:424)[netty-common-4.0.27.Final.jar:4.0.27.Final]
    5. io.netty.channel.PendingWriteQueue.safeFail(PendingWriteQueue.java:252)[netty-transport-4.0.27.Final.jar:4.0.27.Final]
    6. io.netty.channel.PendingWriteQueue.removeAndFailAll(PendingWriteQueue.java:112)[netty-transport-4.0.27.Final.jar:4.0.27.Final]
    7. io.netty.handler.ssl.SslHandler.setHandshakeFailure(SslHandler.java:1256)[netty-handler-4.0.27.Final.jar:4.0.27.Final]
    8. io.netty.handler.ssl.SslHandler.channelInactive(SslHandler.java:676)[netty-handler-4.0.27.Final.jar:4.0.27.Final]
    9. io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:237)[netty-transport-4.0.27.Final.jar:4.0.27.Final]
    10. io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:223)[netty-transport-4.0.27.Final.jar:4.0.27.Final]
    11. io.netty.channel.DefaultChannelPipeline.fireChannelInactive(DefaultChannelPipeline.java:829)[netty-transport-4.0.27.Final.jar:4.0.27.Final]
    12. io.netty.channel.AbstractChannel$AbstractUnsafe$7.run(AbstractChannel.java:610)[netty-transport-4.0.27.Final.jar:4.0.27.Final]
    13. io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:357)[netty-common-4.0.27.Final.jar:4.0.27.Final]
    14. io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357)[netty-transport-4.0.27.Final.jar:4.0.27.Final]
    15. io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:111)[netty-common-4.0.27.Final.jar:4.0.27.Final]
    15 frames
  6. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:745)[rt.jar:1.8.0_45]
    1 frame