How do I enable dynamic graphs while using the latest docker image `janusgraph/janusgraph:latest`?

With the following configuration settings and using the default g alias I can work with gremlin/JanusGraph no problem:
environment:
janusgraph.set-vertex-id: true
storage.backend: cql
storage.hostname: sdb:9042
janusgraph.index.search.backend: elasticsearch
janusgraph.index.search.hostname: index:${ELASTIC_PORT-.env ELASTIC_PORT needs to be set}
environment:
janusgraph.set-vertex-id: true
storage.backend: cql
storage.hostname: sdb:9042
janusgraph.index.search.backend: elasticsearch
janusgraph.index.search.hostname: index:${ELASTIC_PORT-.env ELASTIC_PORT needs to be set}
I've tried a variety of different configurations (from what I saw on docs, github, with prefixes like janusgraph. gremlin., gremlinserver. ) for around 4 hours and I haven't once been able to avoid this exception when using an alias that is not g. gremlinpy.exception.GremlinServerError: 499: The traversal source [project_ee46f177ab874d539dab0fb87311ef4f] for alias [g] is not configured on the server. How do I add support for dynamic graphs in a docker-compose file with these settings?
49 Replies
deleted
deletedOP2y ago
GitHub
add a key named "ConfigurationManagementGraph" to the "graphs" prop...
Please help to have a look, thanks! I've configured ConfigurationManagementGraph!But it still reported an error。 config: my code is: ` @test public void graphConfigurationShouldBeWhatWeExpectWh...
deleted
deletedOP2y ago
Lol, I'm pretty sure I've iterated through nearly every possible configuration combination
Florian Hockmann
The issue you're describing in the linked issue sounds to me like a problem of configuring the Docker image, not one of ConfigurationManagementGraph. Can you as a first step please verify that JanusGraph is actually using the YAML config file you mounted in? You can do that by starting the image with the arguments janusgraph show-config as described here: https://github.com/JanusGraph/janusgraph-docker#generate-config
GitHub
GitHub - JanusGraph/janusgraph-docker: JanusGraph Docker images
JanusGraph Docker images. Contribute to JanusGraph/janusgraph-docker development by creating an account on GitHub.
Florian Hockmann
In general, it is definitely possible to use ConfigurationManagementGraph to dynamically create graphs and that can also be done with the Docker image. We're doing that at my company. So, if you're just getting started with JanusGraph, don't feel discouraged 🙂 I noticed that you're commenting in different old issues with your problems. Please don't do that as it makes it difficult to keep track of the original issue if we're starting to discuss the specifics of your problem in the same issue
deleted
deletedOP2y ago
Sorry about commenting in multiple issues, I saw so many and didnt want to neccesarily create one but maybe that wouldve been best. https://groups.google.com/g/janusgraph-users/c/1sR33Ez60MM I see stuff like this and it looks like its possible and Ive since moved on from the question titled here where I can seemingly create graphs but accessing the traversal isnt possible. More details were mentioned here: https://github.com/JanusGraph/janusgraph/issues/883
GitHub
Bind dynamically created graphs to the gremlin executor's global bi...
Full discussion of why this is important and a general plan of attack can be found in this TinkerPop issue, and it turns out we can host the solution purely at the JanusGraph level without directly...
Florian Hockmann
In the linked issue, you posted a stack trace which shows that you're trying to access the traversal source project_f2aff4ebab684dd0a49afba88d3fcf7d. I assume you have created a graph with the name project_f2aff4ebab684dd0a49afba88d3fcf7d, right? In that case, the traversal source should be named project_f2aff4ebab684dd0a49afba88d3fcf7d_traversal as described here: https://docs.janusgraph.org/operations/dynamic-graphs/#dynamic-graph-and-traversal-bindings The form is always: <graph.graphname>_traversal
deleted
deletedOP2y ago
I tried with _traversal as well and that fails. Let me get the logs. And yes I see the create call in scylla from gremlin/janus or whatever
deleted
deletedOP2y ago

