Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

harpreet.virk_85599 avatar image
harpreet.virk_85599 asked ·

cassandra-stress with authentication enabled giving error "org.apache.thrift.transport.TTransportException:"

Am running the stress with the below command and getting exceptions, it created the keyspace and table

$ cassandra-stress user profile=/home/ec2-user/labwork/labwork/TestProfile.yaml ops\(insert=1000000,user_by_email=100000\) -node **** -mode thrift user=cassandra password=***
Generating batches with [1..1] partitions and [1..1] rows (of [1..1] total rows in the partitions)
java.lang.RuntimeException: org.apache.thrift.transport.TTransportException: java.net.ConnectException: Connection refused (Connection refused)
    at org.apache.cassandra.stress.settings.StressSettings.getRawThriftClient(StressSettings.java:160)
    at org.apache.cassandra.stress.settings.StressSettings.getSimpleThriftClient(StressSettings.java:121)
    at org.apache.cassandra.stress.settings.StressSettings.getThriftClient(StressSettings.java:101)
    at org.apache.cassandra.stress.StressProfile.getInsert(StressProfile.java:491)
    at org.apache.cassandra.stress.settings.SettingsCommandUser$1.get(SettingsCommandUser.java:83)
    at org.apache.cassandra.stress.settings.SettingsCommandUser$1.get(SettingsCommandUser.java:79)
    at org.apache.cassandra.stress.operations.SampledOpDistributionFactory$1.get(SampledOpDistributionFactory.java:81)
    at org.apache.cassandra.stress.StressAction.run(StressAction.java:222)
    at org.apache.cassandra.stress.StressAction.warmup(StressAction.java:110)
    at org.apache.cassandra.stress.StressAction.run(StressAction.java:61)
    at org.apache.cassandra.stress.Stress.run(Stress.java:133)
    at org.apache.cassandra.stress.Stress.main(Stress.java:61)
Caused by: org.apache.thrift.transport.TTransportException: java.net.ConnectException: Connection refused (Connection refused)
    at org.apache.thrift.transport.TSocket.open(TSocket.java:187)
    at org.apache.thrift.transport.TFramedTransport.open(TFramedTransport.java:81)
    at org.apache.cassandra.thrift.TFramedTransportFactory.openTransport(TFramedTransportFactory.java:42)
    at org.apache.cassandra.stress.settings.StressSettings.getRawThriftClient(StressSettings.java:140)
    ... 11 more
Caused by: java.net.ConnectException: Connection refused (Connection refused)
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:607)
    at org.apache.thrift.transport.TSocket.open(TSocket.java:182)
cassandra-stress
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered ·

I don't think the issue has anything to do with authentication.

Is there a particular reason you want to run in Thrift mode? Thrift was deprecated 5 or 6 years ago so it's most likely that your cluster is not listening on the Thrift port (default 9160).

Of course, this depends on the version of Cassandra you're running. The Thrift server was disabled in C* 2.2 and completely removed in the upcoming 4.0 release.

If you really need to test Thrift, you'll have to configure Cassandra to start the Thrift server on startup. Cheers!

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.