This did not work either. I changed /etc/cassandra.yaml and restarted Cassandra (I even restarted the machine to make 100% sure).
What I tried: 1) "listen_address: localhost" -> connection OK (but of course I can't connect from outside the VM to "localhost") 2) Set "listen_interface: eth0" -> connection refused 3) Set "listen_address: 192.168.111.136" -> connection refused What to do? > Try: > $ netstat -lnt > and see which interface port 9042 is listening on. You will likely need to > update cassandra.yaml to change the interface. By default, Cassandra is > listening on localhost so your local cqlsh session works. > On Sun, 7 Dec 2014 23:44 Richard Snowden <richard.t.snow...@gmail.com> > wrote: > > I am running Cassandra 2.1.2 in an Ubuntu VM. > > > > "cqlsh" or "cqlsh localhost" works fine. > > > > But I can not connect from outside the VM (firewall, etc. disabled). > > > > Even when I do "cqlsh 192.168.111.136" in my VM I get connection refused. > > This is strange because when I check my network config I can see that > > 192.168.111.136 is my IP: > > > > root@ubuntu:~# ifconfig > > > > eth0 Link encap:Ethernet HWaddr 00:0c:29:02:e0:de > > inet addr:192.168.111.136 Bcast:192.168.111.255 > > Mask:255.255.255.0 > > inet6 addr: fe80::20c:29ff:fe02:e0de/64 Scope:Link > > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > > RX packets:16042 errors:0 dropped:0 overruns:0 frame:0 > > TX packets:8638 errors:0 dropped:0 overruns:0 carrier:0 > > collisions:0 txqueuelen:1000 > > RX bytes:21307125 (21.3 MB) TX bytes:709471 (709.4 KB) > > > > lo Link encap:Local Loopback > > inet addr:127.0.0.1 Mask:255.0.0.0 > > inet6 addr: ::1/128 Scope:Host > > UP LOOPBACK RUNNING MTU:65536 Metric:1 > > RX packets:550 errors:0 dropped:0 overruns:0 frame:0 > > TX packets:550 errors:0 dropped:0 overruns:0 carrier:0 > > collisions:0 txqueuelen:0 > > RX bytes:148053 (148.0 KB) TX bytes:148053 (148.0 KB) > > > > > > root@ubuntu:~# cqlsh 192.168.111.136 9042 > > Connection error: ('Unable to connect to any servers', {'192.168.111.136': > > error(111, "Tried connecting to [('192.168.111.136', 9042)]. Last error: > > Connection refused")}) > > > > > > What to do? > >