cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrea Giordano <>
Subject Re: can't reach cassandra outside my lan
Date Thu, 30 Nov 2017 18:59:51 GMT
just tried, without results.
telnet my_ip 9042 returns connection refused and lsof -n -i4TCP:9042 | grep LISTEN
returns no output

> On 30 Nov 2017, at 19:42, Jon Haddad <> wrote:
> Cassandra is listening on your localhost address,, not your laptop’s address
on the network.  Set rpc_address to the address on your network, or use rpc_interface and
let Cassandra figure it out.
>> On Nov 30, 2017, at 10:38 AM, Andrea Giordano < <>>
>> Hi, osx user here.
>> I have installed a simple Cassandra db on my laptop and I would like to query it
outside the Lan.
>> So I set port forwarding and port triggering on my router (vodafone station) to link
external 9042 to internal 9042.
>> Moreover I set on cassandra.yaml the broadcast_rpc_address to my router ip.
>> Unfortunately, when I try to connect using java api I obtain:
>> Exception in thread "main" com.datastax.driver.core.exceptions.NoHostAvailableException:
All host(s) tried for query failed (tried: /HERE_THERE_IS_ROUTER_IP:9042 (com.datastax.driver.core.exceptions.TransportException:
[/HERE_THERE_IS_ROUTER_IP:9042] Cannot connect))
>> I noted that without setting broadcast_rpc_address I can reach Cassandra trough
so the database is active and running.
>> I’ve also tried  
>> lsof -n -i4TCP:9042 | grep LISTEN
>> and I obtain 
>> java    7555 giordano  184u  IPv4 0x513195612572e265      0t0  TCP
>> when I unset broadcast_rpc_address
>> and no output when I set broadcast_rpc_address.
>> Is the problem in the yaml settings on in the router settings?
>> P.S.: I have also modifying listen_address in the same way, without good news.
>> P.P.S: clearly each time I edited the yaml file I restarted cassandra

View raw message