I am trying to connect titan to solr. The properties file I am using is titan-cassandra-solr.properties
:
index.search.backend=solr
index.search.solr.mode=cloud
index.search.solr.zookeeper-url=localhost:2181
I have configured my titan core to be:
name: titan
instance: /opt/solr-titan/titan
data: /opt/solr-titan/data
inside /opt/solr-titan/titan
I have a conf
directory which contains all the files I copied from titandb/conf/solr
.
When I use gremlin.sh
and try:
gremlin> graph = TitanFactory.open("conf/titan-cassandra-solr.properties")
==>standardtitangraph[cassandrathrift:[127.0.0.1]]
gremlin> graph.traversal().V()
==>v[4328]
gremlin> graph.traversal().V().has("MY_ID", "www.mindmaps.com/action-movie")
==>v[4328]
gremlin> graph.traversal().V().has("MY_ID", "action-movie")
gremlin> graph.traversal().V().has("MY_ID", "www.mindmaps.com/action-movie")
==>v[4328]
it all seems to be working but when I run:
TitanGraph titanGraph = TitanFactory.open("conf/titan-cassandra-solr.properties");
I get the following exception:
6:02:51,191 INFO ClientCnxn:975 - Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
16:02:51,212 WARN ClientCnxn:1102 - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)