client = await cluster.connect(hostname='janus')
await client.submit(f"""
map = new HashMap<>()
map.put('storage.backend', 'cql')
map.put('storage.hostname', 'sdb:9042')
map.put('index.search.backend', 'elasticsearch')
map.put('index.search.hostname', 'index:9200')
map.put('graph.graphname', 'project_{project_uuid.replace('-', '')}')
ConfiguredGraphFactory.createConfiguration(new MapConfiguration(map))
""")
return new_project

client = await cluster.connect(hostname='janus')
await client.submit(f"""
map = new HashMap<>()
map.put('storage.backend', 'cql')
map.put('storage.hostname', 'sdb:9042')
map.put('index.search.backend', 'elasticsearch')
map.put('index.search.hostname', 'index:9200')
map.put('graph.graphname', 'project_{project_uuid.replace('-', '')}')
ConfiguredGraphFactory.createConfiguration(new MapConfiguration(map))
""")
return new_project
Graphs are created with this snippet
deleted
deletedOP2y ago
When I POST/create the graph I see scylla and janus logs:
Florian Hockmann
OK, you need to distinguish between a graph and a graph traversal source. ConfiguredGraphFactory creates and configures graphs, but your application executes traversals on a graph traversal source. This means that _traversal is not necesary when interacting with the ConfiguredGraphFactory. So, please try ConfiguredGraphFactory.open('<graph.graphname>) without the _traversal part If that doesn't work, then please check that the graph was actually created by executing ConfiguredGraphFactory.getGraphNames() which gives you a list of all created graphs. This should include the graph you're trying to open
deleted
deletedOP2y ago
I updated the call to ConfiguredGraphFactory.open('project_{project_uuid}');[] and still running into issues Currently trying to run ConfiguredGraphFactory.getGraphNames() but I get a ResultSet in python which I cant do much with. Just need to figure out how to connect bin/gremlin.sh correctly as that throws org.janusgraph.graphdb.management.utils.ConfigurationManagementGraphNotEnabledException: Please add a key named "ConfigurationManagementGraph" to the "graphs" property in your YAML file and restart the server to be able to use the functionality of the ConfigurationManagementGraph class. despite the property existing
Florian Hockmann
When are you getting that exception? ConfiguredGraphFactory.open('project_{project_uuid}');[] The [] means that you don't want to get anything back which doesn't make much sense if you actually want to get the graph names I would really execute this from the Gremlin Console instead of from Python as Python brings in even more complexity to this. So, let's try to debug first why the Gremlin Console isn't working for you
deleted
deletedOP2y ago
I get that exception from jumping into the container, opening bin/gremlin.sh , and running ConfiguredGraphFactory.getGraphNames()
Florian Hockmann
But you don't see the exception when starting the server?
deleted
deletedOP2y ago
Theres no seemingly no serializer that works for that hence the ;[] no, not from python
Florian Hockmann
Please execute janusgraph show-config when starting the server as this looks like the server config is wrong I mean in the logs of the server directly
deleted
deletedOP2y ago
ok, Ive also mounted the configs manually btw
volumes:
- "./janus/conf/janusgraph-server.yaml:/etc/opt/janusgraph/janusgraph-server.yaml:ro"
- "./janus/conf/janusgraph.properties:/etc/opt/janusgraph/janusgraph.properties:ro"
- "./janus/conf/janusgraph-dynamic.properties:/etc/opt/janusgraph/janusgraph-dynamic.properties:ro"
volumes:
- "./janus/conf/janusgraph-server.yaml:/etc/opt/janusgraph/janusgraph-server.yaml:ro"
- "./janus/conf/janusgraph.properties:/etc/opt/janusgraph/janusgraph.properties:ro"
- "./janus/conf/janusgraph-dynamic.properties:/etc/opt/janusgraph/janusgraph-dynamic.properties:ro"
deleted
deletedOP2y ago
and properties
sintbuddy-janus-1 | # contents of /etc/opt/janusgraph/janusgraph.properties
osintbuddy-janus-1 | #
osintbuddy-janus-1 | # NOTE: THIS FILE IS GENERATED VIA "update.sh"
osintbuddy-janus-1 | # DO NOT EDIT IT DIRECTLY; CHANGES WILL BE OVERWRITTEN.
osintbuddy-janus-1 | #
osintbuddy-janus-1 | # Copyright 2021 JanusGraph Authors
osintbuddy-janus-1 | #
osintbuddy-janus-1 | # Licensed under the Apache License, Version 2.0 (the "License");
osintbuddy-janus-1 | # you may not use this file except in compliance with the License.
osintbuddy-janus-1 | # You may obtain a copy of the License at
osintbuddy-janus-1 | #
osintbuddy-janus-1 | # http://www.apache.org/licenses/LICENSE-2.0
osintbuddy-janus-1 | #
osintbuddy-janus-1 | # Unless required by applicable law or agreed to in writing, software
osintbuddy-janus-1 | # distributed under the License is distributed on an "AS IS" BASIS,
osintbuddy-janus-1 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
osintbuddy-janus-1 | # See the License for the specific language governing permissions and
osintbuddy-janus-1 | # limitations under the License.
osintbuddy-janus-1 | # set-vertex-id=true
osintbuddy-janus-1 |
osintbuddy-janus-1 | gremlin.graph=org.janusgraph.core.JanusGraphFactory
osintbuddy-janus-1 |
osintbuddy-janus-1 | storage.backend=cql
osintbuddy-janus-1 | storage.hostname=sdb:9042
osintbuddy-janus-1 | storage.directory=/var/lib/janusgraph/data
osintbuddy-janus-1 | storage.cql.keyspace=janusgraph
osintbuddy-janus-1 |
osintbuddy-janus-1 | index.search.backend=elasticsearch
osintbuddy-janus-1 | index.search.hostname=index:9200
osintbuddy-janus-1 | index.search.directory=/var/lib/janusgraph/index
osintbuddy-janus-1 | ---------------------------------------
sintbuddy-janus-1 | # contents of /etc/opt/janusgraph/janusgraph.properties
osintbuddy-janus-1 | #
osintbuddy-janus-1 | # NOTE: THIS FILE IS GENERATED VIA "update.sh"
osintbuddy-janus-1 | # DO NOT EDIT IT DIRECTLY; CHANGES WILL BE OVERWRITTEN.
osintbuddy-janus-1 | #
osintbuddy-janus-1 | # Copyright 2021 JanusGraph Authors
osintbuddy-janus-1 | #
osintbuddy-janus-1 | # Licensed under the Apache License, Version 2.0 (the "License");
osintbuddy-janus-1 | # you may not use this file except in compliance with the License.
osintbuddy-janus-1 | # You may obtain a copy of the License at
osintbuddy-janus-1 | #
osintbuddy-janus-1 | # http://www.apache.org/licenses/LICENSE-2.0
osintbuddy-janus-1 | #
osintbuddy-janus-1 | # Unless required by applicable law or agreed to in writing, software
osintbuddy-janus-1 | # distributed under the License is distributed on an "AS IS" BASIS,
osintbuddy-janus-1 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
osintbuddy-janus-1 | # See the License for the specific language governing permissions and
osintbuddy-janus-1 | # limitations under the License.
osintbuddy-janus-1 | # set-vertex-id=true
osintbuddy-janus-1 |
osintbuddy-janus-1 | gremlin.graph=org.janusgraph.core.JanusGraphFactory
osintbuddy-janus-1 |
osintbuddy-janus-1 | storage.backend=cql
osintbuddy-janus-1 | storage.hostname=sdb:9042
osintbuddy-janus-1 | storage.directory=/var/lib/janusgraph/data
osintbuddy-janus-1 | storage.cql.keyspace=janusgraph
osintbuddy-janus-1 |
osintbuddy-janus-1 | index.search.backend=elasticsearch
osintbuddy-janus-1 | index.search.hostname=index:9200
osintbuddy-janus-1 | index.search.directory=/var/lib/janusgraph/index
osintbuddy-janus-1 | ---------------------------------------
which might appear wrong but if you notice I reference janusgraph-dynamic.properties in the server config and that looks like:
# gremlin.graph=org.janusgraph.core.JanusGraphFactory
gremlin.graph=org.janusgraph.core.ConfiguredGraphFactory
graph.graphname=project

storage.backend=cql
storage.hostname=sdb:9042
storage.directory=/var/lib/janusgraph/data
# storage.cql.keyspace=ConfigurationManagementGraph

index.search.backend=elasticsearch
index.search.hostname=index:9200
index.search.directory=/var/lib/janusgraph/index
# gremlin.graph=org.janusgraph.core.JanusGraphFactory
gremlin.graph=org.janusgraph.core.ConfiguredGraphFactory
graph.graphname=project

storage.backend=cql
storage.hostname=sdb:9042
storage.directory=/var/lib/janusgraph/data
# storage.cql.keyspace=ConfigurationManagementGraph

index.search.backend=elasticsearch
index.search.hostname=index:9200
index.search.directory=/var/lib/janusgraph/index
Florian Hockmann
Are you also using the graph named graph which is not using the ConfiguredGraphFactory? Because if not, then you could try removing that from the YAML to reduce some complexity
deleted
deletedOP2y ago
No that can be removed so that top snippet now looks like:
host: 0.0.0.0
port: 8182
evaluationTimeout: 30000
channelizer: org.apache.tinkerpop.gremlin.server.channel.WebSocketChannelizer
graphManager: org.janusgraph.graphdb.management.JanusGraphManager
graphs: {
ConfigurationManagementGraph: /etc/opt/janusgraph/janusgraph-dynamic.properties,
# graph: /etc/opt/janusgraph/janusgraph-dynamic.properties # /etc/opt/janusgraph/janusgraph.properties
}
host: 0.0.0.0
port: 8182
evaluationTimeout: 30000
channelizer: org.apache.tinkerpop.gremlin.server.channel.WebSocketChannelizer
graphManager: org.janusgraph.graphdb.management.JanusGraphManager
graphs: {
ConfigurationManagementGraph: /etc/opt/janusgraph/janusgraph-dynamic.properties,
# graph: /etc/opt/janusgraph/janusgraph-dynamic.properties # /etc/opt/janusgraph/janusgraph.properties
}
Florian Hockmann
And you could try whether /etc/opt/janusgraph/janusgraph-dynamic.properties was successfully mounted by executing cat /etc/opt/janusgraph/janusgraph-dynamic.properties in the running docker container
deleted
deletedOP2y ago
Its mounted, I tried that before but ill test again, one moment
Florian Hockmann
(I don't see any obvious problem with your config so I'm trying to rule out some things that could go wrong here)
deleted
deletedOP2y ago
Yeah its mounted and it matches what I want
janusgraph@9c71cc10d45a:/opt/janusgraph$ cat /etc/opt/janusgraph/janusgraph-dynamic.properties
#
# NOTE: THIS FILE IS GENERATED VIA "update.sh"
# DO NOT EDIT IT DIRECTLY; CHANGES WILL BE OVERWRITTEN.
#
# Copyright 2021 JanusGraph Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# set-vertex-id=true

# gremlin.graph=org.janusgraph.core.JanusGraphFactory
gremlin.graph=org.janusgraph.core.ConfiguredGraphFactory
graph.graphname=project

storage.backend=cql
storage.hostname=sdb:9042
storage.directory=/var/lib/janusgraph/data
# storage.cql.keyspace=ConfigurationManagementGraph

index.search.backend=elasticsearch
index.search.hostname=index:9200
index.search.directory=/var/lib/janusgraph/index
janusgraph@9c71cc10d45a:/opt/janusgraph$ cat /etc/opt/janusgraph/janusgraph-dynamic.properties
#
# NOTE: THIS FILE IS GENERATED VIA "update.sh"
# DO NOT EDIT IT DIRECTLY; CHANGES WILL BE OVERWRITTEN.
#
# Copyright 2021 JanusGraph Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# set-vertex-id=true

# gremlin.graph=org.janusgraph.core.JanusGraphFactory
gremlin.graph=org.janusgraph.core.ConfiguredGraphFactory
graph.graphname=project

storage.backend=cql
storage.hostname=sdb:9042
storage.directory=/var/lib/janusgraph/data
# storage.cql.keyspace=ConfigurationManagementGraph

index.search.backend=elasticsearch
index.search.hostname=index:9200
index.search.directory=/var/lib/janusgraph/index
Florian Hockmann
Oh, you could also rename graph.graphname in /etc/opt/janusgraph/janusgraph-dynamic.properties to ConfigurationManagementGraph instead of project. I'm not sure whether that actually needs to be exactly this name :/
deleted
deletedOP2y ago
Tried that earlier too but I will try again :P
Florian Hockmann
hmm, I see. I'm starting to get out of ideas here I'm afraid. If nothing helps, I always go back to the most basic setup possible, try to get that to work and then change the setup step by step to what I actually want to see where it starts failing. So, I would actually download the zip archive, extract that and then start JanusGraph Server with a built-in config file. Afterwards, maybe try moving it to ConfiguredGraphFactory by abiding to what is described in the docs and see whether you get it working. I would do all of that without Docker and only introduce Docker if you get it working on bare metal
deleted
deletedOP2y ago
Trying to run ConfiguredGraphFactory.getGraphNames() after removing volumes and restarting my container with graph.graphname=ConfigurationManagementGraph results in the same issue org.janusgraph.graphdb.management.utils.ConfigurationManagementGraphNotEnabledException. Ive actually already cloned the Janus repo and have built the zip archive so I guess I could just try running that without docker yeah Should I file an issue if it doesn't work with the most basic config on bare metal? :P
Florian Hockmann
Another thing to keep in mind when trying to reproduce this / debugging it: Always delete all data stored by JanusGraph in its backends as it stores its config there. So changing the config might be ignored otherwise
deleted
deletedOP2y ago
Yeah Ive been doing that as well, confused me at first thought before I realized that needed to be done lol
Florian Hockmann
Yes sure, if you have a minimal setup that is basically just the distribution from JanusGraph with config from the docs and that isn't working, then you can submit an issue
cdegroc
cdegroc2y ago
👋🏻 Hey! Catching up with that issue. Isn't there any other error in JanusGraph server logs?
Trying to run ConfiguredGraphFactory.getGraphNames() after removing volumes and restarting my container with graph.graphname=ConfigurationManagementGraph results in the same issue
Oh, is the issue happening on remote connection? Does the server start fine?
deleted
deletedOP2y ago
Server appears to start fine and I dont notice anything alarming from the DEBUG logs, I just woke up today and Ill be trying to set up Janus on bare metal soon but so far everything Ive tried has been from inside a docker container running on an updated Debian 11 system. Most things attempted have been through a gremlin python client and that appears to be able to create graphs dynamically however Im not able to access the traversal because it doesnt want to bind to somewhere I can access it. The issue you quoted of ConfiguredGraphFactory.getGraphNames() this command seems to work fine when running through the python client but theres no way to actually view the returned output as its a ResultSet object from gremlin python that doesn't implement a lot of useful methods. When I jump into the server through docker compose exec janus bash and then run bin/gremlin.sh and proceed to run ConfiguredGraphFactory.getGraphNames() then I run into the error of org.janusgraph.graphdb.management.utils.ConfigurationManagementGraphNotEnabledException
deleted
deletedOP2y ago
Heres the output from the startup logs in docker. You'll notice 14:33:34 safelyRenameFile [ERRO] Failed copying from /tmp/temp591981868 to /etc/opt/janusgraph/janusgraph-server.yaml but I don't believe thats related to the issue and I mounted them read only as a sanity check because I no longer trust anything interacting with my config due to the other errors I was running into
deleted
deletedOP2y ago
Tried running on bare metal and org.janusgraph.graphdb.management.utils.ConfigurationManagementGraphNotEnabledException still occurs when running:
map = new HashMap<String, Object>();
map.put('storage.backend', 'cql')
map.put('storage.hostname', '127.0.0.1:9042')
map.put('storage.directory', '/var/lib/janusgraph/data')
map.put('storage.cql.keyspace', 'janusgraph')
map.put('index.search.backend', 'elasticsearch')
map.put('index.search.hostname', '127.0.0.1:9200')
map.put('index.search.directory', '/var/lib/janusgraph/index')
ConfiguredGraphFactory.createTemplateConfiguration(new MapConfiguration(map));
map = new HashMap<String, Object>();
map.put('storage.backend', 'cql')
map.put('storage.hostname', '127.0.0.1:9042')
map.put('storage.directory', '/var/lib/janusgraph/data')
map.put('storage.cql.keyspace', 'janusgraph')
map.put('index.search.backend', 'elasticsearch')
map.put('index.search.hostname', '127.0.0.1:9200')
map.put('index.search.directory', '/var/lib/janusgraph/index')
ConfiguredGraphFactory.createTemplateConfiguration(new MapConfiguration(map));
I will push a repo where this can be reproduced on a Debian 11 system in a few minutes. Here are the error logs from running locally (NOT running in docker except for the elasticsearch and ScyllaDB container):
deleted
deletedOP2y ago
GitHub
GitHub - jerlendds/janus-dynamicgraphs-bug: Dynamic Graphs in Janus...
Dynamic Graphs in JanusGraph do not work when following the docs. This bug occurs on both docker and bare metal - GitHub - jerlendds/janus-dynamicgraphs-bug: Dynamic Graphs in JanusGraph do not wor...
deleted
deletedOP2y ago
I've been trying to hook up the project to the vscode debugger but I keep running into issues. How do you guys debug this project? edit: got it working! turns out it was vscode being weird
cdegroc
cdegroc2y ago
Thanks. Can you confirm those errors are not an issue?
osintbuddy-janus-1 | 14:33:34 safelyRenameFile [ERRO] Failed copying from /tmp/temp591981868 to /etc/opt/janusgraph/janusgraph-server.yaml
osintbuddy-janus-1 | 14:33:34 safelyRenameFile [ERRO] open /etc/opt/janusgraph/janusgraph-server.yaml: read-only file system
osintbuddy-janus-1 | 14:33:34 safelyRenameFile [ERRO] Failed copying from /tmp/temp072151160 to /etc/opt/janusgraph/janusgraph-server.yaml
osintbuddy-janus-1 | 14:33:34 safelyRenameFile [ERRO] open /etc/opt/janusgraph/janusgraph-server.yaml: read-only file system
osintbuddy-janus-1 | 14:33:34 safelyRenameFile [ERRO] Failed copying from /tmp/temp956236069 to /etc/opt/janusgraph/janusgraph-server.yaml
osintbuddy-janus-1 | 14:33:34 safelyRenameFile [ERRO] open /etc/opt/janusgraph/janusgraph-server.yaml: read-only file system
o
osintbuddy-janus-1 | 14:33:34 safelyRenameFile [ERRO] Failed copying from /tmp/temp591981868 to /etc/opt/janusgraph/janusgraph-server.yaml
osintbuddy-janus-1 | 14:33:34 safelyRenameFile [ERRO] open /etc/opt/janusgraph/janusgraph-server.yaml: read-only file system
osintbuddy-janus-1 | 14:33:34 safelyRenameFile [ERRO] Failed copying from /tmp/temp072151160 to /etc/opt/janusgraph/janusgraph-server.yaml
osintbuddy-janus-1 | 14:33:34 safelyRenameFile [ERRO] open /etc/opt/janusgraph/janusgraph-server.yaml: read-only file system
osintbuddy-janus-1 | 14:33:34 safelyRenameFile [ERRO] Failed copying from /tmp/temp956236069 to /etc/opt/janusgraph/janusgraph-server.yaml
osintbuddy-janus-1 | 14:33:34 safelyRenameFile [ERRO] open /etc/opt/janusgraph/janusgraph-server.yaml: read-only file system
o
deleted
deletedOP2y ago
They should not be an issue. Ive run this on bare metal as well and the same error of org.janusgraph.graphdb.management.utils.ConfigurationManagementGraphNotEnabledException occurs This repo reproduces the bug if you're running on a debian 11 system: https://github.com/jerlendds/janus-dynamicgraphs-bug. What systems are you able to get this functionality working on?
cdegroc
cdegroc2y ago
I've tried your script locally (thanks for that!). One think I noted is that your README file is missing one step: - A local JanusGraph server is started - A local gremlin console is started but is not connected to the server When opening the gremlin console, here is what I did
// The next steps tell the console that commands should be forwarded to the server configured in conf/remote.yaml
gremlin> :remote connect tinkerpop.server /tmp/janus-dynamicgraphs-bug/janus-install/janusgraph-1.0.0-SNAPSHOT/conf/remote.yaml session
gremlin> :remote console
gremlin> map = new HashMap<String, Object>()
gremlin> map.put('storage.backend', 'cql')
gremlin> map.put('storage.hostname', '127.0.0.1:9042')
gremlin> map.put('index.search.backend', 'elasticsearch')
gremlin> map.put('index.search.hostname', '127.0.0.1:9200')
gremlin> ConfiguredGraphFactory.createTemplateConfiguration(new MapConfiguration(map))
// No error
// The next steps tell the console that commands should be forwarded to the server configured in conf/remote.yaml
gremlin> :remote connect tinkerpop.server /tmp/janus-dynamicgraphs-bug/janus-install/janusgraph-1.0.0-SNAPSHOT/conf/remote.yaml session
gremlin> :remote console
gremlin> map = new HashMap<String, Object>()
gremlin> map.put('storage.backend', 'cql')
gremlin> map.put('storage.hostname', '127.0.0.1:9042')
gremlin> map.put('index.search.backend', 'elasticsearch')
gremlin> map.put('index.search.hostname', '127.0.0.1:9200')
gremlin> ConfiguredGraphFactory.createTemplateConfiguration(new MapConfiguration(map))
// No error
deleted
deletedOP2y ago
Ok, thats good to know. I was missing that, thank you. so I presume my python client in docker connects correctly then as I see the ScyllaDB record created but Im unable to access the traversal in that environment later on (e.g. after waiting 20s) which seems strange
cdegroc
cdegroc2y ago
We're still not at a point where we could open a graph traversal and use it to make requests. This command
ConfiguredGraphFactory.createTemplateConfiguration(new MapConfiguration(map))
ConfiguredGraphFactory.createTemplateConfiguration(new MapConfiguration(map))
only creates a "template configuration".
deleted
deletedOP2y ago
Yes I know you need to run ConfiguredGraphFactory.create or .open after setting up a config depending on how you do it
cdegroc
cdegroc2y ago
Yes. After this is done, I think gremlin python could be used. Just like gremlin console, it will forward commands to the JanusGraph server, so if the traversal can be used in the gremlin console, it's likely to work from gremlin python as well.
deleted
deletedOP2y ago
I will try again, maybe I missed something earlier, but im fairly certain this doesn't work at least with the python client on my system for some reason
cdegroc
cdegroc2y ago
Just to be safe, I'd suggest using ConfiguredGraphFactory.createConfiguration instead of ConfiguredGraphFactory.createTemplateConfiguration, at least until you get it working.
deleted
deletedOP2y ago
Yeah Im giving up for now. Fairly certain Im doing everything correctly but Ill look into it a bit more when I have time later
Want results from more Discord servers?
Add your server