All host(s) tried for query failed (tried: / ip :9042

在使用java编程的驱动代码远程连接linux上cassandra的时候出现了连接不上的问题,

接着讲 selinux 与 防火墙都关闭了,发现还是不行。



All host(s) tried for query failed (tried: /ip (com.datastax.driver.core.TransportException:[/ip] Cannot connect), /ip (com.datastax.driver.core.TransportException: [/ip] Cannot connect))


最后由于的远程连接,应该修改


如果需要远程连接,那么cassandra.yaml里面的rpc_address就需要改变为您当前环境实际的IP地址,否则会报错!


修改后就可以了!


All host(s) tried for query failed (tried: / ip :9042_第1张图片

你可能感兴趣的:(All host(s) tried for query failed (tried: / ip :9042)