Date
1 - 9 of 9
Can't use Janus with Berkeley and Lucine. Need help here.
Augusto Will <pw...@...>
I dont understand how to use the Janus with Berkeley and Lucene, I changed gremlin-server.yalm with graphs: { graph: conf/janusgraph-berkeleyje-lucene.properties run ./bin/gremlin-server.sh The: :remote connect tinkerpop.server /home/will/janusgraph/conf/remote.yaml session-managed and :remote console is needed? and trying to connect... I just try all these things, but nothing works, i dont understand how to use that, someone help me here please!!!! graph = JanusGraphFactory.open('/home/will/janusgraph/conf/janusgraph-berkeleyje-es.properties') Connection refused SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory] 18:26:59 WARN org.apache.hadoop.util.NativeCodeLoader - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable plugin activated: tinkerpop.hadoop plugin activated: tinkerpop.spark plugin activated: tinkerpop.tinkergraph gremlin> graph = JanusGraphFactory.open('/home/will/janusgraph/conf/janusgraph-berkeleyje-lucene.properties') 18:27:06 WARN org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration - Local setting index.search.backend=lucene (Type: GLOBAL_OFFLINE) is overridden by globally managed value (elasticsearch). Use the ManagementSystem interface instead of the local configuration to control this setting. 18:27:06 WARN org.janusgraph.diskstorage.es.rest.RestElasticSearchClient - Unable to determine Elasticsearch server version. Default to FIVE. 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.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvent(DefaultConnectingIOReactor.java:171) at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:145) at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:348) at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:192) at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:64) at java.lang.Thread.run(Thread.java:748) Could not instantiate implementation: org.janusgraph.diskstorage.es.ElasticSearchIndex Type ':help' or ':h' for help. Display stack trace? [yN] gremlin> graph = JanusGraphFactory.open('/home/will/janusgraph/conf/janusgraph-berkeleyje-es.properties') 18:15:44 WARN org.janusgraph.diskstorage.es.rest.RestElasticSearchClient - Unable to determine Elasticsearch server version. Default to FIVE. 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.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvent(DefaultConnectingIOReactor.java:171) at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:145) at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:348) at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:192) at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:64) at java.lang.Thread.run(Thread.java:748) Could not instantiate implementation: org.janusgraph.diskstorage.es.ElasticSearchIndex Type ':help' or ':h' for help. Display stack trace? [yN] gremlin> graph = JanusGraphFactory.open('/home/will/janusgraph/conf/janusgraph-berkeleyje-lucene.properties') 18:16:25 WARN org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration - Local setting index.search.backend=lucene (Type: GLOBAL_OFFLINE) is overridden by globally managed value (elasticsearch). Use the ManagementSystem interface instead of the local configuration to control this setting. 18:16:25 WARN org.janusgraph.diskstorage.es.rest.RestElasticSearchClient - Unable to determine Elasticsearch server version. Default to FIVE. 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.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvent(DefaultConnectingIOReactor.java:171) at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:145) at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:348) at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:192) at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:64) at java.lang.Thread.run(Thread.java:748) Could not instantiate implementation: org.janusgraph.diskstorage.es.ElasticSearchIndex Type ':help' or ':h' for help. Display stack trace? [yN] gremlin> graph = JanusGraphFactory.open('/home/will/janusgraph/conf/janusgraph-berkeleyje-lucene.properties') 18:17:13 WARN org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration - Local setting index.search.backend=lucene (Type: GLOBAL_OFFLINE) is overridden by globally managed value (elasticsearch). Use the ManagementSystem interface instead of the local configuration to control this setting. 18:17:13 WARN org.janusgraph.diskstorage.es.rest.RestElasticSearchClient - Unable to determine Elasticsearch server version. Default to FIVE. 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.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvent(DefaultConnectingIOReactor.java:171) at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:145) at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:348) at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:192) at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:64) at java.lang.Thread.run(Thread.java:748) Could not instantiate implementation: org.janusgraph.diskstorage.es.ElasticSearchIndex Type ':help' or ':h' for help. Display stack trace? [yN] gremlin> graph = JanusGraphFactory.open('/home/will/janusgraph/conf/janusgraph-berkeleyje-lucene.properties') 18:17:32 WARN org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration - Local setting index.search.backend=lucene (Type: GLOBAL_OFFLINE) is overridden by globally managed value (elasticsearch). Use the ManagementSystem interface instead of the local configuration to control this setting. 18:17:32 WARN org.janusgraph.diskstorage.es.rest.RestElasticSearchClient - Unable to determine Elasticsearch server version. Default to FIVE. 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.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvent(DefaultConnectingIOReactor.java:171) at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:145) at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:348) at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:192) at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:64) at java.lang.Thread.run(Thread.java:748) Could not instantiate implementation: org.janusgraph.diskstorage.es.ElasticSearchIndex Type ':help' or ':h' for help. Display stack trace? [yN] gremlin> g No such property: g for class: groovysh_evaluate Type ':help' or ':h' for help. Display stack trace? [yN] gremlin> :remote connect tinkerpop.server /home/will/janusgraph/conf/remote.yaml session-managed ==>Configured localhost/127.0.0.1:8182-[c8f5dd7f-8c8f-40d6-99e9-3d6fe3020566] gremlin> :remote console ==>All scripts will now be sent to Gremlin Server - [localhost/127.0.0.1:8182]-[c8f5dd7f-8c8f-40d6-99e9-3d6fe3020566] - type ':remote console' to return to local mode gremlin> graph = JanusGraphFactory.open('/home/will/janusgraph/conf/janusgraph-berkeleyje-lucene.properties') (JE 7.3.7) /home/will/janusgraph/conf/../db/berkeley The environment cannot be locked for single writer access. ENV_LOCKED: The je.lck file could not be locked. Environment is invalid and must be closed. Type ':help' or ':h' for help. Display stack trace? [yN] gremlin> g4 No such property: g4 for class: Script6 Type ':help' or ':h' for help. Display stack trace? [yN] gremlin> :remote console ==>All scripts will now be evaluated locally - type ':remote console' to return to remote mode for Gremlin Server - [localhost/127.0.0.1:8182]-[c8f5dd7f-8c8f-40d6-99e9-3d6fe3020566] gremlin> graph = JanusGraphFactory.open('/home/will/janusgraph/conf/janusgraph-berkeleyje-lucene.properties') 18:20:40 WARN org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration - Local setting index.search.backend=lucene (Type: GLOBAL_OFFLINE) is overridden by globally managed value (elasticsearch). Use the ManagementSystem interface instead of the local configuration to control this setting. 18:20:40 WARN org.janusgraph.diskstorage.es.rest.RestElasticSearchClient - Unable to determine Elasticsearch server version. Default to FIVE. 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.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvent(DefaultConnectingIOReactor.java:171) at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:145) at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:348) at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:192) at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:64) at java.lang.Thread.run(Thread.java:748) Could not instantiate implementation: org.janusgraph.diskstorage.es.ElasticSearchIndex Type ':help' or ':h' for help. Display stack trace? [yN] gremlin> |
|
Robert Dale <rob...@...>
I don't know if Berkeley/Lucene support more than one process connecting to it. Safe bet is it to connect only to Gremlin Server. There are many options. See how to do that starting here - http://tinkerpop.apache.org/docs/3.2.6/reference/#connecting-via-console Part of the problem with your JanusGraphFactory statements is trying to use '-es' instead of 'lucene' hence the connection refused. But as I stated, I don't know if it's safe for more than one process to read/write against berkeley/lucene files on the filesystem. So just do one or the other until someone finds out. Robert Dale On Fri, Oct 20, 2017 at 4:29 PM, Augusto Will <pw...@...> wrote:
|
|
Augusto Will <pw...@...>
Robert, I dont understand what i need to do to use this configuration and why this -es. I think the better configuration to me is lucene/Berkeley, because I trying to run in notebook with only 8Gb RAM. In the case, i need to run this to work on localhost, but I dont understando how to start the server and how to use that. In this case, I have only one proccess accessing Janus Em sexta-feira, 20 de outubro de 2017 18:37:15 UTC-2, Robert Dale escreveu:
|
|
Augusto Will <pw...@...>
Every time i try to access g or graph, i get a error: gremlin> :remote connect tinkerpop.server conf/remote.yaml ==>Configured localhost/127.0.0.1:8182 gremlin> g No such property: g for class: Script14 Type ':help' or ':h' for help. Display stack trace? [yN] gremlin> :remote console ==>All scripts will now be evaluated locally - type ':remote console' to return to remote mode for Gremlin Server - [localhost/127.0.0.1:8182] gremlin> :remote console ==>All scripts will now be sent to Gremlin Server - [localhost/127.0.0.1:8182] - type ':remote console' to return to local mode gremlin> g No such property: g for class: Script14 Type ':help' or ':h' for help. Display stack trace? [yN] Em sexta-feira, 20 de outubro de 2017 18:29:11 UTC-2, Augusto Will escreveu:
|
|
Augusto Will <pw...@...>
My problem here is how to access the g.V() g and graph seems to not exists,,,,, Em sexta-feira, 20 de outubro de 2017 18:29:11 UTC-2, Augusto Will escreveu:
|
|
Jason Plurad <plu...@...>
I'd suggest you remove the Gremlin Server from the picture just to start, so go ahead and shut it down. If you were using the pre-packaged JanusGraph server (which spins up C*, ES, and Gremlin Server), shut that down too. Using JanusGraph with Berkeley and Lucene is really easy to use with the Gremlin Console. They store data locally on the file system. If you look in the conf/janusgraph-berkeleyje-lucene.properties file, you'll see the specific file directories. Since you've had a few false starts, you'd probably be best off recursively deleting those directories so you can start from scratch.
That's it. You are all set to go at this point. You can see the directories/files that were created by your storage/indexing backends. If you want to start from scratch again, just remove those files and directories. Next, like Robert mentioned before, BerkeleyJE doesn't allow multiple connections to it. For example, you can't have 2 different Gremlin Console sessions connecting to the same db using the method above. This is one situation where you might want to introduce the Gremlin Server. When you do this, the Gremlin Server has to be the one that connects to BerkeleyJE. So if you are currently connected via the Gremlin Console, close that down first. I'm going to walk through what I think you did, then fix it as we go. So first you updated the conf/gremlin-server/gremlin-server.yaml so that it uses BerkeleyJE/Lucene instead of C*/ES.
Start the Gremlin Server which uses conf/gremlin-server/gremlin-server.yaml by default:
That's a lot of output, and if you didn't scroll back to find the error, you might think that the server started with no errors. The error indicates that the properties file is missing a property. Update conf/janusgraph-berkeleyje-lucene.properties with this:
Restart the Gremlin Server and you'll see the error has gone away. I've included the key parts to look for below:
You can see that the Gremlin Server was able to create the graph and the graph traversal source 'g'. Now you can connect to the graph running on the Gremlin Server. Keep in mind that you will be doing a remote connection, instead of a direct connecction as we did initially. You don't need to make a direct connection with JanusGraphFactory because the Gremlin Server has already done this for you.
If you start mixing between BerkeleyJE-Lucene and BerkeleyJE-Elasticsearch, you really need to keep an eye on those directories (storage.backend.directory and index.search.directory). These must be unique for every new graph instance you want to create. On Friday, October 20, 2017 at 1:55:43 PM UTC-7, Augusto Will wrote:
|
|
Augusto Will <pw...@...>
Thank you a lot, Jason. Em sexta-feira, 20 de outubro de 2017 18:29:11 UTC-2, Augusto Will escreveu:
|
|
Augusto Will <pw...@...>
Is possible to put this
inside some file? Em sábado, 21 de outubro de 2017 05:13:11 UTC-2, Augusto Will escreveu:
|
|
Jason Plurad <plu...@...>
Yes, then you can start the console like this
On Saturday, October 28, 2017 at 1:36:27 AM UTC-4, Augusto Will wrote:
|
|