bricaud / graphexp

Interactive visualization of the Gremlin graph database with D3.js
Apache License 2.0
783 stars 216 forks source link

GraphExp not showing any results #49

Closed ErikvdVen closed 1 year ago

ErikvdVen commented 6 years ago

Hopefully somebody can help me out over here. Tried a lot of different datasets and it seems graphexp does connect to the database, because I do receive information about the database, except no nodes are being showed: https://www.dropbox.com/s/dhskbmmpnitgsgb/Screen%20Shot%202018-09-19%20at%2020.33.49.png?dl=0

I tried executing the queries, which are showed in the chrome developer console, on the database directly and I do receive results. So or I forgot about something, or it doesn't work anymore.

bricaud commented 6 years ago

What happens when you click on the 'Search' button without filling any field? Do you get some nodes?

ErikvdVen commented 6 years ago

Nope, no nodes, I receive the following error if I just hit the "Search" button, without filling any fields:

Error during serialization: (was java.lang.IllegalStateException) (through reference chain: java.util.ArrayList[0]->java.util.ArrayList[0]->org.janusgraph.graphdb.relations.RelationIdentifier["inVertexId"])

At first I thought some fields were required to fill in, because the error disappears when I do, but I still don't get some nodes or anything. So I just Googled a bit and I guess there is a problem with some kind of plugin, which Gremlin Server needs to handle the kind of queries generated by GraphExp... Still cannot figure out which kind of serialisation module or plugin might cause the problem.

Let me share some more information, perhaps that helps as well.

I'm using JanusGraph version 0.3.0 and this is my gremlin server configuration file, gremlin-server.yaml:


host: 0.0.0.0
port: 8182
threadPoolWorker: 1
gremlinPool: 8
scriptEvaluationTimeout: 30000
serializedResponseTimeout: 30000
channelizer: org.apache.tinkerpop.gremlin.server.channel.WsAndHttpChannelizer
graphs: {
  graph: janusgraph.properties
}
scriptEngines: {
  gremlin-groovy: {
    plugins: { org.apache.tinkerpop.gremlin.server.jsr223.GremlinServerGremlinPlugin: {},
               org.apache.tinkerpop.gremlin.tinkergraph.jsr223.TinkerGraphGremlinPlugin: {},
               org.apache.tinkerpop.gremlin.jsr223.ImportGremlinPlugin: {classImports: [java.lang.Math], methodImports: [java.lang.Math#*]},
               org.apache.tinkerpop.gremlin.groovy.jsr223.GroovyCompilerGremlinPlugin: {
                 enableThreadInterrupt: true,
                 timedInterrupt: 10000, 
                 # Enabling static compilation will break the empty-sample.groovy script due to the untyped "ctx" variable.
                 # compilation: COMPILE_STATIC, 
                 compilation: NONE, 
                 extensions: org.apache.tinkerpop.gremlin.groovy.jsr223.customizer.SimpleSandboxExtension},
               org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin: {files: [scripts/empty-sample.groovy]}}}}
serializers:
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0, config: { useMapperFromGraph: graph }}
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0, config: { serializeResultToString: true }}
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV1d0, config: { useMapperFromGraph: graph }}
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV2d0, config: { useMapperFromGraph: graph }}
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV3d0, config: { useMapperFromGraph: graph }}
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0, config: { useMapperFromGraph: graph }}
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV2d0, config: { useMapperFromGraph: graph }}
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV3d0, config: { useMapperFromGraph: graph }}
processors:
  - { className: org.apache.tinkerpop.gremlin.server.op.session.SessionOpProcessor, config: { sessionTimeout: 28800000 }}
metrics: {
  consoleReporter: {enabled: false, interval: 180000},
  csvReporter: {enabled: false, interval: 180000, fileName: /tmp/gremlin-server-metrics.csv},
  jmxReporter: {enabled: false},
  slf4jReporter: {enabled: true, interval: 180000},
  gangliaReporter: {enabled: false, interval: 180000, addressingMode: MULTICAST},
  graphiteReporter: {enabled: false, interval: 180000}}
threadPoolBoss: 1
maxInitialLineLength: 4096
maxHeaderSize: 8192
maxChunkSize: 8192
maxContentLength: 65536
maxAccumulationBufferComponents: 1024
resultIterationBatchSize: 64
writeBufferHighWaterMark: 32768
writeBufferHighWaterMark: 65536
ssl: {
  enabled: false}

And I'm using this Docker image as JanusGraph server, perhaps that helps to reproduce the issue: https://github.com/sunsided/janusgraph-docker

bricaud commented 6 years ago

thanks for the Docker image. I can't do it now but I will try to reproduce it tomorrow. The last version of Janusgraph seems to have added changes in the way the results are sent. I have to figure that out.

ErikvdVen commented 6 years ago

Great! Looking forward to your findings. Thank you in advance for your help :)

ErikvdVen commented 6 years ago

What is kinda interesting is that I do see a response of nodes and edges on my serverside. It shows a warning as well: in the request b979eeef-fb7b-4d97-b75c-0921551934e7 could not be serialized and returned.. So the queries are actually executed by the server, but returning the response is a problem.

I wanted to use websockets for my own webinterface as well, but now I am using the official gremlin javascript package, provided by Apache, which is working. So I can't tell what could actually be the problem, just the request's payload or some server settings as well.

bricaud commented 6 years ago

I did not try the docker image yet. It seems that there are problems with serialization using the docker container provided in the link you give (as written in the readme of the github repo). Try to choose the graphexp option protocol 'REST' and try also to change the Gremlin version option from '3.3.' to '3.2. (it changes the protocol from graphson 3 to graphson 2). It might solve the problem. Also, can you choose another docker image?