2
votes

While creating db using cassandra cli, I am getting the following error. any idea what I am doing wrong here ? More details are listed below:

Command - create keyspace pcpro;
output  - org.apache.thrift.transport.TTransportException

When I execute the same command again, exception changes to

output - org.apache.thrift.transport.TTransportException: java.net.SocketException: Broken pipe

FYI, I am using cassandra 2.0.1

Thank you.

1

1 Answers

2
votes

If you restart cassandra, you have to also restart the CLI to reset the connection it is using to communicate with cassandra otherwise you get the broken pipe error or connection reset error:

// start cassandra
[default@unknown] create keyspace pcpro;                   
5d344e5d-635e-3745-a1a6-d82ef68bdf28                       

// reset cassandra                                         
[default@unknown] create keyspace pcpro2;
org.apache.thrift.transport.TTransportException:
      java.net.SocketException: Connection reset

// try the query a second time
[default@unknown] create keyspace pcpro2;
org.apache.thrift.transport.TTransportException: 
      java.net.SocketException: Broken pipe