java.util.concurrent.RejectedExecutionException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • With the spark-cassandra-connector, branch b1.1, using java driver version 2.1.2 and cassandra 2.1.0 I see this: {noformat}14/11/03 13:09:15 ERROR ExceptionCatchingRunnable: Unexpected error while executing task java.util.concurrent.RejectedExecutionException: Task com.google.common.util.concurrent.ListenableFutureTask@3c61ee53 rejected from java.util.concurrent.ThreadPoolExecutor@4165aa1d[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0] at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2048) at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:821) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1372) at com.google.common.util.concurrent.MoreExecutors$ListeningDecorator.execute(MoreExecutors.java:484) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:132) at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:58) at com.datastax.driver.core.SessionManager.maybeAddPool(SessionManager.java:264) at com.datastax.driver.core.Cluster$Manager.onAdd(Cluster.java:1639) at com.datastax.driver.core.Cluster$Manager.access$1100(Cluster.java:1110) at com.datastax.driver.core.Cluster$Manager$6.runMayThrow(Cluster.java:1588) at com.datastax.driver.core.ExceptionCatchingRunnable.run(ExceptionCatchingRunnable.java:32) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) 14/11/03 13:09:15 INFO LocalNodeFirstLoadBalancingPolicy: Adding host 127.0.0.1 (datacenter1) 14/11/03 13:09:15 INFO LocalNodeFirstLoadBalancingPolicy: Adding host 127.0.0.1 (datacenter1) 14/11/03 13:09:15 INFO TableWriter: Wrote 0 rows in 0 batches to twitter_stream.hashtags_by_interval in 0.005 s. 14/11/03 13:09:15 INFO CassandraConnector: Connected to Cassandra cluster: Test Cluster 14/11/03 13:09:15 INFO LocalNodeFirstLoadBalancingPolicy: Adding host 127.0.0.1 (datacenter1) 14/11/03 13:09:15 INFO Cluster: New Cassandra host /127.0.0.1:9042 added 14/11/03 13:09:15 INFO LocalNodeFirstLoadBalancingPolicy: Adding host 127.0.0.1 (datacenter1) 14/11/03 13:09:15 INFO LocalNodeFirstLoadBalancingPolicy: Adding host 127.0.0.1 (datacenter1) 14/11/03 13:09:15 ERROR ExceptionCatchingRunnable: Unexpected error while executing task java.util.concurrent.RejectedExecutionException: Task com.google.common.util.concurrent.ListenableFutureTask@5bdbbf3a rejected from java.util.concurrent.ThreadPoolExecutor@37e7a7f3[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0] at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2048) at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:821) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1372) at com.google.common.util.concurrent.MoreExecutors$ListeningDecorator.execute(MoreExecutors.java:484) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:132) at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:58) at com.datastax.driver.core.SessionManager.maybeAddPool(SessionManager.java:264) at com.datastax.driver.core.Cluster$Manager.onAdd(Cluster.java:1639) at com.datastax.driver.core.Cluster$Manager.access$1100(Cluster.java:1110) at com.datastax.driver.core.Cluster$Manager$6.runMayThrow(Cluster.java:1588) at com.datastax.driver.core.ExceptionCatchingRunnable.run(ExceptionCatchingRunnable.java:32) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) 14/11/03 13:09:15 INFO LocalNodeFirstLoadBalancingPolicy: Adding host 127.0.0.1 (datacenter1) 14/11/03 13:09:15 INFO LocalNodeFirstLoadBalancingPolicy: Adding host 127.0.0.1 (datacenter1){noformat} And with the same connector and driver against cassandra 2.1.1: {noformat}14/11/03 13:31:40 ERROR ExceptionCatchingRunnable: Unexpected error while executing task java.util.concurrent.RejectedExecutionException: Task com.google.common.util.concurrent.ListenableFutureTask@41c7f034 rejected from java.util.concurrent.ThreadPoolExecutor@2d6b07a9[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0] at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2048) at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:821) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1372) at com.google.common.util.concurrent.MoreExecutors$ListeningDecorator.execute(MoreExecutors.java:484) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:132) at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:58) at com.datastax.driver.core.SessionManager.maybeAddPool(SessionManager.java:264) at com.datastax.driver.core.Cluster$Manager.onAdd(Cluster.java:1639) at com.datastax.driver.core.Cluster$Manager.access$1100(Cluster.java:1110) at com.datastax.driver.core.Cluster$Manager$6.runMayThrow(Cluster.java:1588) at com.datastax.driver.core.ExceptionCatchingRunnable.run(ExceptionCatchingRunnable.java:32) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745){noformat}
    via by Helena Edelson,
  • With the spark-cassandra-connector, branch b1.1, using java driver version 2.1.2 and cassandra 2.1.0 I see this: {noformat}14/11/03 13:09:15 ERROR ExceptionCatchingRunnable: Unexpected error while executing task java.util.concurrent.RejectedExecutionException: Task com.google.common.util.concurrent.ListenableFutureTask@3c61ee53 rejected from java.util.concurrent.ThreadPoolExecutor@4165aa1d[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0] at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2048) at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:821) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1372) at com.google.common.util.concurrent.MoreExecutors$ListeningDecorator.execute(MoreExecutors.java:484) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:132) at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:58) at com.datastax.driver.core.SessionManager.maybeAddPool(SessionManager.java:264) at com.datastax.driver.core.Cluster$Manager.onAdd(Cluster.java:1639) at com.datastax.driver.core.Cluster$Manager.access$1100(Cluster.java:1110) at com.datastax.driver.core.Cluster$Manager$6.runMayThrow(Cluster.java:1588) at com.datastax.driver.core.ExceptionCatchingRunnable.run(ExceptionCatchingRunnable.java:32) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) 14/11/03 13:09:15 INFO LocalNodeFirstLoadBalancingPolicy: Adding host 127.0.0.1 (datacenter1) 14/11/03 13:09:15 INFO LocalNodeFirstLoadBalancingPolicy: Adding host 127.0.0.1 (datacenter1) 14/11/03 13:09:15 INFO TableWriter: Wrote 0 rows in 0 batches to twitter_stream.hashtags_by_interval in 0.005 s. 14/11/03 13:09:15 INFO CassandraConnector: Connected to Cassandra cluster: Test Cluster 14/11/03 13:09:15 INFO LocalNodeFirstLoadBalancingPolicy: Adding host 127.0.0.1 (datacenter1) 14/11/03 13:09:15 INFO Cluster: New Cassandra host /127.0.0.1:9042 added 14/11/03 13:09:15 INFO LocalNodeFirstLoadBalancingPolicy: Adding host 127.0.0.1 (datacenter1) 14/11/03 13:09:15 INFO LocalNodeFirstLoadBalancingPolicy: Adding host 127.0.0.1 (datacenter1) 14/11/03 13:09:15 ERROR ExceptionCatchingRunnable: Unexpected error while executing task java.util.concurrent.RejectedExecutionException: Task com.google.common.util.concurrent.ListenableFutureTask@5bdbbf3a rejected from java.util.concurrent.ThreadPoolExecutor@37e7a7f3[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0] at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2048) at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:821) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1372) at com.google.common.util.concurrent.MoreExecutors$ListeningDecorator.execute(MoreExecutors.java:484) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:132) at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:58) at com.datastax.driver.core.SessionManager.maybeAddPool(SessionManager.java:264) at com.datastax.driver.core.Cluster$Manager.onAdd(Cluster.java:1639) at com.datastax.driver.core.Cluster$Manager.access$1100(Cluster.java:1110) at com.datastax.driver.core.Cluster$Manager$6.runMayThrow(Cluster.java:1588) at com.datastax.driver.core.ExceptionCatchingRunnable.run(ExceptionCatchingRunnable.java:32) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) 14/11/03 13:09:15 INFO LocalNodeFirstLoadBalancingPolicy: Adding host 127.0.0.1 (datacenter1) 14/11/03 13:09:15 INFO LocalNodeFirstLoadBalancingPolicy: Adding host 127.0.0.1 (datacenter1){noformat} And with the same connector and driver against cassandra 2.1.1: {noformat}14/11/03 13:31:40 ERROR ExceptionCatchingRunnable: Unexpected error while executing task java.util.concurrent.RejectedExecutionException: Task com.google.common.util.concurrent.ListenableFutureTask@41c7f034 rejected from java.util.concurrent.ThreadPoolExecutor@2d6b07a9[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0] at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2048) at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:821) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1372) at com.google.common.util.concurrent.MoreExecutors$ListeningDecorator.execute(MoreExecutors.java:484) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:132) at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:58) at com.datastax.driver.core.SessionManager.maybeAddPool(SessionManager.java:264) at com.datastax.driver.core.Cluster$Manager.onAdd(Cluster.java:1639) at com.datastax.driver.core.Cluster$Manager.access$1100(Cluster.java:1110) at com.datastax.driver.core.Cluster$Manager$6.runMayThrow(Cluster.java:1588) at com.datastax.driver.core.ExceptionCatchingRunnable.run(ExceptionCatchingRunnable.java:32) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745){noformat}
    via by Helena Edelson,
  • When Cassandra is unreachable (from the start of application) I see the following exceptions: {code:java} com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: /127.0.0.1:9042 (com.datastax.driver.core.TransportException: [/127.0.0.1:9042] Cannot connect)) at com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:196) at com.datastax.driver.core.ControlConnection.connect(ControlConnection.java:79) at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:1104) at com.datastax.driver.core.Cluster.init(Cluster.java:121) at com.datastax.driver.core.Cluster.connect(Cluster.java:198) at com.datastax.driver.core.Cluster.connect(Cluster.java:226) {code} and {code:java} java.util.concurrent.RejectedExecutionException: Task com.google.common.util.concurrent.ListenableFutureTask@36549757 rejected from java.util.concurrent.ThreadPoolExecutor@2c12300b[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0] at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2048) at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:821) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1372) at com.google.common.util.concurrent.MoreExecutors$ListeningDecorator.execute(MoreExecutors.java:484) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:132) at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:58) at com.datastax.driver.core.SessionManager.addOrRenewPool(SessionManager.java:248) at com.datastax.driver.core.SessionManager.init(SessionManager.java:67) at com.datastax.driver.core.Cluster.connect(Cluster.java:200) at com.datastax.driver.core.Cluster.connect(Cluster.java:226) {code} IMHO Cluster.connect should not throw undocumented exceptions - this breaks library consumers. Looks like the cause is that com.datastax.driver.core.Cluster.Manager#init closes the thread pools in case of exception.
    via by Mikhail Mazursky,
  • When Cassandra is unreachable (from the start of application) I see the following exceptions: {code:java} com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: /127.0.0.1:9042 (com.datastax.driver.core.TransportException: [/127.0.0.1:9042] Cannot connect)) at com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:196) at com.datastax.driver.core.ControlConnection.connect(ControlConnection.java:79) at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:1104) at com.datastax.driver.core.Cluster.init(Cluster.java:121) at com.datastax.driver.core.Cluster.connect(Cluster.java:198) at com.datastax.driver.core.Cluster.connect(Cluster.java:226) {code} and {code:java} java.util.concurrent.RejectedExecutionException: Task com.google.common.util.concurrent.ListenableFutureTask@36549757 rejected from java.util.concurrent.ThreadPoolExecutor@2c12300b[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0] at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2048) at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:821) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1372) at com.google.common.util.concurrent.MoreExecutors$ListeningDecorator.execute(MoreExecutors.java:484) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:132) at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:58) at com.datastax.driver.core.SessionManager.addOrRenewPool(SessionManager.java:248) at com.datastax.driver.core.SessionManager.init(SessionManager.java:67) at com.datastax.driver.core.Cluster.connect(Cluster.java:200) at com.datastax.driver.core.Cluster.connect(Cluster.java:226) {code} IMHO Cluster.connect should not throw undocumented exceptions - this breaks library consumers. Looks like the cause is that com.datastax.driver.core.Cluster.Manager#init closes the thread pools in case of exception.
    via by Mikhail Mazursky,
  • {noformat} import com.datastax.driver.core.Cluster; import com.datastax.driver.core.Session; public class ConnectionTest { public static void main(String[] args) throws InterruptedException { Cluster cluster = new Cluster.Builder().addContactPoint("127.0.0.1").build(); for (int i = 0; i < 10000; i++) { Session session = cluster.connect(); session.close(); } Thread.sleep(100000); cluster.close(); } } {noformat} Attach jvisualvm when this program reaches Thread.sleep call and do a heap-dump. There will be 10000 instances of SessionManager and >10000 instances of SocketChannelImpl. The program suffers connection problems during the run: {noformat} ERROR 13:40:53,510 [Control connection] Cannot connect to any host, scheduling retry ERROR 13:40:53,510 [Control connection] Cannot connect to any host, scheduling retry ERROR 13:40:53,520 [Control connection] Cannot connect to any host, scheduling retry ERROR 13:40:53,520 [Control connection] Cannot connect to any host, scheduling retry ERROR 13:40:54,521 [Control connection] Cannot connect to any host, scheduling retry in 2000 milliseconds ERROR 13:40:56,522 [Control connection] Cannot connect to any host, scheduling retry in 4000 milliseconds ERROR 13:41:00,522 [Control connection] Cannot connect to any host, scheduling retry in 8000 milliseconds ERROR 13:41:08,523 [Control connection] Cannot connect to any host, scheduling retry in 16000 milliseconds ERROR 13:41:24,523 [Control connection] Cannot connect to any host, scheduling retry in 32000 milliseconds ERROR 13:41:56,524 [Control connection] Cannot connect to any host, scheduling retry in 64000 milliseconds 10-Jul-2014 13:42:54 org.jboss.netty.channel.DefaultChannelPipeline WARNING: An exception was thrown by a user handler while handling an exception event ([id: 0x1e3e1609] EXCEPTION: java.net.BindException: Cannot assign requested address) java.util.concurrent.RejectedExecutionException at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1774) at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:768) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:656) at com.google.common.util.concurrent.MoreExecutors$ListeningDecorator.execute(MoreExecutors.java:484) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:78) at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:50) at com.datastax.driver.core.Cluster$Manager.triggerOnDown(Cluster.java:1342) at com.datastax.driver.core.Cluster$Manager.signalConnectionFailure(Cluster.java:1550) at com.datastax.driver.core.Connection.defunct(Connection.java:247) at com.datastax.driver.core.Connection$Dispatcher.exceptionCaught(Connection.java:612) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.exceptionCaught(FrameDecoder.java:377) at org.jboss.netty.channel.Channels.fireExceptionCaught(Channels.java:525) at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink.connect(NioClientSocketPipelineSink.java:131) at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink.eventSunk(NioClientSocketPipelineSink.java:70) at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:54) at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:54) at org.jboss.netty.channel.Channels.connect(Channels.java:634) at org.jboss.netty.channel.AbstractChannel.connect(AbstractChannel.java:207) at org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:229) at org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:182) at com.datastax.driver.core.Connection.<init>(Connection.java:93) at com.datastax.driver.core.PooledConnection.<init>(PooledConnection.java:28) at com.datastax.driver.core.Connection$Factory.open(Connection.java:456) at com.datastax.driver.core.HostConnectionPool.<init>(HostConnectionPool.java:85) at com.datastax.driver.core.SessionManager$2.call(SessionManager.java:190) at com.datastax.driver.core.SessionManager$2.call(SessionManager.java:186) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) 10-Jul-2014 13:42:54 org.jboss.netty.channel.DefaultChannelPipeline WARNING: An exception was thrown by a user handler while handling an exception event ([id: 0x0757b1d4] EXCEPTION: java.net.BindException: Cannot assign requested address) java.util.concurrent.RejectedExecutionException at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1774) at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:768) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:656) at com.google.common.util.concurrent.MoreExecutors$ListeningDecorator.execute(MoreExecutors.java:484) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:78) at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:50) at com.datastax.driver.core.Cluster$Manager.triggerOnDown(Cluster.java:1342) at com.datastax.driver.core.Cluster$Manager.signalConnectionFailure(Cluster.java:1550) at com.datastax.driver.core.Connection.defunct(Connection.java:247) at com.datastax.driver.core.Connection$Dispatcher.exceptionCaught(Connection.java:612) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.exceptionCaught(FrameDecoder.java:377) at org.jboss.netty.channel.Channels.fireExceptionCaught(Channels.java:525) at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink.connect(NioClientSocketPipelineSink.java:131) at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink.eventSunk(NioClientSocketPipelineSink.java:70) at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:54) at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:54) at org.jboss.netty.channel.Channels.connect(Channels.java:634) at org.jboss.netty.channel.AbstractChannel.connect(AbstractChannel.java:207) at org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:229) at org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:182) at com.datastax.driver.core.Connection.<init>(Connection.java:93) at com.datastax.driver.core.PooledConnection.<init>(PooledConnection.java:28) at com.datastax.driver.core.Connection$Factory.open(Connection.java:456) at com.datastax.driver.core.HostConnectionPool.<init>(HostConnectionPool.java:85) at com.datastax.driver.core.SessionManager$2.call(SessionManager.java:190) at com.datastax.driver.core.SessionManager$2.call(SessionManager.java:186) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) 10-Jul-2014 13:42:54 org.jboss.netty.channel.DefaultChannelPipeline WARNING: An exception was thrown by a user handler while handling an exception event ([id: 0x8787bc74, /127.0.0.1:50027 :> /127.0.0.1:9042] EXCEPTION: java.lang.NullPointerException) java.lang.NullPointerException at com.datastax.driver.core.HostConnectionPool.discardAvailableConnections(HostConnectionPool.java:402) at com.datastax.driver.core.HostConnectionPool.closeAsync(HostConnectionPool.java:389) at com.datastax.driver.core.PooledConnection.notifyOwnerWhenDefunct(PooledConnection.java:48) at com.datastax.driver.core.Connection.defunct(Connection.java:248) at com.datastax.driver.core.Connection$Dispatcher.exceptionCaught(Connection.java:612) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.exceptionCaught(FrameDecoder.java:377) at org.jboss.netty.channel.Channels.fireExceptionCaught(Channels.java:525) at org.jboss.netty.channel.AbstractChannelSink.exceptionCaught(AbstractChannelSink.java:48) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.cleanup(FrameDecoder.java:493) at org.jboss.netty.handler.codec.frame.FrameDecoder.channelClosed(FrameDecoder.java:371) at org.jboss.netty.channel.Channels.fireChannelClosed(Channels.java:468) at org.jboss.netty.channel.Channels$6.run(Channels.java:457) at org.jboss.netty.channel.socket.ChannelRunnableWrapper.run(ChannelRunnableWrapper.java:40) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:372) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:296) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) 10-Jul-2014 13:42:54 org.jboss.netty.channel.DefaultChannelPipeline WARNING: An exception was thrown by a user handler while handling an exception event ([id: 0xdeb37992, /127.0.0.1:55446 :> /127.0.0.1:9042] EXCEPTION: java.lang.NullPointerException) java.lang.NullPointerException at com.datastax.driver.core.HostConnectionPool.discardAvailableConnections(HostConnectionPool.java:402) at com.datastax.driver.core.HostConnectionPool.closeAsync(HostConnectionPool.java:389) at com.datastax.driver.core.PooledConnection.notifyOwnerWhenDefunct(PooledConnection.java:48) at com.datastax.driver.core.Connection.defunct(Connection.java:248) at com.datastax.driver.core.Connection$Dispatcher.exceptionCaught(Connection.java:612) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.exceptionCaught(FrameDecoder.java:377) at org.jboss.netty.channel.Channels.fireExceptionCaught(Channels.java:525) at org.jboss.netty.channel.AbstractChannelSink.exceptionCaught(AbstractChannelSink.java:48) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.cleanup(FrameDecoder.java:493) at org.jboss.netty.handler.codec.frame.FrameDecoder.channelClosed(FrameDecoder.java:371) at org.jboss.netty.channel.Channels.fireChannelClosed(Channels.java:468) at org.jboss.netty.channel.Channels$6.run(Channels.java:457) at org.jboss.netty.channel.socket.ChannelRunnableWrapper.run(ChannelRunnableWrapper.java:40) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:372) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:296) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) 10-Jul-2014 13:42:54 org.jboss.netty.channel.DefaultChannelPipeline WARNING: An exception was thrown by a user handler while handling an exception event ([id: 0x87e23fce, /127.0.0.1:38588 :> /127.0.0.1:9042] EXCEPTION: java.lang.NullPointerException) java.lang.NullPointerException at com.datastax.driver.core.HostConnectionPool.discardAvailableConnections(HostConnectionPool.java:402) at com.datastax.driver.core.HostConnectionPool.closeAsync(HostConnectionPool.java:389) at com.datastax.driver.core.PooledConnection.notifyOwnerWhenDefunct(PooledConnection.java:48) at com.datastax.driver.core.Connection.defunct(Connection.java:248) at com.datastax.driver.core.Connection$Dispatcher.exceptionCaught(Connection.java:612) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.exceptionCaught(FrameDecoder.java:377) at org.jboss.netty.channel.Channels.fireExceptionCaught(Channels.java:525) at org.jboss.netty.channel.AbstractChannelSink.exceptionCaught(AbstractChannelSink.java:48) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.cleanup(FrameDecoder.java:493) at org.jboss.netty.handler.codec.frame.FrameDecoder.channelClosed(FrameDecoder.java:371) at org.jboss.netty.channel.Channels.fireChannelClosed(Channels.java:468) at org.jboss.netty.channel.Channels$6.run(Channels.java:457) at org.jboss.netty.channel.socket.ChannelRunnableWrapper.run(ChannelRunnableWrapper.java:40) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:372) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:296) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) 10-Jul-2014 13:42:54 org.jboss.netty.channel.DefaultChannelPipeline WARNING: An exception was thrown by a user handler while handling an exception event ([id: 0x14b239f4, /127.0.0.1:37010 :> /127.0.0.1:9042] EXCEPTION: java.lang.NullPointerException) java.lang.NullPointerException at com.datastax.driver.core.HostConnectionPool.discardAvailableConnections(HostConnectionPool.java:402) at com.datastax.driver.core.HostConnectionPool.closeAsync(HostConnectionPool.java:389) at com.datastax.driver.core.PooledConnection.notifyOwnerWhenDefunct(PooledConnection.java:48) at com.datastax.driver.core.Connection.defunct(Connection.java:248) at com.datastax.driver.core.Connection$Dispatcher.exceptionCaught(Connection.java:612) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.exceptionCaught(FrameDecoder.java:377) at org.jboss.netty.channel.Channels.fireExceptionCaught(Channels.java:525) at org.jboss.netty.channel.AbstractChannelSink.exceptionCaught(AbstractChannelSink.java:48) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.cleanup(FrameDecoder.java:493) at org.jboss.netty.handler.codec.frame.FrameDecoder.channelClosed(FrameDecoder.java:371) at org.jboss.netty.channel.Channels.fireChannelClosed(Channels.java:468) at org.jboss.netty.channel.Channels$6.run(Channels.java:457) at org.jboss.netty.channel.socket.ChannelRunnableWrapper.run(ChannelRunnableWrapper.java:40) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:372) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:296) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) {noformat}
    via by Piotr Kołaczkowski,
  • {noformat} import com.datastax.driver.core.Cluster; import com.datastax.driver.core.Session; public class ConnectionTest { public static void main(String[] args) throws InterruptedException { Cluster cluster = new Cluster.Builder().addContactPoint("127.0.0.1").build(); for (int i = 0; i < 10000; i++) { Session session = cluster.connect(); session.close(); } Thread.sleep(100000); cluster.close(); } } {noformat} Attach jvisualvm when this program reaches Thread.sleep call and do a heap-dump. There will be 10000 instances of SessionManager and >10000 instances of SocketChannelImpl. The program suffers connection problems during the run: {noformat} ERROR 13:40:53,510 [Control connection] Cannot connect to any host, scheduling retry ERROR 13:40:53,510 [Control connection] Cannot connect to any host, scheduling retry ERROR 13:40:53,520 [Control connection] Cannot connect to any host, scheduling retry ERROR 13:40:53,520 [Control connection] Cannot connect to any host, scheduling retry ERROR 13:40:54,521 [Control connection] Cannot connect to any host, scheduling retry in 2000 milliseconds ERROR 13:40:56,522 [Control connection] Cannot connect to any host, scheduling retry in 4000 milliseconds ERROR 13:41:00,522 [Control connection] Cannot connect to any host, scheduling retry in 8000 milliseconds ERROR 13:41:08,523 [Control connection] Cannot connect to any host, scheduling retry in 16000 milliseconds ERROR 13:41:24,523 [Control connection] Cannot connect to any host, scheduling retry in 32000 milliseconds ERROR 13:41:56,524 [Control connection] Cannot connect to any host, scheduling retry in 64000 milliseconds 10-Jul-2014 13:42:54 org.jboss.netty.channel.DefaultChannelPipeline WARNING: An exception was thrown by a user handler while handling an exception event ([id: 0x1e3e1609] EXCEPTION: java.net.BindException: Cannot assign requested address) java.util.concurrent.RejectedExecutionException at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1774) at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:768) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:656) at com.google.common.util.concurrent.MoreExecutors$ListeningDecorator.execute(MoreExecutors.java:484) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:78) at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:50) at com.datastax.driver.core.Cluster$Manager.triggerOnDown(Cluster.java:1342) at com.datastax.driver.core.Cluster$Manager.signalConnectionFailure(Cluster.java:1550) at com.datastax.driver.core.Connection.defunct(Connection.java:247) at com.datastax.driver.core.Connection$Dispatcher.exceptionCaught(Connection.java:612) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.exceptionCaught(FrameDecoder.java:377) at org.jboss.netty.channel.Channels.fireExceptionCaught(Channels.java:525) at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink.connect(NioClientSocketPipelineSink.java:131) at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink.eventSunk(NioClientSocketPipelineSink.java:70) at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:54) at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:54) at org.jboss.netty.channel.Channels.connect(Channels.java:634) at org.jboss.netty.channel.AbstractChannel.connect(AbstractChannel.java:207) at org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:229) at org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:182) at com.datastax.driver.core.Connection.<init>(Connection.java:93) at com.datastax.driver.core.PooledConnection.<init>(PooledConnection.java:28) at com.datastax.driver.core.Connection$Factory.open(Connection.java:456) at com.datastax.driver.core.HostConnectionPool.<init>(HostConnectionPool.java:85) at com.datastax.driver.core.SessionManager$2.call(SessionManager.java:190) at com.datastax.driver.core.SessionManager$2.call(SessionManager.java:186) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) 10-Jul-2014 13:42:54 org.jboss.netty.channel.DefaultChannelPipeline WARNING: An exception was thrown by a user handler while handling an exception event ([id: 0x0757b1d4] EXCEPTION: java.net.BindException: Cannot assign requested address) java.util.concurrent.RejectedExecutionException at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1774) at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:768) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:656) at com.google.common.util.concurrent.MoreExecutors$ListeningDecorator.execute(MoreExecutors.java:484) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:78) at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:50) at com.datastax.driver.core.Cluster$Manager.triggerOnDown(Cluster.java:1342) at com.datastax.driver.core.Cluster$Manager.signalConnectionFailure(Cluster.java:1550) at com.datastax.driver.core.Connection.defunct(Connection.java:247) at com.datastax.driver.core.Connection$Dispatcher.exceptionCaught(Connection.java:612) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.exceptionCaught(FrameDecoder.java:377) at org.jboss.netty.channel.Channels.fireExceptionCaught(Channels.java:525) at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink.connect(NioClientSocketPipelineSink.java:131) at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink.eventSunk(NioClientSocketPipelineSink.java:70) at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:54) at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:54) at org.jboss.netty.channel.Channels.connect(Channels.java:634) at org.jboss.netty.channel.AbstractChannel.connect(AbstractChannel.java:207) at org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:229) at org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:182) at com.datastax.driver.core.Connection.<init>(Connection.java:93) at com.datastax.driver.core.PooledConnection.<init>(PooledConnection.java:28) at com.datastax.driver.core.Connection$Factory.open(Connection.java:456) at com.datastax.driver.core.HostConnectionPool.<init>(HostConnectionPool.java:85) at com.datastax.driver.core.SessionManager$2.call(SessionManager.java:190) at com.datastax.driver.core.SessionManager$2.call(SessionManager.java:186) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) 10-Jul-2014 13:42:54 org.jboss.netty.channel.DefaultChannelPipeline WARNING: An exception was thrown by a user handler while handling an exception event ([id: 0x8787bc74, /127.0.0.1:50027 :> /127.0.0.1:9042] EXCEPTION: java.lang.NullPointerException) java.lang.NullPointerException at com.datastax.driver.core.HostConnectionPool.discardAvailableConnections(HostConnectionPool.java:402) at com.datastax.driver.core.HostConnectionPool.closeAsync(HostConnectionPool.java:389) at com.datastax.driver.core.PooledConnection.notifyOwnerWhenDefunct(PooledConnection.java:48) at com.datastax.driver.core.Connection.defunct(Connection.java:248) at com.datastax.driver.core.Connection$Dispatcher.exceptionCaught(Connection.java:612) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.exceptionCaught(FrameDecoder.java:377) at org.jboss.netty.channel.Channels.fireExceptionCaught(Channels.java:525) at org.jboss.netty.channel.AbstractChannelSink.exceptionCaught(AbstractChannelSink.java:48) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.cleanup(FrameDecoder.java:493) at org.jboss.netty.handler.codec.frame.FrameDecoder.channelClosed(FrameDecoder.java:371) at org.jboss.netty.channel.Channels.fireChannelClosed(Channels.java:468) at org.jboss.netty.channel.Channels$6.run(Channels.java:457) at org.jboss.netty.channel.socket.ChannelRunnableWrapper.run(ChannelRunnableWrapper.java:40) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:372) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:296) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) 10-Jul-2014 13:42:54 org.jboss.netty.channel.DefaultChannelPipeline WARNING: An exception was thrown by a user handler while handling an exception event ([id: 0xdeb37992, /127.0.0.1:55446 :> /127.0.0.1:9042] EXCEPTION: java.lang.NullPointerException) java.lang.NullPointerException at com.datastax.driver.core.HostConnectionPool.discardAvailableConnections(HostConnectionPool.java:402) at com.datastax.driver.core.HostConnectionPool.closeAsync(HostConnectionPool.java:389) at com.datastax.driver.core.PooledConnection.notifyOwnerWhenDefunct(PooledConnection.java:48) at com.datastax.driver.core.Connection.defunct(Connection.java:248) at com.datastax.driver.core.Connection$Dispatcher.exceptionCaught(Connection.java:612) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.exceptionCaught(FrameDecoder.java:377) at org.jboss.netty.channel.Channels.fireExceptionCaught(Channels.java:525) at org.jboss.netty.channel.AbstractChannelSink.exceptionCaught(AbstractChannelSink.java:48) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.cleanup(FrameDecoder.java:493) at org.jboss.netty.handler.codec.frame.FrameDecoder.channelClosed(FrameDecoder.java:371) at org.jboss.netty.channel.Channels.fireChannelClosed(Channels.java:468) at org.jboss.netty.channel.Channels$6.run(Channels.java:457) at org.jboss.netty.channel.socket.ChannelRunnableWrapper.run(ChannelRunnableWrapper.java:40) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:372) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:296) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) 10-Jul-2014 13:42:54 org.jboss.netty.channel.DefaultChannelPipeline WARNING: An exception was thrown by a user handler while handling an exception event ([id: 0x87e23fce, /127.0.0.1:38588 :> /127.0.0.1:9042] EXCEPTION: java.lang.NullPointerException) java.lang.NullPointerException at com.datastax.driver.core.HostConnectionPool.discardAvailableConnections(HostConnectionPool.java:402) at com.datastax.driver.core.HostConnectionPool.closeAsync(HostConnectionPool.java:389) at com.datastax.driver.core.PooledConnection.notifyOwnerWhenDefunct(PooledConnection.java:48) at com.datastax.driver.core.Connection.defunct(Connection.java:248) at com.datastax.driver.core.Connection$Dispatcher.exceptionCaught(Connection.java:612) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.exceptionCaught(FrameDecoder.java:377) at org.jboss.netty.channel.Channels.fireExceptionCaught(Channels.java:525) at org.jboss.netty.channel.AbstractChannelSink.exceptionCaught(AbstractChannelSink.java:48) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.cleanup(FrameDecoder.java:493) at org.jboss.netty.handler.codec.frame.FrameDecoder.channelClosed(FrameDecoder.java:371) at org.jboss.netty.channel.Channels.fireChannelClosed(Channels.java:468) at org.jboss.netty.channel.Channels$6.run(Channels.java:457) at org.jboss.netty.channel.socket.ChannelRunnableWrapper.run(ChannelRunnableWrapper.java:40) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:372) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:296) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) 10-Jul-2014 13:42:54 org.jboss.netty.channel.DefaultChannelPipeline WARNING: An exception was thrown by a user handler while handling an exception event ([id: 0x14b239f4, /127.0.0.1:37010 :> /127.0.0.1:9042] EXCEPTION: java.lang.NullPointerException) java.lang.NullPointerException at com.datastax.driver.core.HostConnectionPool.discardAvailableConnections(HostConnectionPool.java:402) at com.datastax.driver.core.HostConnectionPool.closeAsync(HostConnectionPool.java:389) at com.datastax.driver.core.PooledConnection.notifyOwnerWhenDefunct(PooledConnection.java:48) at com.datastax.driver.core.Connection.defunct(Connection.java:248) at com.datastax.driver.core.Connection$Dispatcher.exceptionCaught(Connection.java:612) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.exceptionCaught(FrameDecoder.java:377) at org.jboss.netty.channel.Channels.fireExceptionCaught(Channels.java:525) at org.jboss.netty.channel.AbstractChannelSink.exceptionCaught(AbstractChannelSink.java:48) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.cleanup(FrameDecoder.java:493) at org.jboss.netty.handler.codec.frame.FrameDecoder.channelClosed(FrameDecoder.java:371) at org.jboss.netty.channel.Channels.fireChannelClosed(Channels.java:468) at org.jboss.netty.channel.Channels$6.run(Channels.java:457) at org.jboss.netty.channel.socket.ChannelRunnableWrapper.run(ChannelRunnableWrapper.java:40) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:372) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:296) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) {noformat}
    via by Piotr Kołaczkowski,
  • GitHub comment 2907#142746601
    via GitHub by zhiyanshao
    ,
    • java.util.concurrent.RejectedExecutionException: Task com.google.common.util.concurrent.ListenableFutureTask@41c7f034 rejected from java.util.concurrent.ThreadPoolExecutor@2d6b07a9[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0] at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2048) at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:821) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1372) at com.google.common.util.concurrent.MoreExecutors$ListeningDecorator.execute(MoreExecutors.java:484) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:132) at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:58) at com.datastax.driver.core.SessionManager.maybeAddPool(SessionManager.java:264) at com.datastax.driver.core.Cluster$Manager.onAdd(Cluster.java:1639) at com.datastax.driver.core.Cluster$Manager.access$1100(Cluster.java:1110) at com.datastax.driver.core.Cluster$Manager$6.runMayThrow(Cluster.java:1588) at com.datastax.driver.core.ExceptionCatchingRunnable.run(ExceptionCatchingRunnable.java:32) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    92 more bugmates