Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

How is this possible? I dont understand

Server A ip=
Server B ip=

Server A:
ufw status 
23                         ALLOW
9160                       ALLOW
Anywhere                   ALLOW

Server A
telnet 9160
Connected to
Escape character is '^]'.

On Server B
telnet 1111.111.111.111 9160
telnet: Unable to connect to remote host: Connection refused

How is this possible? I me]an I have the port open for server B. This makes no sense.... Yes..a process is running on server A which is cassandra on 9160 demonstrated above with the telnet into

How can server B get a connection refused?

FYI...I have cassadra.yaml set the the public facing ip address.

Also on the cassandra server....its listing in 9160

lsof -i :9160
java    16593 cassandra   96u  IPv4 66540142      0t0  TCP ip6-localhost:9160 (LISTEN)

netstat -apn|grep -w 9160
tcp        0      0*               LISTEN      16593/java  
share|improve this question

closed as off-topic by MikeyB, Jenny D, Iain, dawud, mdpc Apr 15 '14 at 17:21

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions must demonstrate a minimal understanding of the problem being solved. Try including attempted solutions, why they didn't work, and the expected results. See How can I ask better questions on Server Fault? for further guidance." – MikeyB, Jenny D, Iain, dawud
If this question can be reworded to fit the rules in the help center, please edit the question.

Is the process listening on all IP addresses or only on loopback? – Jenny D Apr 15 '14 at 7:17
Please show the output of netstat -tnlp | grep :9160 – Iain Apr 15 '14 at 7:41
Ok so now you have a definitive answer to your question - it is as, jennyd and I said - your application is not listening on the external IP address. It should be easy to fix now. – Iain Apr 15 '14 at 7:53
Given that I have listen_address in cassandra.yaml set to the ip address of the machine...what else do I need to do? – Tampa Apr 15 '14 at 8:51
The answer already given was correct, according to the information you just posted here. Something is clearly wrong with your chef template and you need to go fix it. – Michael Hampton Apr 16 '14 at 5:13

2 Answers 2

Port is open, but Cassandra might be bound to ip only. You have to make sure it is configured to be accessed via non IP.

You need to set ListenAddress in cassandra.

share|improve this answer
One of many options, yes. OP should try telnet 9160 from A. Also, sudo netstat -ntpl on A. – dmourati Apr 15 '14 at 6:38
In cassandra I have the listen address set to the public facing ip address – Tampa Apr 15 '14 at 7:28
So do a netstat -apn|grep -w 9160 and post the results in your question. – MadHatter Apr 15 '14 at 7:30
I posted the netstat command – Tampa Apr 15 '14 at 7:49
I stand correct, it is listening on instead of public IP. Please set ListenAddress in cassandra. – Apr 15 '14 at 7:53

Connection Refused generally means that nothing is listening on the relevant port. Use netstat to confirm where the application is listening and take appropriate action.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.