can't get a titan graph instance from gremlin server - titan

I started two gremlin server in two different machines ,for distribute computing.
Here is part of gremlin-server.yaml
host: 192.168.200.115
port: 8182
threadPoolWorker: 3
gremlinPool: 6
scriptEvaluationTimeout: 30000
serializedResponseTimeout: 30000
channelizer: org.apache.tinkerpop.gremlin.server.channel.WebSocketChannelizer
graphs: {graph: conf/titan-cassandra-es.properties}
....
Here is part of titan-cassandra-es.properties
storage.backend=cassandrathrift
gremlin.graph=com.thinkaurelius.titan.core.TitanFactory
storage.hostname=192.168.200.115,192.168.200.116
storage.cassandra.keyspace=titan
storage.cassandra.replication-factor=3
....
It's all right when I started the gremlin server ,and connected to the gremlin server cluster:
gremlin> :remote connect tinkerpop.server conf/remote.yaml
==>Connected - dns121/192.168.200.116:8182, dns115/192.168.200.115:8182
But when I want to get the graph instance ,It's warning 'No such property: graph for class: groovysh_evaluate'.
gremlin> graph
No such property: graph for class: groovysh_evaluate
Display stack trace? [yN] n
But in this page, it shows we can use graph directly after we connected to a gremlin server cluster.
So question is ,Which part I'm missing ?

Your syntax is bad. You are evaluating "graph" locally in the console and not on the server. You need to include :submit with your command or as shown in the documentation you referenced :> (the shortcut for :sumbit).
gremlin> :> graph
That should fix your problem. Note that in later versions of TinkerPop you can put the "remote" into console mode with:
gremlin> :remote console
which allows you to omit the :>. You can read more about that here. That feature is not available on Titan 1.0 but thought I would mention it.

Related

Dgraph: Can't see API data in Console

I'm running a test Dgraph instance in a dgraph/standalone Docker container, using the github.com/dgraph-io/dgo/v200/protos/api API on port 9080 to write data, but can't see the changes in the Console on port 8000. Using the API to query the previously written data works fine, so I wonder if the API and the Console are somehow using different name spaces?
Are you committing the transaction? I have seen users complaining about this, but they forgot to commit the txn.

Not Found http://localhost:3000/openapi.json -loopback 3

Please help me,I'm stuck at this point.
Steps done succesfully,
1)Install loopback 3
2)datasource is created ,generated models from mysql and generator script
3)updated model-config.json
4)loopback has run with no errors
Web server listening at: http://localhost:3000
Browse your REST API at http://localhost:3000/explorer
---This was command prompt
5)when trying to access that Not Found http://localhost:3000/openapi.json
LoopBack 3 does not support OpenAPI v3, we support the older v2 specification only (it's usually referred to as Swagger).
The API spec in Swagger JSON format is available at the following URL:
http://0.0.0.0:3000/explorer/swagger.json
Please check out the recently announced LoopBack 4 version if you are interested in OpenAPI v3: the announcement and the new website.
I faced same error
Clear your browser cache then run URl
http://localhost:3000/explorer

Error while executing gremlin query on OrientDB

The following query when run from OrientDB studio gives error.
Query:
g.V('userId', 'SDWEQS').repeat(out()).until(has('organizationId','org1'));
Error:
groovy.lang.MissingMethodException: No signature of method: com.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.out() is applicable for argument types: () values: []
Possible solutions: put(java.lang.String, java.lang.Object), get(java.lang.String), wait(), any(), dump(), wait(long)
I tried running the query using the OrientJs Node app but get the same error. I created the same graph on gremlin server and this query works there.
My question is whether orientdb supports repeat()? Please suggest alternatives to make the above query work.
What I found is that OrientDB is only supporting gremlin queries of Tinkerpop 2.x. And "repeat()" wasn't part of 2.x. I will have to rework the query to use "loop()" instead.
See my answer here:
https://stackoverflow.com/a/54775290/1211805
Basically just use the OrientDB REST API (port 2480)

Connect Gremlin shell to Titan Elasticsearch/Cassandra embedded instance?

I'm using Titan 0.3.2 in embedded mode with Cassandra and Elasticsearch. I am using the configuration documented in the titan docs for my cassandra-es.properties (fed into titan.sh/titan.bat):
storage.backend=embeddedcassandra
storage.cassandra-config-dir=config/cassandra.yaml
storage.index.search.backend=elasticsearch
storage.index.search.directory=/tmp/searchindex
storage.index.search.client-only=false
storage.index.search.local-mode=true
But I'm trying to get the right configuration for bin/cassandra-es.local to connect to the Titan server via the Gremlin client shell (with g = TitanFactory.open("cassandra-es.local") ). If I try to use the default version included with the download:
storage.backend=cassandrathrift
storage.hostname=127.0.0.1
The graph won't know anything about the ES index ("Index is unknown or not configured: search").
If I configure it with:
storage.backend=cassandrathrift
storage.hostname=127.0.0.1
storage.index.search.backend=elasticsearch
storage.index.search.client-only=false
storage.index.search.directory=/tmp/cassandra/elasticsearch
It will create an ES instance on another port that seems to exist separately from the one used by the server.
My question: (how) can I set up my Gremlin console to properly communicate with the Titan Embedded Server?
There was some recent discussion about this on the Google group. It looks like it's actually not possible to run two ES instances on one machine, so one of the easier ways around this is to set up ES separately on a VM.
I tried out this solution, and it works fine with these lines in both cassandra-es.local and titan-server-cassandra-es.properties:
storage.index.search.backend=elasticsearch
storage.index.search.hostname=<VM ES server IP>
storage.index.search.client-only=true
I can now access the same ES index from both the Gremlin shell and the Titan server.

ElasticSearch with Play 2 configuration

I am trying to use the ElasticSearch module (https://github.com/cleverage/play2-elasticsearch) with my Play 2 application. In the readme, it says I should add the following to my application.conf:
## define local mode or not
elasticsearch.local=false
## list clients
elasticsearch.client="192.168.0.46:9300"
# ex : elasticsearch.client="192.168.0.46:9300,192.168.0.47:9300"
What is local mode? What is my client URL supposed to be? I can not find any information on what these options should be. With my current options, I get a NoNodeAvailableException.
Some people suggest:
elasticsearch.local=false elasticsearch.client=mynode1:9200,mynode2:9200
But what is mynode1 and mynode2? It doesn't work with my application. Can anyone help? Thanks
What is local mode?
If elaticsearch.local=true, a elasticsearch node is started in your application ( embedded )
What is my client URL supposed to be?
It's your host:port, but the port is the tcp transport define on your elasticsearch node.
By default, the port start on 9300 ( http://www.elasticsearch.org/guide/reference/modules/transport.html )
I can not find any information on what these options should be. With my current options, I get a NoNodeAvailableException.
I think you have a problem on port number.
mynode1 and mynode2 are elasticsearch nodes.
Do you have any Elasticsearch node running?
On which IP address?
Can you try to connect on these nodes using curl, for example:
curl localhost:9200
Or
curl YOURIPADDRESS:9200
If one of this is successful, then configure your play app using YOURIPADDRESS:9300 as Nicolas Boire wrote before.
If no one is successful, check that you have installed Elasticsearch and launched it before.
HTH
I've just had the same problem, be sure that you respect the version requirements written in the table : https://github.com/cleverage/play2-elasticsearch
At the beginning, I set up the latest version of the plugin 0.8.1 but my ElasticSearch version was 1.0.2.
By starting ES with version 0.9.13, it worked.