Sunday, April 29, 2012

How to remote debug Apache Cassandra standalone server


In order to debug the cassandra server from your favorite IDE. You need to add the following into cassandra-env.sh located in apache-cassandra-1.1.0/conf directory.

JVM_OPTS="$JVM_OPTS -Xdebug"
JVM_OPTS="$JVM_OPTS -Xnoagent"
JVM_OPTS="$JVM_OPTS -Djava.compiler=NONE"
JVM_OPTS="$JVM_OPTS -Xrunjdwp:transport=dt_socket,server=y,address=5005,suspend=n"
cassandra-env.sh




After adding this, once you start the server you can see the following line printed in cassandra console

"Listening for transport dt_socket at address: 5005" 

This the port that you specified in JAVA_OPTS. You can change it to some other value as you want.

Now configure your IDE to run on debug mode.



Now you can debug the apache cassandra server from your favorite IDE :)

6 comments:

benslin kard said...

Cassandra being more suitable for real time transaction processing and the serving of interactive data.

Daisy Dreamz said...

In computing, distributed means splitting data or tasks across multiple machines. In the context of Cassandra, it means that the data is distributed across multiple machines.

Gopal Ainavalli said...
This comment has been removed by the author.
Gopal Ainavalli said...

Good informative blog.Thank you so much for sharing.

Weblogic Server 12cR2 Training

Peter Johnson said...

Very Helpful Post And Explained Very Clearly About All the things.Very Helpful. Coming To Our Self We Provide Restaurant Equipment Parts Through Out US At Very Affordable Prices And Also We Offer Same Day Shipping In US.We Offer Only Genuine Products.Really Thanks For Sharing.Have A Nice day.

seo said...

Thums Up! Wat an Extravagant Blog! Completely Cleared All my Doubts,Really Thanks For
Posting and covered all my topics,Urgent Care Services Provided by US.Thanks For Sharing Such An Great Article.I just Want to share this blog with my family and friends.