s7/scale7-pelops — Issue #55: Cassandra node timeout is a reason of Thrift pool creation failure
Author: eryabitskiy
Created: 2011-11-11 07:43:21+00:00
State: open

When some Cassandra node doesn't refuse connections and doesn't respond pool fails on creation and application become malfunction.

How to reproduce bug:
Open socket on localhost with socket -sl 9060
and try to connect to it

java-search-http-pop-1 Registering MBean 'com.scale7.cassandra.pelops.pool:type=PooledNode-*****-127.0.0.1'...
java-search-http-pop-1 Failed to set keyspace on client. See cause for details...
org.apache.thrift.transport.TTransportException: java.net.SocketTimeoutException: Read timed out
at org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:129) ~[libthrift-0.6.1.jar:0.6.1]
at org.apache.thrift.transport.TTransport.readAll(TTransport.java:84) ~[libthrift-0.6.1.jar:0.6.1]
at org.apache.thrift.transport.TFramedTransport.readFrame(TFramedTransport.java:129) ~[libthrift-0.6.1.jar:0.6.1]
at org.apache.thrift.transport.TFramedTransport.read(TFramedTransport.java:101) ~[libthrift-0.6.1.jar:0.6.1]
at org.apache.thrift.transport.TTransport.readAll(TTransport.java:84) ~[libthrift-0.6.1.jar:0.6.1]
at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:378) ~[libthrift-0.6.1.jar:0.6.1]
at org.apache.thrift.protocol.TBinaryProtocol.readI32(TBinaryProtocol.java:297) ~[libthrift-0.6.1.jar:0.6.1]
at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:204) ~[libthrift-0.6.1.jar:0.6.1]
at org.apache.cassandra.thrift.Cassandra$Client.recv_set_keyspace(Cassandra.java:471) ~[cassandra-thrift-0.8.6.jar:0.8.6]
at org.apache.cassandra.thrift.Cassandra$Client.set_keyspace(Cassandra.java:456) ~[cassandra-thrift-0.8.6.jar:0.8.6]
at org.scale7.cassandra.pelops.Connection.open(Connection.java:110) ~[classes/:na]
at org.scale7.cassandra.pelops.pool.CommonsBackedPool$ConnectionFactory.makeObject(CommonsBackedPool.java:891) [scale7-pelops-1.2-0.8.x.jar:na]