Configuration for titan.sh and java client

33 views
Skip to first unread message

krakolas

unread,
Jan 23, 2017, 4:08:07 PM1/23/17
to Aurelius
Hello all, 

I may be really confused on what I am try to do, and may be going to wrong way about it.

I have downloaded and installed Titan 1.0.0, with an expectation to run it with the embedded cassandra and elastic search.  I am able to start the titan server using > bin/titan.sh start and later connect to it using the gremlin console. 

I also have a Java client/program that is supposed to connect to that Titan server create indexes (hopefully on elastic search) and a graph with a few vertices and edges. 

Here are my questions and the problem I am running into:

1) When I run titan.sh start, which configuration or properties file is being used ? Where are the storage.backend and search.backend is defined ?  
2) After the titan.sh starts, if I try to access elastic search using "http://localhost:9200/?pretty" I get a OK status 200, and a node it with some name for instance: Challenger.
3) When I try to connect to the server using the Java client and load the conf/titan-cassandra-es.properties file I get a log entry with a different node entry (e.g.: Human Cannonball), and then a exception is thrown: 

15:59:11,933  INFO CountingConnectionPoolMonitor:194 - AddHost: 127.0.0.1


15:59:11,941  INFO Backend:459 - Configuring index [search]


15:59:12,035  INFO plugins:151 - [Human Cannonball] loaded [], sites []


15:59:12,802  INFO ElasticSearchIndex:354 - Configured remote host: 127.0.0.1 : 9300


Exception in thread "main" java.lang.IllegalArgumentException: Could not instantiate implementation: com.thinkaurelius.titan.diskstorage.es.ElasticSearchIndex


        at com.thinkaurelius.titan.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:55)


        at com.thinkaurelius.titan.diskstorage.Backend.getImplementationClass(Backend.java:473)


        at com.thinkaurelius.titan.diskstorage.Backend.getIndexes(Backend.java:460)


        at com.thinkaurelius.titan.diskstorage.Backend.<init>(Backend.java:147)


        at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.getBackend(GraphDatabaseConfiguration.java:1805)


        at com.thinkaurelius.titan.graphdb.database.StandardTitanGraph.<init>(StandardTitanGraph.java:123)


        at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:94)


        at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:74)


        at com.infor.titan.pizza.PizzaGraphFactory.main(PizzaGraphFactory.java:119)


Caused by: java.lang.reflect.InvocationTargetException


        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)


        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)


        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)


        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)


        at com.thinkaurelius.titan.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:44)


        ... 8 more


Caused by: org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: []


        at org.elasticsearch.client.transport.TransportClientNodesService.ensureNodesAreAvailable(TransportClientNodesService.java:279)


        at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:198)


        at org.elasticsearch.client.transport.support.InternalTransportClusterAdminClient.execute(InternalTransportClusterAdminClient.java:86)


        at org.elasticsearch.client.support.AbstractClusterAdminClient.health(AbstractClusterAdminClient.java:127)


        at org.elasticsearch.action.admin.cluster.health.ClusterHealthRequestBuilder.doExecute(ClusterHealthRequestBuilder.java:92)


        at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:91)


        at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:65)


        at com.thinkaurelius.titan.diskstorage.es.ElasticSearchIndex.<init>(ElasticSearchIndex.java:201)

       ... 13 more


On the titan-cassandra-es.properties file I am loading, only the following properties are uncommented:


storage.backend=cassandra

storage.hostname=127.0.0.1


index.search.backend=elasticsearch

index.search.directory=/tmp/es

index.search.elasticsearch.client-only=false

index.search.elasticsearch.local-mode=true


The same error/exception happens if I try to load the same configuration using the gremlin console. 

Any help or suggestions will be highly appreciated. 

Thanks, 

--MD. 
Reply all
Reply to author
Forward
0 new messages