cannot connect to "remote" elastic search instance with titan+rexster

243 views
Skip to first unread message

Filip Melík

unread,
Mar 7, 2014, 10:55:36 AM3/7/14
to aureliu...@googlegroups.com
This is a followup on my problem here:  https://groups.google.com/d/msg/aureliusgraphs/I5fc9RmevDA/50Of5q-3Zh4J

We have found that i cannot reach my indices through gremlin console when created in rexster and vice versa.
The solution should be not using the embedded Elasticsearch instance in titan server. So I downloaded the elastic search, installed it and run it. I can successfully connect it on my server on port 9200, but I cannot get it to work with titan.

I changed my configuration to be like this, according to this document:

storage.backend=cassandrathrift
storage.hostname=127.0.0.1
storage.keyspace=titan
cache.db-cache = true
cache.db-cache-clean-wait = 20
cache.db-cache-time = 180000
cache.db-cache-size = 0.25
autotype=none

storage.index.search.backend=elasticsearch
storage.index.search.hostname= 127.0.0.1:9200 (it still does not work when i remove the :9200, 127.0.0.1 is there because the ES instance is running on the same machine as the Titan server, but it shoud not be in the same JVM)
storage.index.search.client-only=true
storage.index.search.local-mode=false

but when trying to load this configuration file via gremlin REPL it gives me this:

gremlin> g = TitanFactory.open('/opt/titan-server-0.4.1/conf/titan-cassandra-es-remote.properties')
Could not instantiate implementation: com.thinkaurelius.titan.diskstorage.es.ElasticSearchIndex
Display stack trace? [yN] WARN  org.elasticsearch.transport.netty  - [Mimir] Message not fully read (response) for [0] handler org.elasticsearch.client.transport.TransportClientNodesService$SniffNodesSampler$1$1@71e93fad, error [true], resetting

java.lang.IllegalArgumentException: Could not instantiate implementation: com.thinkaurelius.titan.diskstorage.es.ElasticSearchIndex
    at com.thinkaurelius.titan.diskstorage.Backend.instantiate(Backend.java:346)
    at com.thinkaurelius.titan.diskstorage.Backend.getImplementationClass(Backend.java:358)
    at com.thinkaurelius.titan.diskstorage.Backend.getIndexes(Backend.java:322)
    at com.thinkaurelius.titan.diskstorage.Backend.<init>(Backend.java:116)
    at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.getBackend(GraphDatabaseConfiguration.java:1108)
    at com.thinkaurelius.titan.graphdb.database.StandardTitanGraph.<init>(StandardTitanGraph.java:75)
    at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:40)
    at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:29)
    at com.thinkaurelius.titan.core.TitanFactory$open.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at groovysh_evaluate.run(groovysh_evaluate:56)
    at groovysh_evaluate$run.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
    at org.codehaus.groovy.tools.shell.Interpreter.evaluate(Interpreter.groovy:67)
    at org.codehaus.groovy.tools.shell.Interpreter$evaluate.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:152)
    at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:114)
    at org.codehaus.groovy.tools.shell.Shell$leftShift$0.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at org.codehaus.groovy.tools.shell.ShellRunner.work(ShellRunner.groovy:88)
    at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$work(InteractiveShellRunner.groovy)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1079)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:128)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:148)
    at org.codehaus.groovy.tools.shell.InteractiveShellRunner.work(InteractiveShellRunner.groovy:100)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:272)
    at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:52)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:137)
    at org.codehaus.groovy.tools.shell.ShellRunner.run(ShellRunner.groovy:57)
    at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$run(InteractiveShellRunner.groovy)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1079)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:128)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:148)
    at org.codehaus.groovy.tools.shell.InteractiveShellRunner.run(InteractiveShellRunner.groovy:66)
    at com.thinkaurelius.titan.tinkerpop.gremlin.Console.<init>(Console.java:57)
    at com.thinkaurelius.titan.tinkerpop.gremlin.Console.<init>(Console.java:70)
    at com.thinkaurelius.titan.tinkerpop.gremlin.Console.main(Console.java:96)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at com.thinkaurelius.titan.diskstorage.Backend.instantiate(Backend.java:335)
    ... 63 more
Caused by: org.elasticsearch.client.transport.NoNodeAvailableException: No node available
    at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:205)
    at org.elasticsearch.client.transport.support.InternalTransportClusterAdminClient.execute(InternalTransportClusterAdminClient.java:85)
    at org.elasticsearch.client.support.AbstractClusterAdminClient.health(AbstractClusterAdminClient.java:87)
    at org.elasticsearch.action.admin.cluster.health.ClusterHealthRequestBuilder.doExecute(ClusterHealthRequestBuilder.java:98)
    at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:85)
    at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:59)
    at com.thinkaurelius.titan.diskstorage.es.ElasticSearchIndex.<init>(ElasticSearchIndex.java:161)
    ... 68 more
gremlin> WARN  org.elasticsearch.transport.netty  - [Mimir] Message not fully read (response) for [1] handler org.elasticsearch.client.transport.TransportClientNodesService$SniffNodesSampler$1$1@563d35d9, error [true], resetting

any ideas what might be wrong? I tried to google but no luck so far

Daniel Kuppitz

unread,
Mar 7, 2014, 11:00:30 AM3/7/14
to aureliu...@googlegroups.com
Hi Filip,

first: remove the port from storage.index.search.hostname

I've never seen this error before. Which version of ES have you downloaded? Make sure that it's <1.0.

Cheers,
Daniel



--
You received this message because you are subscribed to the Google Groups "Aurelius" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aureliusgraph...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Filip Melík

unread,
Mar 8, 2014, 11:40:09 AM3/8/14
to aureliu...@googlegroups.com
I am afraid that it is version 1.0, but i cannot verify it right now. It is not compatible with titan? Any ideas where can I get version < 1.0?

thanks!

Dne pátek, 7. března 2014 17:00:30 UTC+1 Daniel Kuppitz napsal(a):

Daniel Kuppitz

unread,
Mar 8, 2014, 11:53:20 AM3/8/14
to aureliu...@googlegroups.com
Titan 0.4.2 is compatible with ES 0.90.x (where x >= 3). You can find the latest 0.90.x release here: http://www.elasticsearch.org/downloads/ (click "past releases & notes"). The latest release compatible with Titan 0.4.2 is 0.90.12 (released Feb. 25th).

Also see: Titan Version Compatibility

Cheers,
Daniel

Filip Melík

unread,
Mar 10, 2014, 7:54:13 AM3/10/14
to aureliu...@googlegroups.com
The ES i was using was version 1.0, and when I switched to version you suggested, it works now. so it is a version incompatibility.

Many thanks Daniel and Stephen!

Dne sobota, 8. března 2014 17:53:20 UTC+1 Daniel Kuppitz napsal(a):
Reply all
Reply to author
Forward
0 new messages