0

I have setup apache cassandra on a centos7 compatible linux machine in azure. I can telnet directly to port 7000, etc on the IP address on the machine, however I cannot telnet to that same port from the outside.

Port 22 works fine as an endpoint, but none of these ports will work. The only difference is that those ports were created by myself, while the 22 port was created by Azure when the vm was created.

I even added httpd and created a port 80 endpoint, no dice.

It seems as if I am missing a step. I have NO firewall setup on the machine yet, this is a proof of concept I'm working on at the moment. I thought simply setting up the endpoints with the same port for external and internal would allow traffic, but it isn't working.

Thanks for any help!

  • Why do you say you have "no firewall setup on the machine"? Did you turn it off? – Michael Hampton Oct 13 '14 at 01:49
  • I disabled it for debugging. The first answer people would say is to check the firewall, so I took it out of the equation. – nullcable Oct 13 '14 at 04:43
  • Now don't I feel foolish. Thanks for making me look at this again. I didn't turn it off after all. I'm going to double check it's not because I kept rebuilding new machines and forgot to remove it this one last time. – nullcable Oct 13 '14 at 10:40

4 Answers4

0

Verify Cassandra is configured to listen on the correct IP address (via cassandra.yaml). By default it is probably only listening on 127.0.0.1.

Gene
  • 3,633
  • 19
  • 39
  • Already confirmed it is not. I telnet to the ports on the actual IP, not the loopback interface. – nullcable Oct 13 '14 at 04:43
  • `/sbin/iptables -L --line -n` doesn't show any rules whatsoever? – Gene Oct 13 '14 at 06:33
  • Thanks! I checked and there is a listing there. I could have sworn I removed it, but I've rebuilt this machine a bunch of times in different zones, so I must have missed it. Let me retry again. – nullcable Oct 13 '14 at 10:43
0

It turns out on CentOS 7 in order to turn off the iptables service, you need the following:

sudo systemctl stop firewalld

I had just run the command to turn off iptables the old way, and didn't notice the error.

Now I can test, and if it works, will put back the iptables rule in my final machine build.

Thank You!

0

I was facing the same issue. I have changed the default settings of listen_address and rpc_address to the VM internal address and then it started working.

0

First, you should check Cassandra service is running or not. Then check the port listening states. After that, you should check firewall settings.

technoob
  • 132
  • 1
  • 14