com.datastax.driver.core.TransportException

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.

  • We are trying to access Cassandra from a Spark application directly using the Cassandra Java Driver (not the spark-connector). We see the following exception being logged in our worker nodes intermittently. Everything looks to be working fine first, but after some time, we see this exception getting logged. After this exception is logged, the connection fails and soon after we get com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (no host was tried). We are using Datastax driver 2.1.7.1 against Cassandra 2.1.11 (Datastax Community). Stack trace and trace log is as follows: 2016-01-26 17:54:01.875 DEBUG - [r2-nio-worker-3] [5ca87f65-2ddc-4a45-8d01-22811dd1b6d1] com.datastax.driver.core.Connection : Connection[/192.172.2.51:9042-1, inFlight=0, closed=false] connection error java.lang.NullPointerException at com.datastax.driver.core.ProtocolOptions.getProtocolVersionEnum(ProtocolOptions.java:178) at com.datastax.driver.core.QueryLogger.protocolVersion(QueryLogger.java:753) at com.datastax.driver.core.QueryLogger.parameterValueAsString(QueryLogger.java:738) at com.datastax.driver.core.QueryLogger.appendParameters(QueryLogger.java:709) at com.datastax.driver.core.QueryLogger.logQuery(QueryLogger.java:647) at com.datastax.driver.core.QueryLogger.maybeLogNormalQuery(QueryLogger.java:631) at com.datastax.driver.core.QueryLogger$ConstantThresholdQueryLogger.maybeLogNormalOrSlowQuery(QueryLogger.java:278) at com.datastax.driver.core.QueryLogger.update(QueryLogger.java:620) at com.datastax.driver.core.Cluster$Manager.reportLatency(Cluster.java:1422) at com.datastax.driver.core.RequestHandler$SpeculativeExecution.onSet(RequestHandler.java:607) at com.datastax.driver.core.Connection$Dispatcher.channelRead0(Connection.java:991) at com.datastax.driver.core.Connection$Dispatcher.channelRead0(Connection.java:913) at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:254) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:163) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787) at io.netty.channel.epoll.EpollSocketChannel$EpollSocketUnsafe.epollInReady(EpollSocketChannel.java:722) at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:326) at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:264) at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) at java.lang.Thread.run(Thread.java:745) 2016-01-26 17:54:01.876 DEBUG - [r2-nio-worker-3] [5ca87f65-2ddc-4a45-8d01-22811dd1b6d1] com.datastax.driver.core.Connection : Defuncting connection to /192.172.2.51:9042 com.datastax.driver.core.TransportException: [/192.172.2.51:9042] Unexpected exception triggered (java.lang.NullPointerException) at com.datastax.driver.core.Connection$Dispatcher.exceptionCaught(Connection.java:1028) at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:271) at io.netty.channel.AbstractChannelHandlerContext.notifyHandlerException(AbstractChannelHandlerContext.java:768) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:335) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:254) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:163) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787) at io.netty.channel.epoll.EpollSocketChannel$EpollSocketUnsafe.epollInReady(EpollSocketChannel.java:722) at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:326) at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:264) at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NullPointerException at com.datastax.driver.core.ProtocolOptions.getProtocolVersionEnum(ProtocolOptions.java:178) at com.datastax.driver.core.QueryLogger.protocolVersion(QueryLogger.java:753) at com.datastax.driver.core.QueryLogger.parameterValueAsString(QueryLogger.java:738) at com.datastax.driver.core.QueryLogger.appendParameters(QueryLogger.java:709) at com.datastax.driver.core.QueryLogger.logQuery(QueryLogger.java:647) at com.datastax.driver.core.QueryLogger.maybeLogNormalQuery(QueryLogger.java:631) at com.datastax.driver.core.QueryLogger$ConstantThresholdQueryLogger.maybeLogNormalOrSlowQuery(QueryLogger.java:278) at com.datastax.driver.core.QueryLogger.update(QueryLogger.java:620) at com.datastax.driver.core.Cluster$Manager.reportLatency(Cluster.java:1422) at com.datastax.driver.core.RequestHandler$SpeculativeExecution.onSet(RequestHandler.java:607) at com.datastax.driver.core.Connection$Dispatcher.channelRead0(Connection.java:991) at com.datastax.driver.core.Connection$Dispatcher.channelRead0(Connection.java:913) at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) ... 16 more
    via by Yohan Liyanage,
  • We are trying to access Cassandra from a Spark application directly using the Cassandra Java Driver (not the spark-connector). We see the following exception being logged in our worker nodes intermittently. Everything looks to be working fine first, but after some time, we see this exception getting logged. After this exception is logged, the connection fails and soon after we get com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (no host was tried). We are using Datastax driver 2.1.7.1 against Cassandra 2.1.11 (Datastax Community). Stack trace and trace log is as follows: 2016-01-26 17:54:01.875 DEBUG - [r2-nio-worker-3] [5ca87f65-2ddc-4a45-8d01-22811dd1b6d1] com.datastax.driver.core.Connection : Connection[/192.172.2.51:9042-1, inFlight=0, closed=false] connection error java.lang.NullPointerException at com.datastax.driver.core.ProtocolOptions.getProtocolVersionEnum(ProtocolOptions.java:178) at com.datastax.driver.core.QueryLogger.protocolVersion(QueryLogger.java:753) at com.datastax.driver.core.QueryLogger.parameterValueAsString(QueryLogger.java:738) at com.datastax.driver.core.QueryLogger.appendParameters(QueryLogger.java:709) at com.datastax.driver.core.QueryLogger.logQuery(QueryLogger.java:647) at com.datastax.driver.core.QueryLogger.maybeLogNormalQuery(QueryLogger.java:631) at com.datastax.driver.core.QueryLogger$ConstantThresholdQueryLogger.maybeLogNormalOrSlowQuery(QueryLogger.java:278) at com.datastax.driver.core.QueryLogger.update(QueryLogger.java:620) at com.datastax.driver.core.Cluster$Manager.reportLatency(Cluster.java:1422) at com.datastax.driver.core.RequestHandler$SpeculativeExecution.onSet(RequestHandler.java:607) at com.datastax.driver.core.Connection$Dispatcher.channelRead0(Connection.java:991) at com.datastax.driver.core.Connection$Dispatcher.channelRead0(Connection.java:913) at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:254) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:163) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787) at io.netty.channel.epoll.EpollSocketChannel$EpollSocketUnsafe.epollInReady(EpollSocketChannel.java:722) at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:326) at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:264) at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) at java.lang.Thread.run(Thread.java:745) 2016-01-26 17:54:01.876 DEBUG - [r2-nio-worker-3] [5ca87f65-2ddc-4a45-8d01-22811dd1b6d1] com.datastax.driver.core.Connection : Defuncting connection to /192.172.2.51:9042 com.datastax.driver.core.TransportException: [/192.172.2.51:9042] Unexpected exception triggered (java.lang.NullPointerException) at com.datastax.driver.core.Connection$Dispatcher.exceptionCaught(Connection.java:1028) at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:271) at io.netty.channel.AbstractChannelHandlerContext.notifyHandlerException(AbstractChannelHandlerContext.java:768) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:335) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:254) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:163) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787) at io.netty.channel.epoll.EpollSocketChannel$EpollSocketUnsafe.epollInReady(EpollSocketChannel.java:722) at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:326) at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:264) at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NullPointerException at com.datastax.driver.core.ProtocolOptions.getProtocolVersionEnum(ProtocolOptions.java:178) at com.datastax.driver.core.QueryLogger.protocolVersion(QueryLogger.java:753) at com.datastax.driver.core.QueryLogger.parameterValueAsString(QueryLogger.java:738) at com.datastax.driver.core.QueryLogger.appendParameters(QueryLogger.java:709) at com.datastax.driver.core.QueryLogger.logQuery(QueryLogger.java:647) at com.datastax.driver.core.QueryLogger.maybeLogNormalQuery(QueryLogger.java:631) at com.datastax.driver.core.QueryLogger$ConstantThresholdQueryLogger.maybeLogNormalOrSlowQuery(QueryLogger.java:278) at com.datastax.driver.core.QueryLogger.update(QueryLogger.java:620) at com.datastax.driver.core.Cluster$Manager.reportLatency(Cluster.java:1422) at com.datastax.driver.core.RequestHandler$SpeculativeExecution.onSet(RequestHandler.java:607) at com.datastax.driver.core.Connection$Dispatcher.channelRead0(Connection.java:991) at com.datastax.driver.core.Connection$Dispatcher.channelRead0(Connection.java:913) at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) ... 16 more
    via by Yohan Liyanage,
    • com.datastax.driver.core.TransportException: [/192.172.2.51:9042] Unexpected exception triggered (java.lang.NullPointerException) at com.datastax.driver.core.Connection$Dispatcher.exceptionCaught(Connection.java:1028) at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:271) at io.netty.channel.AbstractChannelHandlerContext.notifyHandlerException(AbstractChannelHandlerContext.java:768) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:335) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:254) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:163) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787) at io.netty.channel.epoll.EpollSocketChannel$EpollSocketUnsafe.epollInReady(EpollSocketChannel.java:722) at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:326) at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:264) at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NullPointerException at com.datastax.driver.core.ProtocolOptions.getProtocolVersionEnum(ProtocolOptions.java:178) at com.datastax.driver.core.QueryLogger.protocolVersion(QueryLogger.java:753) at com.datastax.driver.core.QueryLogger.parameterValueAsString(QueryLogger.java:738) at com.datastax.driver.core.QueryLogger.appendParameters(QueryLogger.java:709) at com.datastax.driver.core.QueryLogger.logQuery(QueryLogger.java:647) at com.datastax.driver.core.QueryLogger.maybeLogNormalQuery(QueryLogger.java:631) at com.datastax.driver.core.QueryLogger$ConstantThresholdQueryLogger.maybeLogNormalOrSlowQuery(QueryLogger.java:278) at com.datastax.driver.core.QueryLogger.update(QueryLogger.java:620) at com.datastax.driver.core.Cluster$Manager.reportLatency(Cluster.java:1422) at com.datastax.driver.core.RequestHandler$SpeculativeExecution.onSet(RequestHandler.java:607) at com.datastax.driver.core.Connection$Dispatcher.channelRead0(Connection.java:991) at com.datastax.driver.core.Connection$Dispatcher.channelRead0(Connection.java:913) at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) ... 16 more
    No Bugmate found.