SnapOverflow

SnapOverflow Logo SnapOverflow Logo

SnapOverflow Navigation

  • Home
  • Server
  • Ubuntu

Mobile menu

Close
  • Home
  • System Administrators
    • Hot Questions
    • New Questions
    • Tags
  • Ubuntu
    • Hot Questions
    • New Questions
    • Tags
  • Help
Home / server / Questions / 279293
Accepted
jnbdz
jnbdz
Asked: 2011-06-11 11:26:06 +0800 CST2011-06-11 11:26:06 +0800 CST 2011-06-11 11:26:06 +0800 CST

Cannot connect to my Cassandra

  • 772

My Cassandra used to work with no problems.

I was able to connect with no problems but now for some reason it doesn't work anymore.

[default@unknown] connect localhost/9160;
Exception connecting to localhost/9160. Reason: Connection refused.

and

root# ./bin/cassandra-cli -host localhost -port 9160
Exception connecting to localhost/9160. Reason: Connection refused.

I am on Linux Ubuntu Server.

Thanks in advance...

ubuntu cassandra connection-refused
  • 2 2 Answers
  • 14038 Views

2 Answers

  • Voted
  1. Best Answer
    Konstantin S.
    2011-12-17T06:33:23+08:002011-12-17T06:33:23+08:00

    As others have already suggested make sure your cassandra instance is running

    ps axu | grep cassandra
    

    If the output tells you that it is running you can check what ports it is listening on:

    netstat -tulpn | grep -i listen | grep <pid>
    

    where is the process id of your cassandra instance which you can get from the output of the first command.

    You are interested to find the port 9160 in the output of this command. You will know from this what address it is listening on (if for some reason it is no longer a localhost).

    If for some reason you can't find 9160 port in the list of the listening sockets then you might want to check your cassandra.yaml config file (search for rpc_port). You will also find there the address where thrift binds to to listen for clients on.

    • 6
  2. Perry Cox
    2016-01-12T05:08:25+08:002016-01-12T05:08:25+08:00

    By default Thrift is not up, you have to start it with

    nodetool enablethrift
    
    • 4

Sidebar

Stats

  • Questions 681965
  • Answers 980273
  • Best Answers 280204
  • Users 287326
  • Popular
  • Answers
  • Marko Smith

    Ping a Specific Port

    • 18 Answers
  • Marko Smith

    Check if port is open or closed on a Linux server?

    • 7 Answers
  • Marko Smith

    How to automate SSH login with password?

    • 10 Answers
  • Marko Smith

    How do I tell Git for Windows where to find my private RSA key?

    • 30 Answers
  • Marko Smith

    What's the default superuser username/password for postgres after a new install?

    • 5 Answers
  • Marko Smith

    What port does SFTP use?

    • 6 Answers
  • Marko Smith

    Resolve host name from IP address

    • 8 Answers
  • Marko Smith

    Command line to list users in a Windows Active Directory group?

    • 9 Answers
  • Marko Smith

    What is a Pem file and how does it differ from other OpenSSL Generated Key File Formats?

    • 3 Answers
  • Marko Smith

    How to determine if a bash variable is empty?

    • 15 Answers
  • Martin Hope
    Davie Ping a Specific Port 2009-10-09 01:57:50 +0800 CST
  • Martin Hope
    Smudge Our security auditor is an idiot. How do I give him the information he wants? 2011-07-23 14:44:34 +0800 CST
  • Martin Hope
    kernel Can scp copy directories recursively? 2011-04-29 20:24:45 +0800 CST
  • Martin Hope
    Robert ssh returns "Bad owner or permissions on ~/.ssh/config" 2011-03-30 10:15:48 +0800 CST
  • Martin Hope
    Eonil How to automate SSH login with password? 2011-03-02 03:07:12 +0800 CST
  • Martin Hope
    gunwin How do I deal with a compromised server? 2011-01-03 13:31:27 +0800 CST
  • Martin Hope
    Tom Feiner How can I sort du -h output by size 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich What is a Pem file and how does it differ from other OpenSSL Generated Key File Formats? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent How to determine if a bash variable is empty? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus How do you find what process is holding a file open in Windows? 2009-05-01 16:47:16 +0800 CST

Related Questions

Trending Tags

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • Home
  • Questions
    • Hot Questions
    • New Questions
  • Tags
  • Help

Footer

SnapOverflow

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Help

© 2022 SOF-TR. All Rights Reserve