Unable to connect to remote cassandra using Apache zeppelin

217 views
Skip to first unread message

Soumya N

unread,
Nov 15, 2017, 1:14:54 AM11/15/17
to DataStax Java Driver for Apache Cassandra User Mailing List
Hi,
I am trying to connect to remote cassandra(version: 3.11.0) from host machine using Apache zeppelin(version: 0.7.3).
I have set the properties in Zeppelin i.e..,cassandra interpreter properties-
cassandra host: repmote_ip
cassandra.native.port:9042

And changes in the cassandra.yaml file in remote machine-
listen_address: machine_ip
rpc_adress: machine_ip
rpc_port: 9042
start_rpc: true

I'm able to connect to local cassandra which is on host machine and extract the data but
i'm unable to connect to remote cassandra and the issue is:

com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: /100.96.176.97:9042 (com.datastax.driver.core.exceptions.TransportException: [/100.96.176.97] Cannot connect))
    at com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:233)
    at com.datastax.driver.core.ControlConnection.connect(ControlConnection.java:79)
    at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:1424)
    at com.datastax.driver.core.Cluster.init(Cluster.java:163)
    at com.datastax.driver.core.Cluster.connectAsync(Cluster.java:334)
    at com.datastax.driver.core.Cluster.connectAsync(Cluster.java:309)
    at com.datastax.driver.core.Cluster.connect(Cluster.java:251)
    at org.apache.zeppelin.cassandra.CassandraInterpreter.open(CassandraInterpreter.java:230)
    at org.apache.zeppelin.interpreter.LazyOpenInterpreter.open(LazyOpenInterpreter.java:70)
    at org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer.java:491)
    at org.apache.zeppelin.scheduler.Job.run(Job.java:175)
    at org.apache.zeppelin.scheduler.ParallelScheduler$JobRunner.run(ParallelScheduler.java:162)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)


Thanks,
Soumya N

Rishikesan Varadharajan

unread,
Nov 15, 2017, 2:12:31 AM11/15/17
to java-dri...@lists.datastax.com
Hi Soumya,
   Try to use machine_ip in properties in Zeppelin i.e..,cassandra interpreter properties. It'll work.

Regards,
Rishikesan V

--
You received this message because you are subscribed to the Google Groups "DataStax Java Driver for Apache Cassandra User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to java-driver-user+unsubscribe@lists.datastax.com.



--
Thanks & Regards
Rishikesan

Soumya N

unread,
Nov 15, 2017, 2:46:56 AM11/15/17
to java-dri...@lists.datastax.com
Thanks for replying,
It works fine for localhost i.e.., putting my machine_ip. But i want to connect to remote machine's cassandra.
So had changed property (cassandra_host: remote_machine_ip)  of cassandra interpreter in Zeppelin 

Rishikesan Varadharajan

unread,
Nov 15, 2017, 3:29:01 AM11/15/17
to java-dri...@lists.datastax.com
Can you post your machine_ip? If it’s going to be localhost Zeppelin won’t connect to it.

To unsubscribe from this group and stop receiving emails from it, send an email to java-driver-us...@lists.datastax.com.



--
Thanks & Regards
Rishikesan

--
You received this message because you are subscribed to the Google Groups "DataStax Java Driver for Apache Cassandra User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to java-driver-us...@lists.datastax.com.

--
You received this message because you are subscribed to the Google Groups "DataStax Java Driver for Apache Cassandra User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to java-driver-us...@lists.datastax.com.

Ishaq Sahibole

unread,
Jan 24, 2019, 1:45:29 AM1/24/19
to DataStax Java Driver for Apache Cassandra User Mailing List
Hi Soumya,

I am facing the same issue. Kindly suggest me a workaround.

Regards,
Ishaq Sahibole
To unsubscribe from this group and stop receiving emails from it, send an email to java-driver-us...@lists.datastax.com.



--
Thanks & Regards
Rishikesan

--
You received this message because you are subscribed to the Google Groups "DataStax Java Driver for Apache Cassandra User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to java-driver-us...@lists.datastax.com.

hemendra kumar

unread,
Jan 24, 2019, 5:24:24 AM1/24/19
to java-dri...@lists.datastax.com
Hi Soumya,

Could you please check your firewall rules, required port should be open in iptable. You can cross check using telenet or nc command.

Thanks, 
Hemendra 

--
Reply all
Reply to author
Forward
0 new messages