Question about Loading the Graph of the Gods Into JanusGraph

56 views
Skip to first unread message

Lujia Zhang

unread,
Dec 21, 2017, 12:19:35 PM12/21/17
to JanusGraph developers
Hi Team, so I'm new to JanusGraph and having trouble with following the getting started tutorial from JanusGraph website. 
First, when I open Gremlin Shell, it gives a lot of warnings, which is concerning. Also having issue with executing graph = JanusGraphFactory.open('conf/janusgraph-berkeleyje-es.properties')


Error trace is long, if needed, I can post more error traces.

Please help.


Screen Shot 2017-12-21 at 11.06.16 AM.png
Screen Shot 2017-12-21 at 11.09.55 AM.png

Keith Lohnes

unread,
Dec 21, 2017, 3:37:26 PM12/21/17
to Lujia Zhang, JanusGraph developers
Lujila, 

This would be better addressed in the JanusGraph users list. https://groups.google.com/forum/#!forum/janusgraph-users

This issue can happen if you don't have elasticsearch running/configured properly. Try just running `graph = JanusGraphFactory.open('conf/janusgraph-berkeleyje.properties')`

You also shouldn't need to sudo to run JanusGraph. just run bin/gremlin.sh, though it may cause issues for you now if you don't since the BerkeleyDB directory was created with sudo privileges.

Cheers,
Keith

--
You received this message because you are subscribed to the Google Groups "JanusGraph developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgraph-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-dev/8a9f2f33-390f-4cb4-a6a8-7e63fd41350a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Serge Prud'homme

unread,
Feb 5, 2020, 3:52:29 PM2/5/20
to JanusGraph developers
Old post but still relevant two years later. I expect try the Graph of the Gods examples would be the first thing a new user would try yet it doesn't work out of the box. Even when using the 

I tried this

graph = JanusGraphFactory.open('conf/janusgraph-berkeleyje.properties')
and I get this:
Could not instantiate implementation: org.janusgraph.diskstorage.es.ElasticSearchIndex

I'm running with the docker image: docker run --name janusgraph1 -it -p 8182:8182 janusgraph/janusgraph:latest
As suggested here: https://docs.janusgraph.org/getting-started/installation/

Thanks,

Le jeudi 21 décembre 2017 15:37:26 UTC-5, Keith Lohnes a écrit :
Lujila, 

This would be better addressed in the JanusGraph users list. https://groups.google.com/forum/#!forum/janusgraph-users

This issue can happen if you don't have elasticsearch running/configured properly. Try just running `graph = JanusGraphFactory.open('conf/janusgraph-berkeleyje.properties')`

You also shouldn't need to sudo to run JanusGraph. just run bin/gremlin.sh, though it may cause issues for you now if you don't since the BerkeleyDB directory was created with sudo privileges.

Cheers,
Keith

On Thu, Dec 21, 2017 at 11:19 AM Lujia Zhang <lukezh...@gmail.com> wrote:
Hi Team, so I'm new to JanusGraph and having trouble with following the getting started tutorial from JanusGraph website. 
First, when I open Gremlin Shell, it gives a lot of warnings, which is concerning. Also having issue with executing graph = JanusGraphFactory.open('conf/janusgraph-berkeleyje-es.properties')


Error trace is long, if needed, I can post more error traces.

Please help.


--
You received this message because you are subscribed to the Google Groups "JanusGraph developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgr...@googlegroups.com.

Debasish Kanhar

unread,
Feb 5, 2020, 8:45:18 PM2/5/20
to janusgr...@googlegroups.com
Are you specifying the elastic search index connection properties in your berkey.properties file?
If you don't want to use ES and using this just for exploration purpose then you can use .loadWithoutMixedIndex(true). That should resolve your problem

To unsubscribe from this group and stop receiving emails from it, send an email to janusgraph-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-dev/f06df5b4-1f53-452d-b3c9-1fbd68637963%40googlegroups.com.

李博軒

unread,
Feb 5, 2020, 10:09:06 PM2/5/20
to janusgr...@googlegroups.com
Absolutely agree that "Graph of the Gods examples would be the first thing a new user would try yet it doesn't work out of the box”. I wonder why JanusGraph doesn't have a ‘conf/janusgraph-inmemory.properties’ and use that in the quick start example, so that users don’t need to worry about storage backend and index backen? Am I missing something?

One reason I can think of is that the in-memory backend was for testing purpose only. However, after https://github.com/JanusGraph/janusgraph/pull/1483, the in-memory backend should be production ready now.

Best,
Boxuan

Serge Prudhomme

unread,
Feb 6, 2020, 8:09:20 AM2/6/20
to janusgr...@googlegroups.com
Thanks Debasish,
I haven't modified any configuration file. 
I'm just running the docker image as is from the image repository as I indicated.

I tried the following as you suggested. Not sure if I'm doing it right: 
gremlin> graph = JanusGraphFactory.open('conf/janusgraph-berkeleyje.properties').loadWithoutMixedIndex(true)

And still get this error:
11:15:02 WARN  org.janusgraph.diskstorage.es.rest.RestElasticSearchClient  - Unable to determine Elasticsearch server version. Default to FIVE.
java.net.ConnectException: Connection refused
at org.elasticsearch.client.RestClient$SyncResponseListener.get(RestClient.java:952)
at org.elasticsearch.client.RestClient.performRequest(RestClient.java:229)
... long stack dump...
Caused by: 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

Also if I look at the README in the docker repo and try to do the same it doesn't work.
docker run --rm --link janusgraph-default:janusgraph -e GREMLIN_REMOTE_HOSTS=janusgraph \
>     -it janusgraph/janusgraph:latest ./bin/gremlin.sh
Feb 06, 2020 12:46:15 PM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.

         \,,,/
         (o o)
-----oOOo-(3)-oOOo-----
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/janusgraph/lib/slf4j-log4j12-1.7.12.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/janusgraph/lib/logback-classic-1.1.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
plugin activated: tinkerpop.server
plugin activated: tinkerpop.tinkergraph
12:46:21 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.utilities
plugin activated: janusgraph.imports
gremlin> g.addV('person').property('name', 'chris')
No such property: g for class: groovysh_evaluate
So it looks like something changed in Gremlin and wasn't propagated to the instructions everywhere.

Regards,
  Serge

Debasish Kanhar

unread,
Feb 6, 2020, 9:25:37 AM2/6/20
to janusgr...@googlegroups.com
Hi Serge, 

I'm not in front of computer right now, so can't verify why you are getting the error in first portion. It still seems to be reading ES config from somewhere. I suspect the berkley.properties (default) maybe has connection specific for ES that's why it's reading insipite of loading withoutMixedIndex.

As for the second one, that I can say will surely throw an error. You aren't doing following things: 

1: not connecting to gremlin server instance started by docker container. 
2; you aren't submitting the scripts in right way. 

Look at the link https://github.com/JanusGraph/janusgraph-docker/blob/master/README.md and go-to Connecting via gremlin console.

You don't have something like :>remote.connect 
Once u do that, you can do query like :> g.V().count().

Note the difference between ur query and one I sent. It preceded by :> 

That means you aren't running query locally but submitting it to remote instance. (Check JanusGraph gremlin server docs)

As for first one, will reply once I get access to laptop to verify the property file which comes bundled

Thanks

Reply all
Reply to author
Forward
0 new messages