Code Monkey home page Code Monkey logo

janusgraph-docker's Introduction

Warning: The Docker images are in the process to move back into main repo. Please open new issues and PRs in the main repo.

JanusGraph Docker images

GitHub Workflow Status Docker pulls

This repository contains build scripts and configuration files for the official JanusGraph Docker images, which are published on the Docker Hub.

Note: even though the examples below and in the Docker Compose config files (*.yml) use the latest image, when running a service in production, be sure to specify a specific numeric version to avoid unexpected behavior changes due to latest pointing to a new release version, see our Docker tagging Policy.

Usage

Start a JanusGraph Server instance

The default configuration uses the Oracle Berkeley DB Java Edition storage backend and the Apache Lucene indexing backend:

docker run --rm --name janusgraph-default docker.io/janusgraph/janusgraph:latest

Connecting with Gremlin Console

Start a JanusGraph container and connect to the janusgraph server remotely using Gremlin Console:

$ docker run --rm --link janusgraph-default:janusgraph -e GREMLIN_REMOTE_HOSTS=janusgraph \
    -it docker.io/janusgraph/janusgraph:latest ./bin/gremlin.sh

         \,,,/
         (o o)
-----oOOo-(3)-oOOo-----
plugin activated: janusgraph.imports
plugin activated: tinkerpop.server
plugin activated: tinkerpop.utilities
plugin activated: tinkerpop.hadoop
plugin activated: tinkerpop.spark
plugin activated: tinkerpop.tinkergraph
gremlin> :remote connect tinkerpop.server conf/remote.yaml
==>Configured janusgraph/172.17.0.2:8182
gremlin> :> g.addV('person').property('name', 'chris')
==>v[4160]
gremlin> :> g.V().values('name')
==>chris

Using Docker Compose

Start a JanusGraph Server instance using docker-compose.yml:

docker-compose -f docker-compose.yml up

Start a JanusGraph container running Gremlin Console in the same network using docker-compose.yml:

docker-compose -f docker-compose.yml run --rm \
    -e GREMLIN_REMOTE_HOSTS=janusgraph janusgraph ./bin/gremlin.sh

Initialization

When the container is started it will execute files with the extension .groovy that are found in /docker-entrypoint-initdb.d with the Gremlin Console. These scripts are only executed after the JanusGraph Server instance was started. So, they can connect to it and execute Gremlin traversals.

For example, to add a vertex to the graph, create a file /docker-entrypoint-initdb.d/add-vertex.groovy with the following content:

g = traversal().withRemote('conf/remote-graph.properties')
g.addV('demigod').property('name', 'hercules').iterate()

Generate Config

JanusGraph-Docker has a single utility method. This method writes the JanusGraph Configuration and show the config afterward.

docker run --rm -it docker.io/janusgraph/janusgraph:latest janusgraph show-config

Default config locations are /etc/opt/janusgraph/janusgraph.properties and /etc/opt/janusgraph/janusgraph-server.yaml.

Configuration

The JanusGraph image provides multiple methods for configuration, including using environment variables to set options and using bind-mounted configuration.

Docker environment variables

The environment variables supported by the JanusGraph image are summarized below.

Variable Description Default
JANUS_PROPS_TEMPLATE JanusGraph properties file template (see below). berkeleyje-lucene
janusgraph.* Any JanusGraph configuration option to override in the template properties file, specified with an outer janusgraph namespace (e.g., janusgraph.storage.hostname). See JanusGraph Configuration for available options. no default value
gremlinserver.* Any Gremlin Server configuration option to override in the default configuration (YAML) file, specified with an outer gremlinserver namespace (e.g., gremlinserver.threadPoolWorker). You can set or update nested options using additional dots (e.g., gremlinserver.graphs.graph). See Gremlin Server Configuration for available options. See Gremlin Server Environment Variable Syntax section below for help editing gremlin server configuration using environment variables. no default value`
JANUS_SERVER_TIMEOUT Timeout (seconds) used when waiting for Gremlin Server before executing initialization scripts. 30
JANUS_STORAGE_TIMEOUT Timeout (seconds) used when waiting for the storage backend before starting Gremlin Server. 60
GREMLIN_REMOTE_HOSTS Optional hostname for external Gremlin Server instance. Enables a container running Gremlin Console to connect to a remote server using conf/remote.yaml (or remote-objects.yaml). no default value
JANUS_INITDB_DIR Defines the location of the initialization scripts. /docker-entrypoint-initdb.d

Properties template

The JANUS_PROPS_TEMPLATE environment variable is used to define the base JanusGraph properties file. Values in the template properties file are used unless an alternate value for a given property is provided in the environment. The common usage will be to specify a template for the general environment (e.g., cassandra-es) and then provide additional individual configuration to override/extend the template. The available templates depend on the JanusGraph version (see conf/janusgraph*.properties).

JANUS_PROPS_TEMPLATE Supported Versions
berkeleyje all
berkeleyje-es all
berkeleyje-lucene (default) all
cassandra-es <=0.5.3
cql-es >=0.2.1
cql >=0.5.3
inmemory >=0.5.3
Example: Berkeleyje-Lucene

Start a JanusGraph instance using the default berkeleyje-lucene template with custom storage and server settings:

docker run --name janusgraph-default \
    -e janusgraph.storage.berkeleyje.cache-percentage=80 \
    -e gremlinserver.threadPoolWorker=2 \
    docker.io/janusgraph/janusgraph:latest

Inspect the configuration:

$ docker exec janusgraph-default sh -c 'cat /etc/opt/janusgraph/janusgraph.properties | grep ^[a-z]'
gremlin.graph=org.janusgraph.core.JanusGraphFactory
storage.backend=berkeleyje
storage.directory=/var/lib/janusgraph/data
index.search.backend=lucene
storage.berkeleyje.cache-percentage=80
index.search.directory=/var/lib/janusgraph/index

$ docker exec janusgraph-default grep threadPoolWorker /etc/opt/janusgraph/janusgraph-server.yaml
threadPoolWorker: 2
Example: Cassandra-ES with Docker Compose

Start a JanusGraph instance with Cassandra and Elasticsearch using the cql-es template through docker-compose-cql-es.yml:

docker-compose -f docker-compose-cql-es.yml up

Inspect the configuration using docker-compose-cql-es.yml:

$ docker-compose -f docker-compose-cql-es.yml exec \
      janusgraph sh -c 'cat /etc/opt/janusgraph/janusgraph.properties | grep ^[a-z]'
gremlin.graph=org.janusgraph.core.JanusGraphFactory
storage.backend=cql
storage.hostname=jce-cassandra
cache.db-cache = true
cache.db-cache-clean-wait = 20
cache.db-cache-time = 180000
cache.db-cache-size = 0.25
index.search.backend=elasticsearch
index.search.hostname=jce-elastic
index.search.elasticsearch.client-only=true
storage.directory=/var/lib/janusgraph/data
index.search.directory=/var/lib/janusgraph/index

Gremlin Server Environment Variable Syntax

Environment Variables that start with the prefix gremlinserver. or gremlinserver%d. are used to edit the base janusgraph-server.yaml file. The text after the prefix in the environment variable name should follow a specific syntax. This syntax is implemented using the yq write and delete commands and the yq documentation can be used as a reference for this syntax. Secondly, the value of the environment variable will be used to set the value of the key specified in the environment variable name.

Let's take a look at a few examples:

Nested Properties

For example, say we want to add a configuration property graphs.ConfigurationMangementGraph with the value conf/JanusGraph-configurationmanagement.properties:

$ docker run --rm -it -e gremlinserver.graphs.ConfigurationManagementGraph=\
conf/JanusGraph-configurationmanagement.properties docker.io/janusgraph/janusgraph:latest janusgraph show-config
...
graphs:
  graph: conf/janusgraph-cql-es-server.properties
  ConfigurationManagementGraph: conf/JanusGraph-configurationmanagement.properties
scriptEngines:
...
Delete a component

To delete a component append %d to the 'gremlinserver.' prefix before the closing dot and then select the component following the prefix. Don't forget the trailing '='. For example to delete the graphs.graph configuration property we can do the following:

$ docker run --rm -it -e gremlinserver%d.graphs.graph= docker.io/janusgraph/janusgraph:latest janusgraph show-config
...
channelizer: org.apache.tinkerpop.gremlin.server.channel.WebSocketChannelizer
graphs: {}
scriptEngines:
...
Append item and alternate indexing syntax

This example shows how to append an item to a list. This can be done by adding "[+]" at the end of the environment variable name. This example also shows how to use square bracket syntax as an alternative to the dot syntax. This alternate syntax is useful if one of the keys in the property path contains special characters as we see in the example below.

$ docker run --rm -it -e gremlinserver.scriptEngines.gremlin-groovy\
.plugins["org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin"]\
.files[+]=/scripts/another-script.groovy docker.io/janusgraph/janusgraph:latest janusgraph show-config
...
scriptEngines:
  gremlin-groovy:
    plugins:
      org.janusgraph.graphdb.tinkerpop.plugin.JanusGraphGremlinPlugin: {}
      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.jsr223.ScriptFileGremlinPlugin:
        files:
        - scripts/empty-sample.groovy
        - /scripts/another-script.groovy
...

Mounted Configuration

By default, the container stores both the janusgraph.properties and janusgraph-server.yaml files in the JANUS_CONFIG_DIR directory which maps to /etc/opt/janusgraph. When the container starts, it updates those files using the environment variable values. If you have a specific configuration and do not wish to use environment variables to configure JanusGraph, you can mount a directory containing your own version of those configuration files into the container through a bind mount, e.g., -v /local/path/on/host:/etc/opt/janusgraph:ro. You'll need to bind the files as read-only, however, if you do not wish to have the environment variables override the values in that file.

Example with mounted configuration

Start a JanusGraph instance with mounted configuration using docker-compose-mount.yml:

$ docker-compose -f docker-compose-mount.yml up
janusgraph-mount | chown: changing ownership of '/etc/opt/janusgraph/janusgraph.properties': Read-only file system
...

Default user JanusGraph

Note: The default user of the image changed for all version beginning with the newest image version of 0.5.3.

The user is created with uid 999 and gid 999 and user's a home dir is /var/lib/janusgraph.

Following folder are created with these user rights:

  • /var/lib/janusgraph
  • /etc/opt/janusgraph
  • /opt/janusgraph
  • /docker-entrypoint-initdb.d

Docker Tagging Policy

Here's the policy we follow for tagging our Docker images:

Tag Support level Docker base image
latest
  • latest JanusGraph release
  • no breaking changes guarantees
eclipse-temurin:11-jre
x.x
  • newest patch-level version of JanusGraph
  • expect breaking changes
eclipse-temurin:8-jre
x.x.x
  • defined JanusGraph version
  • breaking changes are only in this repo
eclipse-temurin:8-jre
x.x.x-revision
  • defined JanusGraph version
  • defined commit in JanusGraph-docker repo
eclipse-temurin:8-jre

We collect a list of changes in our docker images build process in our CHANGELOG.md

Community

JanusGraph-Docker uses the same communication channels as JanusGraph in general. Please refer to the Community section in JanusGraph's main repository for more information about these various channels.

Please use GitHub issues only to report bugs or request features.

Contributing

Please see CONTRIBUTING.md in JanusGraph's main repository for more information, including CLAs and best practices for working with GitHub.

License

JanusGraph Docker images are provided under the Apache 2.0 license and documentation is provided under the CC-BY-4.0 license. For details about this dual-license structure, please see LICENSE.txt.

janusgraph-docker's People

Contributors

0xthiebaut avatar chrislbs avatar dependabot[bot] avatar farodin91 avatar florianhockmann avatar jatinderjawanda avatar kingzbauer avatar li-boxuan avatar mbrukman avatar mkaisercross avatar pluradj avatar porunov avatar rrmerugu avatar sjudeng avatar sruehl avatar twilmes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

janusgraph-docker's Issues

.JanusGraphException: A JanusGraph graph with the same instance id is already open

I deployed Janusgraph:latest container into kubernetes using statefulset.
it worked fine in kubernetes Pod, but sometimes it fails without being able to recover, in the below exception I found the line saying:

: org.janusgraph.core.JanusGraphException: A JanusGraph graph with the same instance id [0a050039216-janusgraph-0-janusgraph-service-default-svc-cluster-local1] is already open. Might required forced shutdown.
	at org.janusgraph.graphdb.database.StandardJanusGraph.<init>(StandardJanusGraph.java:173)

I have no idea from where is this instance id comes from.
I can't understand why this is happening out of nowhere, my guess is that the pod got restarted or the container crashed maybe, and that made this happend.

this is the startup of Janus log and also the exception during it:

1530 [main] INFO  org.janusgraph.diskstorage.Backend  - Initiated backend operations thread pool of size 2
1590 [main] WARN  org.apache.tinkerpop.gremlin.server.GremlinServer  - Graph [graph] configured at [/etc/opt/janusgraph/janusgraph.properties] could not be instantiated and will not be available in Gremlin Server.  GraphFactory message: GraphFactory could not instantiate this Graph implementation [class org.janusgraph.core.JanusGraphFactory]
java.lang.RuntimeException: GraphFactory could not instantiate this Graph implementation [class org.janusgraph.core.JanusGraphFactory]
	at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:81)
	at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:69)
	at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:103)
	at org.apache.tinkerpop.gremlin.server.util.DefaultGraphManager.lambda$new$0(DefaultGraphManager.java:57)
	at java.util.LinkedHashMap$LinkedEntrySet.forEach(LinkedHashMap.java:671)
	at org.apache.tinkerpop.gremlin.server.util.DefaultGraphManager.<init>(DefaultGraphManager.java:55)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor.<init>(ServerGremlinExecutor.java:80)
	at org.apache.tinkerpop.gremlin.server.GremlinServer.<init>(GremlinServer.java:122)
	at org.apache.tinkerpop.gremlin.server.GremlinServer.<init>(GremlinServer.java:86)
	at org.apache.tinkerpop.gremlin.server.GremlinServer.main(GremlinServer.java:345)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:77)
	... 13 more
Caused by: org.janusgraph.core.JanusGraphException: A JanusGraph graph with the same instance id [0a050039216-janusgraph-0-janusgraph-service-default-svc-cluster-local1] is already open. Might required forced shutdown.
	at org.janusgraph.graphdb.database.StandardJanusGraph.<init>(StandardJanusGraph.java:173)
	at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:161)
	at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:132)
	at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:112)
	... 18 more
1592 [main] INFO  org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor  - Initialized Gremlin thread pool.  Threads in pool named with pattern gremlin-*
1634 [main] INFO  org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor  - Initialized GremlinExecutor and preparing GremlinScriptEngines instances.
4816 [gremlin-server-exec-1] ERROR org.apache.tinkerpop.gremlin.jsr223.DefaultGremlinScriptEngineManager  - Could not create GremlinScriptEngine for gremlin-groovy
java.lang.IllegalStateException: javax.script.ScriptException: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: graph for class: Script1
	at org.apache.tinkerpop.gremlin.jsr223.DefaultGremlinScriptEngineManager.lambda$createGremlinScriptEngine$16(DefaultGremlinScriptEngineManager.java:464)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
	at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:647)
	at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:272)
	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485)
	at org.apache.tinkerpop.gremlin.jsr223.DefaultGremlinScriptEngineManager.createGremlinScriptEngine(DefaultGremlinScriptEngineManager.java:450)
	at org.apache.tinkerpop.gremlin.jsr223.DefaultGremlinScriptEngineManager.getEngineByName(DefaultGremlinScriptEngineManager.java:219)
	at org.apache.tinkerpop.gremlin.jsr223.CachedGremlinScriptEngineManager.lambda$getEngineByName$0(CachedGremlinScriptEngineManager.java:57)
	at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
	at org.apache.tinkerpop.gremlin.jsr223.CachedGremlinScriptEngineManager.getEngineByName(CachedGremlinScriptEngineManager.java:57)
	at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.lambda$eval$0(GremlinExecutor.java:267)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: javax.script.ScriptException: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: graph for class: Script1
	at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:378)
	at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
	at org.apache.tinkerpop.gremlin.jsr223.DefaultGremlinScriptEngineManager.lambda$createGremlinScriptEngine$16(DefaultGremlinScriptEngineManager.java:460)
	... 24 more
Caused by: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: graph for class: Script1
	at org.apache.tink

Publish all images with extra tags which includes the commit hash

If users want to bind their running version to defined by a commit. These tags would increase the high confident in running Janugraph than just version tags.

Issue: We could introduce breaking changes in the docker images without a bump of the JanusGraph version.

not loading initial data when run `docker compose -f docker-compose.yml up`

  • I try to create ~janusgraph-docker/build/docker-entrypoint-initdb.d/add-vertex.groovy after referring to https://github.com/JanusGraph/janusgraph-docker#initialization, but I can't load the initial data like hercules .
  • It seems not to write the initialization step in docker-compose.yml.
  • What should I setup the initial data like README.md?

I tried to run like the below

$ docker compose -f docker-compose.yml up
$ docker-compose -f docker-compose.yml run --rm -e GREMLIN_REMOTE_HOSTS=janusgraph janusgraph ./bin/gremlin.sh
Creating janusgraph-docker_janusgraph_run ... done

         \,,,/
         (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: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
plugin activated: tinkerpop.server
plugin activated: tinkerpop.tinkergraph
13:02:24 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> :remote connect tinkerpop.server conf/remote.yaml
==>Configured janusgraph/172.27.0.2:8182
gremlin> :> g.V('demigod').values('name')
<nothing, I expect to show `==>hercules`>

JanusGraph Memory Utilization with Cassandra-ES

I am running the base JG-CA-ES configuration and notice rising memory utilization (+3GB in 24 hours). In this configuration I am making no external queries; the trio are started up and left alone.

Has anyone else experienced this issue?

Execution time per traversal request

Hi,
I'm using the latest JanusGraph container. And for quering the graph, I'm using the Java driver janusgraph-core 0.5.0.
Is there any way to provide execution time when quering the graph? I want to create metrics in java base on a query general name. and put it in Prometheus.
Couldn't find a way to tell Gremlin server/Janus to provide also the execution time with the result of the traversal.

Error Getting Janus Graph docker-compose-cql-es.yml Up Working

the background here is that I ran the following command.

docker-compose -f docker-compose-cql-es.yml up -d

Then the jce-janusgraph container fails because it cant connect to cassandra.
So i then restart it using:

docker-compose -f docker-compose-cql-es.yml stop janusgraph
docker-compose -f docker-compose-cql-es.yml rm

wait a few mins for cassandra.

docker-compose -f docker-compose-cql-es.yml up -d

this creates the janusgraph container, and connects to cassandra

from logs:
New Cassandra host jce-cassandra/172.20.0.3:9042 added
unconfigured table janusgraph_ids


waiting for storage...
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: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
0    [main] INFO  com.jcabi.manifests.Manifests  - 113 attributes loaded from 262 stream(s) in 233ms, 113 saved, 3647 ignored: ["Agent-Class", "Ant-Version", "Archiver-Version", "Automatic-Module-Name", "Bnd-LastModified", "Boot-Class-Path", "Branch", "Build-Date", "Build-Host", "Build-Id", "Build-Java-Version", "Build-Jdk", "Build-Jdk-Spec", "Build-Job", "Build-Number", "Build-Timestamp", "Build-Version", "Built-At", "Built-By", "Built-Date", "Built-OS", "Built-On", "Built-Status", "Bundle-ActivationPolicy", "Bundle-Activator", "Bundle-BuddyPolicy", "Bundle-Category", "Bundle-ClassPath", "Bundle-ContactAddress", "Bundle-Description", "Bundle-DocURL", "Bundle-License", "Bundle-ManifestVersion", "Bundle-Name", "Bundle-NativeCode", "Bundle-RequiredExecutionEnvironment", "Bundle-SymbolicName", "Bundle-Vendor", "Bundle-Version", "Can-Redefine-Classes", "Change", "Class-Path", "Copyright", "Created-By", "DSTAMP", "DynamicImport-Package", "Eclipse-BuddyPolicy", "Eclipse-ExtensibleAPI", "Embed-Dependency", "Embed-Transitive", "Export-Package", "Extension-Name", "Extension-name", "Fragment-Host", "Gradle-Version", "Gremlin-Lib-Paths", "Gremlin-Plugin-Dependencies", "Gremlin-Plugin-Paths", "Ignore-Package", "Implementation-Build", "Implementation-Build-Date", "Implementation-Title", "Implementation-URL", "Implementation-Vendor", "Implementation-Vendor-Id", "Implementation-Version", "Import-Package", "Include-Resource", "JCabi-Build", "JCabi-Date", "JCabi-Version", "Java-Vendor", "Java-Version", "Main-Class", "Manifest-Version", "Maven-Version", "Module-Email", "Module-Origin", "Module-Owner", "Module-Source", "Multi-Release", "Originally-Created-By", "Os-Arch", "Os-Name", "Os-Version", "Package", "Premain-Class", "Private-Package", "Provide-Capability", "Require-Bundle", "Require-Capability", "Scm-Connection", "Scm-Revision", "Scm-Url", "Specification-Title", "Specification-Vendor", "Specification-Version", "TODAY", "TSTAMP", "Time-Zone-Database-Version", "Tool", "X-Compile-Elasticsearch-Snapshot", "X-Compile-Elasticsearch-Version", "X-Compile-Lucene-Version", "X-Compile-Source-JDK", "X-Compile-Target-JDK", "hash", "implementation-version", "mode", "package", "service", "url", "version"]
1    [main] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - 3.4.6
         \,,,/
         (o o)
-----oOOo-(3)-oOOo-----

158  [main] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - Configuring Gremlin Server from /etc/opt/janusgraph/gremlin-server.yaml
250  [main] INFO  org.apache.tinkerpop.gremlin.server.util.MetricManager  - Configured Metrics ConsoleReporter configured with report interval=180000ms
255  [main] INFO  org.apache.tinkerpop.gremlin.server.util.MetricManager  - Configured Metrics CsvReporter configured with report interval=180000ms to fileName=/tmp/gremlin-server-metrics.csv
326  [main] INFO  org.apache.tinkerpop.gremlin.server.util.MetricManager  - Configured Metrics JmxReporter configured with domain= and agentId=
328  [main] INFO  org.apache.tinkerpop.gremlin.server.util.MetricManager  - Configured Metrics Slf4jReporter configured with interval=180000ms and loggerName=org.apache.tinkerpop.gremlin.server.Settings$Slf4jReporterMetrics
830  [main] INFO  com.datastax.driver.core  - DataStax Java driver 3.9.0 for Apache Cassandra
852  [main] INFO  com.datastax.driver.core.GuavaCompatibility  - Detected Guava < 19 in the classpath, using legacy compatibility layer
1048 [main] INFO  com.datastax.driver.core.ClockFactory  - Using native clock to generate timestamps.
1223 [main] INFO  com.datastax.driver.core.NettyUtil  - Found Netty's native epoll transport in the classpath, using it
1655 [main] INFO  com.datastax.driver.core.policies.DCAwareRoundRobinPolicy  - Using data-center name 'datacenter1' for DCAwareRoundRobinPolicy (if this is incorrect, please provide the correct datacenter name with DCAwareRoundRobinPolicy constructor)
1656 [main] INFO  com.datastax.driver.core.Cluster  - New Cassandra host jce-cassandra/172.20.0.3:9042 added
1971 [main] INFO  org.janusgraph.core.util.ReflectiveConfigOptionLoader  - Loaded and initialized config classes: 13 OK out of 13 attempts in PT0.069S
4120 [main] INFO  org.janusgraph.graphdb.idmanagement.UniqueInstanceIdRetriever  - Generated unique-instance-id=ac140004395-d0b6a01d19921
4129 [main] INFO  com.datastax.driver.core.ClockFactory  - Using native clock to generate timestamps.
4268 [main] INFO  com.datastax.driver.core.policies.DCAwareRoundRobinPolicy  - Using data-center name 'datacenter1' for DCAwareRoundRobinPolicy (if this is incorrect, please provide the correct datacenter name with DCAwareRoundRobinPolicy constructor)
4268 [main] INFO  com.datastax.driver.core.Cluster  - New Cassandra host jce-cassandra/172.20.0.3:9042 added
4295 [main] INFO  org.janusgraph.diskstorage.Backend  - Configuring index [search]
4804 [main] INFO  org.janusgraph.diskstorage.Backend  - Initiated backend operations thread pool of size 4
4810 [main] WARN  org.apache.tinkerpop.gremlin.server.GremlinServer  - Graph [graph] configured at [/etc/opt/janusgraph/janusgraph.properties] could not be instantiated and will not be available in Gremlin Server.  GraphFactory message: GraphFactory could not instantiate this Graph implementation [class org.janusgraph.core.JanusGraphFactory]
java.lang.RuntimeException: GraphFactory could not instantiate this Graph implementation [class org.janusgraph.core.JanusGraphFactory]
	at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:81)
	at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:69)
	at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:103)
	at org.apache.tinkerpop.gremlin.server.util.DefaultGraphManager.lambda$new$0(DefaultGraphManager.java:57)
	at java.util.LinkedHashMap$LinkedEntrySet.forEach(LinkedHashMap.java:671)
	at org.apache.tinkerpop.gremlin.server.util.DefaultGraphManager.<init>(DefaultGraphManager.java:55)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor.<init>(ServerGremlinExecutor.java:80)
	at org.apache.tinkerpop.gremlin.server.GremlinServer.<init>(GremlinServer.java:122)
	at org.apache.tinkerpop.gremlin.server.GremlinServer.<init>(GremlinServer.java:86)
	at org.apache.tinkerpop.gremlin.server.GremlinServer.main(GremlinServer.java:345)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:77)
	... 13 more
Caused by: com.datastax.driver.core.exceptions.InvalidQueryException: unconfigured table janusgraph_ids
	at com.datastax.driver.core.exceptions.InvalidQueryException.copy(InvalidQueryException.java:50)
	at com.datastax.driver.core.DriverThrowables.propagateCause(DriverThrowables.java:35)
	at com.datastax.driver.core.AbstractSession.prepare(AbstractSession.java:97)
	at org.janusgraph.diskstorage.cql.CQLKeyColumnValueStore.<init>(CQLKeyColumnValueStore.java:167)
	at org.janusgraph.diskstorage.cql.CQLStoreManager.lambda$openDatabase$14(CQLStoreManager.java:420)
	at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
	at org.janusgraph.diskstorage.cql.CQLStoreManager.openDatabase(CQLStoreManager.java:420)
	at org.janusgraph.diskstorage.keycolumnvalue.KeyColumnValueStoreManager.openDatabase(KeyColumnValueStoreManager.java:43)
	at org.janusgraph.diskstorage.Backend.initialize(Backend.java:228)
	at org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration.getBackend(GraphDatabaseConfiguration.java:1360)
	at org.janusgraph.graphdb.database.StandardJanusGraph.<init>(StandardJanusGraph.java:146)
	at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:161)
	at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:132)
	at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:112)
	... 18 more
Caused by: com.datastax.driver.core.exceptions.InvalidQueryException: unconfigured table janusgraph_ids
	at com.datastax.driver.core.Responses$Error.asException(Responses.java:181)
	at com.datastax.driver.core.SessionManager$4.apply(SessionManager.java:249)
	at com.datastax.driver.core.SessionManager$4.apply(SessionManager.java:218)
	at com.google.common.util.concurrent.Futures$ChainingListenableFuture.run(Futures.java:906)
	at com.google.common.util.concurrent.Futures$1$1.run(Futures.java:635)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.lang.Thread.run(Thread.java:748)
4825 [main] INFO  org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor  - Initialized Gremlin thread pool.  Threads in pool named with pattern gremlin-*
4898 [main] INFO  org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor  - Initialized GremlinExecutor and preparing GremlinScriptEngines instances.
8376 [gremlin-server-exec-1] ERROR org.apache.tinkerpop.gremlin.jsr223.DefaultGremlinScriptEngineManager  - Could not create GremlinScriptEngine for gremlin-groovy
java.lang.IllegalStateException: javax.script.ScriptException: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: graph for class: Script1
	at org.apache.tinkerpop.gremlin.jsr223.DefaultGremlinScriptEngineManager.lambda$createGremlinScriptEngine$16(DefaultGremlinScriptEngineManager.java:464)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1384)
	at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:647)
	at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:272)
	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1384)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485)
	at org.apache.tinkerpop.gremlin.jsr223.DefaultGremlinScriptEngineManager.createGremlinScriptEngine(DefaultGremlinScriptEngineManager.java:450)
	at org.apache.tinkerpop.gremlin.jsr223.DefaultGremlinScriptEngineManager.getEngineByName(DefaultGremlinScriptEngineManager.java:219)
	at org.apache.tinkerpop.gremlin.jsr223.CachedGremlinScriptEngineManager.lambda$getEngineByName$0(CachedGremlinScriptEngineManager.java:57)
	at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
	at org.apache.tinkerpop.gremlin.jsr223.CachedGremlinScriptEngineManager.getEngineByName(CachedGremlinScriptEngineManager.java:57)
	at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.lambda$eval$0(GremlinExecutor.java:267)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: javax.script.ScriptException: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: graph for class: Script1
	at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:378)
	at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
	at org.apache.tinkerpop.gremlin.jsr223.DefaultGremlinScriptEngineManager.lambda$createGremlinScriptEngine$16(DefaultGremlinScriptEngineManager.java:460)
	... 24 more
Caused by: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: graph for class: Script1
	at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:697)
	at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:376)
	... 26 more
Caused by: groovy.lang.MissingPropertyException: No such property: graph for class: Script1
	at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:65)
	at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:51)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:309)
	at Script1.run(Script1.groovy:30)
	at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:674)
	... 27 more
please note: i delay

8380 [main] WARN  org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor  - Could not initialize gremlin-groovy GremlinScriptEngine as init script could not be evaluated
java.util.concurrent.CompletionException: java.lang.IllegalArgumentException: gremlin-groovy is not an available GremlinScriptEngine
	at java.util.concurrent.CompletableFuture.reportJoin(CompletableFuture.java:375)
	at java.util.concurrent.CompletableFuture.join(CompletableFuture.java:1947)
	at org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor.lambda$new$4(ServerGremlinExecutor.java:141)
	at java.util.LinkedHashMap$LinkedKeySet.forEach(LinkedHashMap.java:559)
	at org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor.<init>(ServerGremlinExecutor.java:136)
	at org.apache.tinkerpop.gremlin.server.GremlinServer.<init>(GremlinServer.java:122)
	at org.apache.tinkerpop.gremlin.server.GremlinServer.<init>(GremlinServer.java:86)
	at org.apache.tinkerpop.gremlin.server.GremlinServer.main(GremlinServer.java:345)
Caused by: java.lang.IllegalArgumentException: gremlin-groovy is not an available GremlinScriptEngine
	at org.apache.tinkerpop.gremlin.jsr223.CachedGremlinScriptEngineManager.registerLookUpInfo(CachedGremlinScriptEngineManager.java:95)
	at org.apache.tinkerpop.gremlin.jsr223.CachedGremlinScriptEngineManager.getEngineByName(CachedGremlinScriptEngineManager.java:58)
	at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.lambda$eval$0(GremlinExecutor.java:267)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
8388 [main] INFO  org.apache.tinkerpop.gremlin.server.op.OpLoader  - Adding the standard OpProcessor.
8390 [main] INFO  org.apache.tinkerpop.gremlin.server.op.OpLoader  - Adding the session OpProcessor.
8478 [main] INFO  org.apache.tinkerpop.gremlin.server.op.OpLoader  - Adding the traversal OpProcessor.
8487 [main] INFO  org.apache.tinkerpop.gremlin.server.op.traversal.TraversalOpProcessor  - Initialized cache for TraversalOpProcessor with size 1000 and expiration time of 600000 ms
8499 [main] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - idleConnectionTimeout was set to 0 which resolves to 0 seconds when configuring this value - this feature will be disabled
8499 [main] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - keepAliveInterval was set to 0 which resolves to 0 seconds when configuring this value - this feature will be disabled
8503 [main] WARN  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - The org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0 serialization class is deprecated.
8584 [main] INFO  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Configured application/vnd.gremlin-v3.0+gryo with org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0
8584 [main] WARN  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - The org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0 serialization class is deprecated.
8585 [main] INFO  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Configured application/vnd.gremlin-v3.0+gryo-stringd with org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0
8616 [main] INFO  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Configured application/vnd.gremlin-v3.0+json with org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV3d0
8620 [main] INFO  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Configured application/json with org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV3d0
8624 [main] WARN  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - The org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0 serialization class is deprecated.
8625 [main] INFO  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Configured application/vnd.gremlin-v1.0+gryo with org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0
8627 [main] WARN  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - The org.apache.tinkerpop.gremlin.driver.ser.GryoLiteMessageSerializerV1d0 serialization class is deprecated.
8628 [main] INFO  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Configured application/vnd.gremlin-v1.0+gryo-lite with org.apache.tinkerpop.gremlin.driver.ser.GryoLiteMessageSerializerV1d0
8628 [main] WARN  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - The org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0 serialization class is deprecated.
8628 [main] INFO  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Configured application/vnd.gremlin-v1.0+gryo-stringd with org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0
8629 [main] WARN  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - The org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV2d0 serialization class is deprecated.
8639 [main] INFO  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Configured application/vnd.gremlin-v2.0+json with org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV2d0
8639 [main] INFO  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - application/json already has org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV3d0 configured - it will not be replaced by org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV2d0, change order of serialization configuration if this is not desired.
8645 [main] INFO  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Configured application/vnd.gremlin-v1.0+json with org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV1d0
8646 [main] INFO  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - application/json already has org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV3d0 configured - it will not be replaced by org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0, change order of serialization configuration if this is not desired.
8665 [gremlin-server-boss-1] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - Gremlin Server configured with worker thread pool of 1, gremlin pool of 8 and boss thread pool of 1.
8665 [gremlin-server-boss-1] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - Channel started at port 8182.

User has changed - failing in Kubernetes yaml - command

Hi,
I use latest janusgraph/janusgraph:latest inside Kubernetes using yaml statefulset.
inside my statefulset yaml I have command option which than I provide with some bash script lines.
This commands includes creating a folder/files in /var/lib/janusgraph but this fails with permission denied.

This Yaml never failed before, and it seems like something has changed in this container.
I temporary changed the tag to janusgraph/janusgraph:0.5.3-74bd960 which is changed 4 days ago in dockerhub and it works. but if i put 0.5.3 or latest it will fail for the above reasons.

Any idea what have changed and what I'm doing wrong?

Delete component in gremlin-server.yml does not work

I'm trying to delete graph component in gremlin-server.yml. The command from the example does not change anything:

docker run --rm -it -e gremlinserver%d.graphs.graph= docker.io/janusgraph/janusgraph:latest janusgraph show-config
....
channelizer: org.apache.tinkerpop.gremlin.server.channel.WebSocketChannelizer
graphs:
  graph: /etc/opt/janusgraph/janusgraph.properties
scriptEngines:
....

@nvizo

Miscellaneous Improvements: yq v4; TinkerIoRegistry; cross-platform build

I forked the project and am working on several improvements.
https://github.com/babeloff/janusgraph-docker

I would like as many of these to make it into the main repo as possible.
Could I get some guidance on the best way to proceed?)

  • upgrade yq to v4.x
  • add TinkerIoRegistry to the gremlin-server.yaml
  • switch from bash scripts to Gradle
  • remote-objects.yaml

YQ

The new version is much more capable than the prior.
This change leads to an overhaul of docker-entrypoint.sh and expansion of the configuration of docker environment variables e.g. gremlinserver.* -> gremlinserver%1.* (or something like that)

TinkerIoRegistry

The ability to return subgraphs is not possible because the TinkerIoRegistryV3d0 is not included in the gremlin-server.yaml.
This could be overcome with the yq update mentioned above. In the short run the following could be added.

serializers:
...
  - className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0
    config:
      ioRegistries:
        - org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry
        - org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerIoRegistryV3d0
...

Gradle

bash is flaky on Windows.
Gradle works across platforms and has Docker plugins.

remote-objects.yaml

It has the wrong host (localhost rather than janusgraph)

Add 1.0.0-rc1 image

Now that we have a release candidate for 1.0.0, it would be good to also publish a Docker image for that release candidate.
We just need to make sure that it will only be tagged with the tag 1.0.0-rc1, not latest, 1.0.0 or anything like that.

can't make global graph var in gremlin console

using the default compose file in repo. then

docker exec -it d9bab0561123 /bin/bash got

d9bab0561123:/opt/janusgraph$

do ./bin/gremlin.sh and I can do
:> g.V() and
:> mgmt = graph.openManagement(); mgmt.getGraphIndexes(Vertex.class);

I want to use global g and graph , so I can don't using :>

g = traversal().withRemote('conf/remote-graph.properties') is ok.

But graph = JanusGraphFactory.open('conf/janusgraph-berkeleyje-lucene-server.properties') will got

java.lang.IllegalArgumentException: Could not instantiate implementation: org.janusgraph.diskstorage.berkeleyje.BerkeleyJEStoreManager
	at org.janusgraph.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:79)
	at org.janusgraph.diskstorage.Backend.getImplementationClass(Backend.java:527)
	at org.janusgraph.diskstorage.Backend.getStorageManager(Backend.java:491)
	at org.janusgraph.graphdb.configuration.builder.GraphDatabaseConfigurationBuilder.build(GraphDatabaseConfigurationBuilder.java:64)
	at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:176)
	at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:147)
	at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:94)
	at org.janusgraph.core.JanusGraphFactory$open.call(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:115)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:127)
	at groovysh_evaluate.run(groovysh_evaluate:3)
	at groovysh_evaluate$run.call(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
	at groovysh_evaluate$run.call(Unknown Source)
	at org.codehaus.groovy.tools.shell.Interpreter.evaluate(Interpreter.groovy:82)
	at org.codehaus.groovy.tools.shell.Evaluator$evaluate.call(Unknown Source)
	at org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:201)
	at org.apache.tinkerpop.gremlin.console.GremlinGroovysh.super$3$execute(GremlinGroovysh.groovy)
	at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:101)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1217)
	at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:144)
	at org.apache.tinkerpop.gremlin.console.GremlinGroovysh.execute(GremlinGroovysh.groovy:83)
	at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:120)
	at org.codehaus.groovy.tools.shell.Shell$leftShift$2.call(Unknown Source)
	at org.codehaus.groovy.tools.shell.ShellRunner.work(ShellRunner.groovy:93)
	at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$work(InteractiveShellRunner.groovy)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:101)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1217)
	at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:144)
	at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:164)
	at org.codehaus.groovy.tools.shell.InteractiveShellRunner.work(InteractiveShellRunner.groovy:138)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.groovy.runtime.callsite.PlainObjectMetaMethodSite.doInvoke(PlainObjectMetaMethodSite.java:43)
	at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:190)
	at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:58)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:160)
	at org.codehaus.groovy.tools.shell.ShellRunner.run(ShellRunner.groovy:57)
	at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$run(InteractiveShellRunner.groovy)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:101)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1217)
	at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:144)
	at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:164)
	at org.codehaus.groovy.tools.shell.InteractiveShellRunner.run(InteractiveShellRunner.groovy:97)
	at java_lang_Runnable$run.call(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:115)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:119)
	at org.apache.tinkerpop.gremlin.console.Console.<init>(Console.groovy:170)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:80)
	at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:59)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:237)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:265)
	at org.apache.tinkerpop.gremlin.console.Console.main(Console.groovy:524)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at org.janusgraph.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:73)
	... 75 more
Caused by: org.janusgraph.diskstorage.PermanentBackendException: Error during BerkeleyJE initialization:
	at org.janusgraph.diskstorage.berkeleyje.BerkeleyJEStoreManager.initialize(BerkeleyJEStoreManager.java:138)
	at org.janusgraph.diskstorage.berkeleyje.BerkeleyJEStoreManager.<init>(BerkeleyJEStoreManager.java:103)
	... 80 more
Caused by: com.sleepycat.je.EnvironmentLockedException: (JE 18.3.12) /var/lib/janusgraph/data 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.
	at com.sleepycat.je.log.FileManager.<init>(FileManager.java:404)
	at com.sleepycat.je.dbi.EnvironmentImpl.<init>(EnvironmentImpl.java:646)
	at com.sleepycat.je.dbi.EnvironmentImpl.<init>(EnvironmentImpl.java:518)
	at com.sleepycat.je.dbi.DbEnvPool.getEnvironment(DbEnvPool.java:192)
	at com.sleepycat.je.Environment.makeEnvironmentImpl(Environment.java:278)
	at com.sleepycat.je.Environment.<init>(Environment.java:258)
	at com.sleepycat.je.Environment.<init>(Environment.java:228)
	at org.janusgraph.diskstorage.berkeleyje.BerkeleyJEStoreManager.initialize(BerkeleyJEStoreManager.java:135)
	... 81 more

Is it possible to get the global graph?

Replace Bash builds with Gradle

The main motivation is to allow building on Windows.
bash is flaky on Windows.
Gradle works across platforms and has Docker plugins.

The affected files are:

  • build-images.sh
  • push-images.sh
  • test-image.sh
  • update.sh

The scripts used by the container would not be modified, i.e.

  • docker-entrypoint.sh
  • load-initialdb.sh

The recommended tool for building a container for a java application is

Other candidate plugins

dockerfile's mistake in building arm janusgraph images for arm server

I build a janusgraph images for arm server , use dockerfile that provided by this path:
https://github.com/JanusGraph/janusgraph-docker/tree/master/0.5

I find a mistake in the Dockerfile.
line 33:
curl -fSL https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64 -o yq &&
it should be correct as this:
curl -fSL https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_arm64 -o yq && \

Because the yq is different for arm64 and amd64. Amd64 is for x86 server, and arm64 is for arm server.
At the begin, I don't find the mistake. So , I can't docker run the janusgraph images normly. The logs tell me, ' /usr/bin/yq;cannot execute-binary file...'.
So I sure the yq file is not correct. I check the dockerfile, I find the mistake in line 33.

I correct the mistake, then build the images for arm server.
It is OK.

So please check all the version Dockerfile. It may be have the same mistake for building arm server images.

Images are not available on DockerHub

I've tryied to execute the Docker run command as suggested by the README but it fails because the image doesn't seem to exist on the docker hub.

docker run --name janusgraph-default janusgraph/janusgraph:latest
Unable to find image 'janusgraph/janusgraph:latest' locally
/nix/store/xrvy0qrc0vhzbpad86xj5wb87srsllal-docker-18.09.2/libexec/docker/docker: Error response from daemon: pull access denied for janusgraph/janusgraph, repository does not exist or may require 'docker login'.
See '/nix/store/xrvy0qrc0vhzbpad86xj5wb87srsllal-docker-18.09.2/libexec/docker/docker run --help'.

Upgrade yq to v4

We're using yq to configure the YAML config file for Gremlin Server, but we are still using version 3 of that library. We should update it to version 4 to stay on a supported version.
This is most likely a breaking change as the syntax changed between both versions: https://mikefarah.gitbook.io/yq/upgrading-from-v3

Trouble Configuring JanusGraph Server for ConfiguredGraphFactory

Hello,

This is not an issue, more of a general question. How may I launch the cassandra-es template, using

sudo docker-compose -f docker-compose-cql-es.yml up

with ConfiguredGraphFactory enabled? I've attempted to run the commands in section 9.8.2 of the following site: https://docs.janusgraph.org/0.3.0/configuredgraphfactory.html

But I am presented with the following

gremlin> :remote connect tinkerpop.server conf/remote.yaml session
==>Configured xxx.xxx.xxx.xxx/xxx.xxx.xxx.xxxx:8182-[79a1e7fe-b188-468b-86d2-d680a60dff9a]
gremlin> :remote console
==>All scripts will now be sent to Gremlin Server - [xxx.xxx.xxx.xxx/xxx.xxx.xxx.xxxx:8182]-[79a1e7fe-b188-468b-86d2-d680a60dff9a] - type ':remote console' to return to local mode
gremlin> map = new HashMap<String, Object>();
gremlin> map.put("storage.backend", "cql");
==>null
gremlin> map.put("storage.hostname", "jce-cassandra");
==>null
gremlin> ConfiguredGraphFactory.createConfiguration(new MapConfiguration(map));
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.
Type ':help' or ':h' for help.
Display stack trace? [yN]

Any help would be greatly appreciated! Thanks.

How to upgrade from log4j 1.x version to log4j 2.x version in Janusgraph

# NOTE: THIS FILE IS GENERATED VIA "update.sh"
# DO NOT EDIT IT DIRECTLY; CHANGES WILL BE OVERWRITTEN.
#
# Copyright 2019 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.

FROM openjdk:8-jdk as builder

ARG JANUS_VERSION=0.4.1

ENV JANUS_VERSION=${JANUS_VERSION} \
    JANUS_HOME=/opt/janusgraph

RUN curl -fSL https://github.com/JanusGraph/janusgraph/releases/download/v${JANUS_VERSION}/janusgraph-${JANUS_VERSIO           N}-hadoop2.zip -o janusgraph.zip && \
    curl -fSL https://github.com/JanusGraph/janusgraph/releases/download/v${JANUS_VERSION}/janusgraph-${JANUS_VERSIO           N}-hadoop2.zip.asc -o janusgraph.zip.asc && \
    curl -fSL https://github.com/JanusGraph/janusgraph/releases/download/v${JANUS_VERSION}/KEYS -o KEYS && \
    gpg --import KEYS && \
    gpg --batch --verify janusgraph.zip.asc janusgraph.zip && \
    unzip janusgraph.zip && \
    mv janusgraph-${JANUS_VERSION}-hadoop2 /opt/janusgraph && \
    rm -rf ${JANUS_HOME}/elasticsearch && \
    rm -rf ${JANUS_HOME}/javadocs && \
    rm -rf ${JANUS_HOME}/log && \
    rm -rf ${JANUS_HOME}/examples

COPY conf/janusgraph-berkeleyje-lucene-server.properties conf/log4j-server.properties ${JANUS_HOME}/conf/gremlin-ser           ver/
COPY scripts/remote-connect.groovy ${JANUS_HOME}/scripts/
COPY conf/gremlin-server.yaml ${JANUS_HOME}/conf/
#COPY conf/Circuit_Equipment_cluster.properties /opt/janusgraph/conf/gremlin-server/
COPY ./groovy-sql-2.0.1.jar /opt/janusgraph/lib/
COPY ./ojdbc8.jar /opt/janusgraph/lib/
FROM openjdk:8-jdk

ARG CREATED=test
ARG REVISION=test
ARG JANUS_VERSION=0.4.1

ENV JANUS_VERSION=${JANUS_VERSION} \
    JANUS_HOME=/opt/janusgraph \
    JANUS_CONFIG_DIR=/etc/opt/janusgraph \
    JANUS_DATA_DIR=/var/lib/janusgraph \
    JANUS_SERVER_TIMEOUT=30 \
    JANUS_STORAGE_TIMEOUT=60 \
    JANUS_PROPS_TEMPLATE=berkeleyje-lucene \
    janusgraph.index.search.directory=/var/lib/janusgraph/index \
    janusgraph.storage.directory=/var/lib/janusgraph/data \
    gremlinserver.graph=/etc/opt/janusgraph/janusgraph.properties \
    gremlinserver.threadPoolWorker=1 \
    gremlinserver.gremlinPool=8

RUN groupadd -r janusgraph --gid=999 && \
    useradd -r -g janusgraph --uid=999 janusgraph && \
    apt-get update -y && \
    DEBIAN_FRONTEND=noninteractive apt-get install -y krb5-user && \
    rm -rf /var/lib/apt/lists/* && \
    mkdir /docker-entrypoint-initdb.d

COPY --from=builder /opt/janusgraph/ /opt/janusgraph/

COPY docker-entrypoint.sh /usr/local/bin/
COPY load-initdb.sh /usr/local/bin/

RUN chmod 755 /usr/local/bin/docker-entrypoint.sh && \
    chmod 755 /usr/local/bin/load-initdb.sh && \
    chown -R janusgraph:janusgraph ${JANUS_HOME}

RUN apt-get update
RUN apt-get -y install vim
RUN apt-get -y install net-tools
RUN apt-get -y install cron

WORKDIR /opt
ADD ./oracle-instantclient.deb  /opt
ADD ./oracle-instantclient-sqlplus.deb  /opt
ADD ./oracle-instantclient19.6-tools_19.6.0.0.0-2_amd64.deb  /opt
#if libaio also required
RUN apt-get install libaio1
RUN dpkg -i oracle-instantclient.deb
RUN dpkg -i oracle-instantclient-sqlplus.deb
RUN dpkg -i oracle-instantclient19.6-tools_19.6.0.0.0-2_amd64.deb
#COPY oracle.sh /etc/profile.d/
#RUN chmod 755 /etc/profile.d/oracle.sh
#RUN ["/bin/bash", "-c", "source /etc/profile.d/oracle.sh"
ENV ORACLE_HOME=/usr/lib/oracle/19.6/client64
ENV PATH=$ORACLE_HOME/bin:$PATH
ENV LD_LIBRARY_PATH=$ORACLE_HOME/lib
ENV EDITOR=vim
EXPOSE 8182
EXPOSE 8183
EXPOSE 8184
EXPOSE 8185

WORKDIR ${JANUS_HOME}

ENTRYPOINT [ "docker-entrypoint.sh" ]
CMD [ "janusgraph" ]

LABEL org.opencontainers.image.title="JanusGraph Docker Image" \
      org.opencontainers.image.description="Official JanusGraph Docker image" \
      org.opencontainers.image.url="https://janusgraph.org/" \
      org.opencontainers.image.documentation="https://docs.janusgraph.org/v0.4/" \
      org.opencontainers.image.revision="${REVISION}" \
      org.opencontainers.image.source="https://github.com/JanusGraph/janusgraph-docker/" \
      org.opencontainers.image.vendor="JanusGraph" \
      org.opencontainers.image.version="${JANUS_VERSION}" \
      org.opencontainers.image.created="${CREATED}" \
      org.opencontainers.image.license="Apache-2.0"

Unable to set gremlin server options that are not simple types (e.g. 'graphs')

I'm trying to setup the JG docker image to use ConfiguredGraphFactory. Not sure if I am doing it correctly but anyway it seems there is an issue with the docker configuration options that aren't simple strings.

docker run --rm -it -e gremlinserver.graphs={ConfigurationManagementGraph:/etc/opt/janusgraph/janusgraph.properties} janusgraph/janusgraph:0.4.0 janusgraph show-config

See the graphs object in the output.

Output

# contents of /etc/opt/janusgraph/janusgraph.properties
#
# NOTE: THIS FILE IS GENERATED VIA "update.sh"
# DO NOT EDIT IT DIRECTLY; CHANGES WILL BE OVERWRITTEN.
#
# Copyright 2019 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.

gremlin.graph=org.janusgraph.core.JanusGraphFactory
storage.backend=berkeleyje
storage.directory=/var/lib/janusgraph/data
index.search.backend=lucene
index.search.directory=/var/lib/janusgraph/index
---------------------------------------
# contents of /etc/opt/janusgraph/gremlin-server.yaml
# Copyright 2019 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.

host: 0.0.0.0
port: 8182
scriptEvaluationTimeout: 30000
channelizer: org.apache.tinkerpop.gremlin.server.channel.WebSocketChannelizer
graphs: {ConfigurationManagementGraph:/etc/opt/janusgraph/janusgraph.properties}
  graph: /etc/opt/janusgraph/janusgraph.properties
}
scriptEngines: {
  gremlin-groovy: {
    plugins: { org.janusgraph.graphdb.tinkerpop.plugin.JanusGraphGremlinPlugin: {},
               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.jsr223.ScriptFileGremlinPlugin: {files: [scripts/empty-sample.groovy]}}}}
serializers:
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0, config: { serializeResultToString: true }}
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV3d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}
  # Older serialization versions for backwards compatibility:
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GryoLiteMessageSerializerV1d0, config: {ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0, config: { serializeResultToString: true }}
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV2d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV1d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistryV1d0] }}
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistryV1d0] }}
processors:
  - { className: org.apache.tinkerpop.gremlin.server.op.session.SessionOpProcessor, config: { sessionTimeout: 28800000 }}
  - { className: org.apache.tinkerpop.gremlin.server.op.traversal.TraversalOpProcessor, config: { cacheExpirationTime: 600000, cacheMaxSize: 1000 }}
metrics: {
  consoleReporter: {enabled: true, interval: 180000},
  csvReporter: {enabled: true, interval: 180000, fileName: /tmp/gremlin-server-metrics.csv},
  jmxReporter: {enabled: true},
  slf4jReporter: {enabled: true, interval: 180000},
  gangliaReporter: {enabled: false, interval: 180000, addressingMode: MULTICAST},
  graphiteReporter: {enabled: false, interval: 180000}}
maxInitialLineLength: 4096
maxHeaderSize: 8192
maxChunkSize: 8192
maxContentLength: 65536
maxAccumulationBufferComponents: 1024
resultIterationBatchSize: 64
writeBufferLowWaterMark: 32768
writeBufferHighWaterMark: 65536

threadPoolWorker: 1
gremlinPool: 8

Shrink Docker image sizes via OpenJDK 8 JRE 'slim' base images

The currently-built JanusGraph Docker images are way too large. While recent releases are on the order of 260-270MB, the built containers are much larger.

Compare:

Version Release zip size Docker image size
0.2.2 276 MB 702 MB
0.2.3 276 MB 675 MB
0.3.1 261 MB 647 MB
0.3.2 261 MB N/A (not published yet)

It may be because the current Docker images are built using the base image openjdk:8-jdk but we don't need the JDK for running JanusGraph, that's what we need to compile it. Thus, we can simply use the JRE instead of the JDK for running it, so we can start using openjdk:8-jre.

Further, we can get rid of even more unneeded support in the base image by switching to openjdk:8-jre-slim which should be sufficient for running JanusGraph.

These image versions are listed on OpenJDK image files.

For details on these image versions, see this SO answer which breaks down the various types of OpenJDK Docker image base images.

500 Internal Server Error from janusgraph container

I first run ./build-images.sh which works fine.

Then I run
docker-compose -f docker-compose-cassandra-es.yml up

I am getting the following

jce-janusgraph   | 29285 [gremlin-server-exec-2] WARN  org.apache.tinkerpop.gremlin.server.handler.HttpGremlinEndpointHandler  - Invalid request - responding with 500 Internal Server Error and No such property: g for class: Script3

jce-janusgraph   | groovy.lang.MissingPropertyException: No such property: g for class: Script3

jce-janusgraph   | 	at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:53)

jce-janusgraph   | 	at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:52)

jce-janusgraph   | 	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:307)

jce-janusgraph   | 	at Script3.run(Script3.groovy:1)

jce-janusgraph   | 	at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:843)

jce-janusgraph   | 	at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:548)

jce-janusgraph   | 	at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:233)

jce-janusgraph   | 	at org.apache.tinkerpop.gremlin.groovy.engine.ScriptEngines.eval(ScriptEngines.java:120)

jce-janusgraph   | 	at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.lambda$eval$0(GremlinExecutor.java:290)

jce-janusgraph   | 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)

jce-janusgraph   | 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

jce-janusgraph   | 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)

jce-janusgraph   | 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

jce-janusgraph   | 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

jce-janusgraph   | 	at java.lang.Thread.run(Thread.java:748)

When I try connecting from the gremlin console I get:

jce-janusgraph   | 29285 [gremlin-server-exec-2] WARN  org.apache.tinkerpop.gremlin.server.handler.HttpGremlinEndpointHandler  - Invalid request - responding with 500 Internal Server Error and No such property: g for class: Script3
jce-janusgraph   | groovy.lang.MissingPropertyException: No such property: g for class: Script3
jce-janusgraph   | at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:53)
jce-janusgraph   | at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:52)
jce-janusgraph   | at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:307)
jce-janusgraph   | at Script3.run(Script3.groovy:1)
jce-janusgraph   | at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:843)
jce-janusgraph   | at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:548)
jce-janusgraph   | at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:233)
jce-janusgraph   | at org.apache.tinkerpop.gremlin.groovy.engine.ScriptEngines.eval(ScriptEngines.java:120)
jce-janusgraph   | at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.lambda-bash(GremlinExecutor.java:290)
jce-janusgraph   | at java.util.concurrent.FutureTask.run(FutureTask.java:266)
jce-janusgraph   | at java.util.concurrent.Executors.call(Executors.java:511)
jce-janusgraph   | at java.util.concurrent.FutureTask.run(FutureTask.javajce-janusgraph   | at java.util.concurrent.FutureTask.run(FutureTask.javajce-janusgraph   | at java.util.concurrent.FutureTask.rt java.util.concurrent.ThreadPoolExecutor.run(ThreadPoolExecutor.java:624)
jce-janusgraph   | at java.lang.Thread.run(Thread.java:748)

I'll attach the full docker-compose output in a file.
janusgraph-docker-compose-output.txt

System Info

MacOS 10.13.1
Docker CE Version 18.06.1-ce-mac73 (26764)

Support M1

Hi, Is it possible to push a image with Arm Support to Dockerhub?

Remove janusgraph-server.yaml from image

This repo currently contains a custom janusgraph-server.yaml: https://github.com/JanusGraph/janusgraph-docker/blob/master/build/conf/janusgraph-server.yaml

I think we should remove that and use instead the default config file from the distribution build. That way, the Docker image will always contain the same default config as the distribution build.

We only need to make sure that the correct properties file is set under graphs.graph, but that can be done via an environment variable.

I noticed this because the YAML doesn't contain our JanusGraphManager which we've added by default in JanusGraph/janusgraph#2845.

Add a dedicated console image

JanusGraph comes with a Gremlin Console pre-configured for JanusGraph that can also be used via the Docker image as described in the README.md.

This could be simplified with a dedicated Docker image for the Gremlin Console as suggested by @farodin91 here.
Users wouldn't need to explicitly provide ./bin/gremlin.sh as an argument and the image size would probably also be much smaller.

Dockerfile USER breaks gremlin remote shell

USER janusgraph in Dockerfile disables the possibility of using root account in kubernetes environment becuase user janusgraph has no home directory which is required by gremlin.sh remote sessions

Document schema loading

The docker image now supports the execution of Groovy files on startup, but the docs currently only show an example to execute Gremlin traversals, e.g., to load initial data.
It's also possible to access the management API, for example to create a schema. This can be done with the remote Gremlin Console.
We should explain this use case as it's probably not clear to most new users.

See this thread on janusgraph-users for more information.

Support initial loading of data

We should make it easy to load data on startup, e.g., for integration tests. Many database images support loading of data from the /docker-entrypoint-initdb.d/ directory (like PostgreSQL, MySQL, or MongoDB ). So that seems to be the de facto standard.
I think it makes sense to support the following formats:

  • Groovy scripts can just be executed with the Gremlin Console
  • GraphSON / Gryo files should be loaded, probably also with the Gremlin Console, maybe by connecting with remote

Drop the `latest` Docker image tag

Even though Docker supports latest as a special tag which makes it easy to pull a version, this is widely recommended against:

Given that a new version of JanusGraph (or any software, really) can break backwards-compatibility at any time, using latest is a disaster waiting to happen. Users should be specifying a specific release version of the JanusGraph Docker image and relying on the functionality and APIs provided in that image and only that image, and update to the next version (if they so choose) explicitly and deliberately.

Using latest will only cause issues down the line for them, so we should just remove it to avoid this becoming a much larger issue down the line.

Setting ids.block-size with Docker

Hello

I'm having a hard time setting ids.block-size using docker-compose. I have tried setting the janusgraph.ids.block-size environment variable but I cannot see it reflected in the gremlin console on any of my graphs.

I am checking this by doing the following:

docker run --rm --network janusgraph_net -e GREMLIN_REMOTE_HOSTS=janusgraph -it janusgraph/janusgraph ./bin/gremlin.sh

And then connecting to the remote host

:remote connect tinkerpop.server conf/remote.yaml session
:remote console

And then checking the value (referencing: https://docs.janusgraph.org/configs/#global-configuration)

gremlin> mgmt = graph.openManagement()
==>org.janusgraph.graphdb.database.management.ManagementSystem@348bdff2
gremlin> mgmt.get("ids.block-size")
==>10000

And I set janusgraph.ids.block-size using the docker-compose.yml below:

version: '3.8'

services:
  janusgraph:
    image: janusgraph/janusgraph
    ports:
      - "8182:8182"
      - "8080:8080"
    environment:
      - "JANUS_PROPS_TEMPLATE=cql-es"
      - "janusgraph.ids.block-size=40000"
      - 'gremlinserver.graphs.mygraph=conf/mygraph/janusgraph.mygraph.properties'
    volumes:
      - './janusgraph-conf:/opt/janusgraph/conf/mygraph'
    restart: always
    healthcheck:
      test: ["CMD", "bin/gremlin.sh", "-e", "scripts/remote-connect.groovy"]
      interval: 1m
      timeout: 30s
      retries: 5
    networks:
      - janusgraph_net
networks:
  janusgraph_net:
    name: janusgraph_net

I would expect to see 40000 instead of the default 10000, along with any other graphs inheriting the 40000 too, but it's always the default. Can I have some help setting ids.block-size across all instances and graphs using Docker?

Connection refused when trying to create graph

I've used the following command to set up janusgraph with Cassandra+Elasticsearch:

docker-compose -f docker-compose-cql-es.yml up

This starts all the required containers, which I double checked with:

docker ps

Now I want to connect to Janusgraph via Gremlin console using:

docker-compose -f docker-compose-cql-es.yml run --rm -e GREMLIN_REMOTE_HOSTS=janusgraph janusgraph ./bin/gremlin.sh

This starts the gremlin console and I configure the remote with:

:remote connect tinkerpop.server conf/remote.yaml
:remote console

Which works fine aswell. After that I try to create a new graph, which fails with:

graph = JanusGraphFactory.open('conf/janusgraph-cassandra-es.properties')

This gives me the following message:

Connection refused (Connection refused)

Full Stack Trace:

java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at org.apache.thrift.transport.TSocket.open(TSocket.java:182)
at org.apache.thrift.transport.TFramedTransport.open(TFramedTransport.java:81)
at org.janusgraph.diskstorage.cassandra.thrift.thriftpool.CTConnectionFactory.makeRawConnection(CTConnectionFactory.java:110)
at org.janusgraph.diskstorage.cassandra.thrift.thriftpool.CTConnectionFactory.makeObject(CTConnectionFactory.java:74)
at org.janusgraph.diskstorage.cassandra.thrift.thriftpool.CTConnectionFactory.makeObject(CTConnectionFactory.java:43)
at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1220)
at org.janusgraph.diskstorage.cassandra.thrift.CassandraThriftStoreManager.getCassandraPartitioner(CassandraThriftStoreManager.java:215)
at org.janusgraph.diskstorage.cassandra.thrift.CassandraThriftStoreManager.(CassandraThriftStoreManager.java:197)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.janusgraph.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:58)
at org.janusgraph.diskstorage.Backend.getImplementationClass(Backend.java:440)
at org.janusgraph.diskstorage.Backend.getStorageManager(Backend.java:411)
at org.janusgraph.graphdb.configuration.builder.GraphDatabaseConfigurationBuilder.build(GraphDatabaseConfigurationBuilder.java:50)
at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:161)
at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:132)
at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:79)
at org.janusgraph.core.JanusGraphFactory$open.call(Unknown Source)
at Script4.run(Script4.groovy:1)
at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:674)
at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:376)
at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:233)
at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.lambda$eval$0(GremlinExecutor.java:266)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

Anything I'm doing severly wrong or any guidance?

Fails to load serializers V3

Hi
thanks for the nice docker images !

I just have a minor issue, namely that the version 3 of the Gyro serializers fails to load, in the images tagged 0.3+. I didn't test 0.2

Is there a way to add the dependancy somewhere ?
Thanks !

Config sample:

serializers:
- { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}
- { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0, config: { serializeResultToString: true }}
- { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV3d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}

Error message:

6814 [main] WARN org.apache.tinkerpop.gremlin.server.AbstractChannelizer - Could not find configured serializer class - org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0 - it will not be available
6815 [main] WARN org.apache.tinkerpop.gremlin.server.AbstractChannelizer - Could not find configured serializer class - org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0 - it will not be available
6816 [main] WARN org.apache.tinkerpop.gremlin.server.AbstractChannelizer - Could not find configured serializer class - org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV3d0 - it will not be available
6912 [main]

Document authentication

I'm attempting to add basic authentication to the websocket channel. I tried following the docs from https://docs.janusgraph.org/basics/server/#http-basic-authentication and added the authentication config in gremlin-server.yaml. I used my own config files in a folder conf and tried to run docker-compose up. Its failing with the error "Gremlin Server was unable to start and will now begin shutdown: Could not create/configure Authenticator null error"

What am I doing wrong here ?

// docker-compose.yml
# Copyright 2019 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.

version: "3"

services:
  janusgraph:
    image: janusgraph/janusgraph:latest
    container_name: jce-janusgraph
    ports:
      - "8182:8182"
    networks:
      - jce-network
    volumes:
      # bind mounts for configs; use read only so not overridden by environment variables
      - "./conf:/etc/opt/janusgraph/:ro"
    healthcheck:
      test: ["CMD", "bin/gremlin.sh", "-e", "scripts/remote-connect.groovy"]
      interval: 10s
      timeout: 30s
      retries: 3
  cassandra:
    image: cassandra:3
    container_name: jce-cassandra
    ports:
      - "9042:9042"
      - "9160:9160"
    networks:
      - jce-network
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:6.6.0
    container_name: jce-elastic
    environment:
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
      - "http.host=0.0.0.0"
      - "network.host=0.0.0.0"
      - "transport.host=127.0.0.1"
      - "cluster.name=docker-cluster"
      - "xpack.security.enabled=false"
      - "discovery.zen.minimum_master_nodes=1"
    ports:
      - "9200:9200"
    networks:
      - jce-network

networks:
  jce-network:
volumes:
  janusgraph-default-data:
// conf/gremlin-server.yaml
# Copyright 2019 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.

host: 0.0.0.0
port: 8182
scriptEvaluationTimeout: 30000
channelizer: org.apache.tinkerpop.gremlin.server.channel.WebSocketChannelizer
graphs: {
  graph: /etc/opt/janusgraph/janusgraph.properties
}
scriptEngines: {
  gremlin-groovy: {
    plugins: { org.janusgraph.graphdb.tinkerpop.plugin.JanusGraphGremlinPlugin: {},
               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.jsr223.ScriptFileGremlinPlugin: {files: [scripts/empty-sample.groovy]}}}}
serializers:
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0, config: { serializeResultToString: true }}
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV3d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}
  # Older serialization versions for backwards compatibility:
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GryoLiteMessageSerializerV1d0, config: {ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0, config: { serializeResultToString: true }}
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV2d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV1d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistryV1d0] }}
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistryV1d0] }}
processors:
  - { className: org.apache.tinkerpop.gremlin.server.op.session.SessionOpProcessor, config: { sessionTimeout: 28800000 }}
  - { className: org.apache.tinkerpop.gremlin.server.op.traversal.TraversalOpProcessor, config: { cacheExpirationTime: 600000, cacheMaxSize: 1000 }}
metrics: {
  consoleReporter: {enabled: true, interval: 180000},
  csvReporter: {enabled: true, interval: 180000, fileName: /tmp/gremlin-server-metrics.csv},
  jmxReporter: {enabled: true},
  slf4jReporter: {enabled: true, interval: 180000},
  gangliaReporter: {enabled: false, interval: 180000, addressingMode: MULTICAST},
  graphiteReporter: {enabled: false, interval: 180000}}
maxInitialLineLength: 4096
maxHeaderSize: 8192
maxChunkSize: 8192
maxContentLength: 65536
maxAccumulationBufferComponents: 1024
resultIterationBatchSize: 64
writeBufferLowWaterMark: 32768
writeBufferHighWaterMark: 65536

threadPoolWorker: 1
gremlinPool: 8

authentication: { <<< this is what i added to the default template
   authenticator: org.janusgraph.graphdb.tinkerpop.gremlin.server.auth.JanusGraphSimpleAuthenticator,
   authenticationHandler: org.apache.tinkerpop.gremlin.server.handler.HttpBasicAuthenticationHandler,
   config: {
     defaultUsername: user,
     defaultPassword: password,
     credentialsDb: /etc/opt/janusgraph/janusgraph-credentials-server.properties
    }
 }

// conf/janusgraph.properties
gremlin.graph=org.janusgraph.core.JanusGraphFactory
storage.backend=cql
storage.hostname=jce-cassandra
cache.db-cache = true
cache.db-cache-clean-wait = 20
cache.db-cache-time = 180000
cache.db-cache-size = 0.25
index.search.backend=elasticsearch
index.search.hostname=jce-elastic
index.search.elasticsearch.client-only=true
storage.directory=/var/lib/janusgraph/data
index.search.directory=/var/lib/janusgraph/index
// conf/janusgraph-credentials-server.properties
username:user
password:password

Here is the response tail of docker-compose up.

jce-janusgraph   | 1    [main] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - 3.4.6
jce-janusgraph   |          \,,,/
jce-janusgraph   |          (o o)
jce-janusgraph   | -----oOOo-(3)-oOOo-----
jce-janusgraph   | 
jce-janusgraph   | 76   [main] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - Configuring Gremlin Server from /etc/opt/janusgraph/gremlin-server.yaml
jce-janusgraph   | 135  [main] INFO  org.apache.tinkerpop.gremlin.server.util.MetricManager  - Configured Metrics ConsoleReporter configured with report interval=180000ms
jce-janusgraph   | 137  [main] INFO  org.apache.tinkerpop.gremlin.server.util.MetricManager  - Configured Metrics CsvReporter configured with report interval=180000ms to fileName=/tmp/gremlin-server-metrics.csv
jce-janusgraph   | 173  [main] INFO  org.apache.tinkerpop.gremlin.server.util.MetricManager  - Configured Metrics JmxReporter configured with domain= and agentId=
jce-janusgraph   | 174  [main] INFO  org.apache.tinkerpop.gremlin.server.util.MetricManager  - Configured Metrics Slf4jReporter configured with interval=180000ms and loggerName=org.apache.tinkerpop.gremlin.server.Settings$Slf4jReporterMetrics
jce-janusgraph   | 462  [main] INFO  com.datastax.driver.core  - DataStax Java driver 3.9.0 for Apache Cassandra
jce-janusgraph   | 475  [main] INFO  com.datastax.driver.core.GuavaCompatibility  - Detected Guava < 19 in the classpath, using legacy compatibility layer
jce-janusgraph   | 591  [main] INFO  com.datastax.driver.core.ClockFactory  - Using native clock to generate timestamps.
jce-janusgraph   | 661  [main] INFO  com.datastax.driver.core.NettyUtil  - Found Netty's native epoll transport in the classpath, using it
jce-janusgraph   | 890  [main] INFO  com.datastax.driver.core.policies.DCAwareRoundRobinPolicy  - Using data-center name 'datacenter1' for DCAwareRoundRobinPolicy (if this is incorrect, please provide the correct datacenter name with DCAwareRoundRobinPolicy constructor)
jce-janusgraph   | 890  [main] INFO  com.datastax.driver.core.Cluster  - New Cassandra host jce-cassandra/172.18.0.4:9042 added
jce-janusgraph   | 1020 [main] INFO  org.janusgraph.core.util.ReflectiveConfigOptionLoader  - Loaded and initialized config classes: 13 OK out of 13 attempts in PT0.034S
jce-janusgraph   | 3081 [main] INFO  org.janusgraph.graphdb.idmanagement.UniqueInstanceIdRetriever  - Generated unique-instance-id=ac120003460-8e2964850e221
jce-janusgraph   | 3085 [main] INFO  com.datastax.driver.core.ClockFactory  - Using native clock to generate timestamps.
jce-janusgraph   | 3131 [main] INFO  com.datastax.driver.core.policies.DCAwareRoundRobinPolicy  - Using data-center name 'datacenter1' for DCAwareRoundRobinPolicy (if this is incorrect, please provide the correct datacenter name with DCAwareRoundRobinPolicy constructor)
jce-janusgraph   | 3131 [main] INFO  com.datastax.driver.core.Cluster  - New Cassandra host jce-cassandra/172.18.0.4:9042 added
jce-janusgraph   | 3154 [main] INFO  org.janusgraph.diskstorage.Backend  - Configuring index [search]
jce-janusgraph   | 3436 [main] INFO  org.janusgraph.diskstorage.Backend  - Initiated backend operations thread pool of size 24
jce-janusgraph   | 3480 [main] INFO  org.janusgraph.diskstorage.Backend  - Configuring total store cache size: 112424774
jce-janusgraph   | 3571 [main] INFO  org.janusgraph.diskstorage.log.kcvs.KCVSLog  - Loaded unidentified ReadMarker start time 2020-07-17T18:37:39.866Z into org.janusgraph.diskstorage.log.kcvs.KCVSLog$MessagePuller@3e6534e7
jce-janusgraph   | 3572 [main] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - Graph [graph] was successfully configured via [/etc/opt/janusgraph/janusgraph.properties].
jce-janusgraph   | 3572 [main] INFO  org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor  - Initialized Gremlin thread pool.  Threads in pool named with pattern gremlin-*
jce-janusgraph   | 3600 [main] INFO  org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor  - Initialized GremlinExecutor and preparing GremlinScriptEngines instances.
jce-janusgraph   | 5874 [main] INFO  org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor  - Initialized gremlin-groovy GremlinScriptEngine and registered metrics
jce-janusgraph   | 5878 [main] INFO  org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor  - A GraphTraversalSource is now bound to [g] with graphtraversalsource[standardjanusgraph[cql:[jce-cassandra]], standard]
jce-janusgraph   | 5884 [main] INFO  org.apache.tinkerpop.gremlin.server.op.OpLoader  - Adding the standard OpProcessor.
jce-janusgraph   | 5886 [main] INFO  org.apache.tinkerpop.gremlin.server.op.OpLoader  - Adding the session OpProcessor.
jce-janusgraph   | 5943 [main] INFO  org.apache.tinkerpop.gremlin.server.op.OpLoader  - Adding the traversal OpProcessor.
jce-janusgraph   | 5949 [main] INFO  org.apache.tinkerpop.gremlin.server.op.traversal.TraversalOpProcessor  - Initialized cache for TraversalOpProcessor with size 1000 and expiration time of 600000 ms
jce-janusgraph   | 5950 [main] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - Executing start up LifeCycleHook
jce-janusgraph   | 5962 [main] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - Executed once at startup of Gremlin Server.
jce-janusgraph   | 5967 [main] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - idleConnectionTimeout was set to 0 which resolves to 0 seconds when configuring this value - this feature will be disabled
jce-janusgraph   | 5967 [main] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - keepAliveInterval was set to 0 which resolves to 0 seconds when configuring this value - this feature will be disabled
jce-janusgraph   | 5969 [main] WARN  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - The org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0 serialization class is deprecated.
jce-janusgraph   | 6008 [main] INFO  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Configured application/vnd.gremlin-v3.0+gryo with org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0
jce-janusgraph   | 6008 [main] WARN  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - The org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0 serialization class is deprecated.
jce-janusgraph   | 6008 [main] INFO  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Configured application/vnd.gremlin-v3.0+gryo-stringd with org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0
jce-janusgraph   | 6023 [main] INFO  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Configured application/vnd.gremlin-v3.0+json with org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV3d0
jce-janusgraph   | 6023 [main] INFO  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Configured application/json with org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV3d0
jce-janusgraph   | 6024 [main] WARN  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - The org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0 serialization class is deprecated.
jce-janusgraph   | 6025 [main] INFO  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Configured application/vnd.gremlin-v1.0+gryo with org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0
jce-janusgraph   | 6026 [main] WARN  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - The org.apache.tinkerpop.gremlin.driver.ser.GryoLiteMessageSerializerV1d0 serialization class is deprecated.
jce-janusgraph   | 6027 [main] INFO  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Configured application/vnd.gremlin-v1.0+gryo-lite with org.apache.tinkerpop.gremlin.driver.ser.GryoLiteMessageSerializerV1d0
jce-janusgraph   | 6027 [main] WARN  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - The org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0 serialization class is deprecated.
jce-janusgraph   | 6027 [main] INFO  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Configured application/vnd.gremlin-v1.0+gryo-stringd with org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0
jce-janusgraph   | 6027 [main] WARN  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - The org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV2d0 serialization class is deprecated.
jce-janusgraph   | 6031 [main] INFO  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Configured application/vnd.gremlin-v2.0+json with org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV2d0
jce-janusgraph   | 6031 [main] INFO  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - application/json already has org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV3d0 configured - it will not be replaced by org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV2d0, change order of serialization configuration if this is not desired.
jce-janusgraph   | 6035 [main] INFO  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Configured application/vnd.gremlin-v1.0+json with org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV1d0
jce-janusgraph   | 6036 [main] INFO  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - application/json already has org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV3d0 configured - it will not be replaced by org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0, change order of serialization configuration if this is not desired.
jce-janusgraph   | 6036 [main] INFO  org.janusgraph.graphdb.tinkerpop.gremlin.server.auth.JanusGraphAbstractAuthenticator  - Initializing authentication with the org.janusgraph.graphdb.tinkerpop.gremlin.server.auth.JanusGraphSimpleAuthenticator
jce-janusgraph   | 6037 [main] WARN  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Need to set configuration value: root.storage.backend
jce-janusgraph   | 6038 [main] ERROR org.apache.tinkerpop.gremlin.server.GremlinServer  - Gremlin Server Error
jce-janusgraph   | java.lang.IllegalStateException: Could not create/configure Authenticator null
jce-janusgraph   |      at org.apache.tinkerpop.gremlin.server.AbstractChannelizer.createAuthenticator(AbstractChannelizer.java:206)
jce-janusgraph   |      at org.apache.tinkerpop.gremlin.server.AbstractChannelizer.init(AbstractChannelizer.java:152)
jce-janusgraph   |      at org.apache.tinkerpop.gremlin.server.channel.WebSocketChannelizer.init(WebSocketChannelizer.java:62)
jce-janusgraph   |      at org.apache.tinkerpop.gremlin.server.GremlinServer.start(GremlinServer.java:162)
jce-janusgraph   |      at org.apache.tinkerpop.gremlin.server.GremlinServer.main(GremlinServer.java:346)
jce-janusgraph   | Caused by: java.lang.IllegalStateException: Need to set configuration value: root.storage.backend
jce-janusgraph   |      at com.google.common.base.Preconditions.checkState(Preconditions.java:197)
jce-janusgraph   |      at org.janusgraph.diskstorage.configuration.ConfigOption.get(ConfigOption.java:229)
jce-janusgraph   |      at org.janusgraph.diskstorage.configuration.BasicConfiguration.get(BasicConfiguration.java:69)
jce-janusgraph   |      at org.janusgraph.diskstorage.configuration.Configuration.get(Configuration.java:35)
jce-janusgraph   |      at org.janusgraph.diskstorage.Backend.getStorageManager(Backend.java:411)
jce-janusgraph   |      at org.janusgraph.graphdb.configuration.builder.GraphDatabaseConfigurationBuilder.build(GraphDatabaseConfigurationBuilder.java:50)
jce-janusgraph   |      at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:161)
jce-janusgraph   |      at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:132)
jce-janusgraph   |      at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:79)
jce-janusgraph   |      at org.janusgraph.graphdb.tinkerpop.gremlin.server.auth.JanusGraphAbstractAuthenticator.openGraph(JanusGraphAbstractAuthenticator.java:77)
jce-janusgraph   |      at org.janusgraph.graphdb.tinkerpop.gremlin.server.auth.JanusGraphAbstractAuthenticator.setup(JanusGraphAbstractAuthenticator.java:94)
jce-janusgraph   |      at org.janusgraph.graphdb.tinkerpop.gremlin.server.auth.JanusGraphSimpleAuthenticator.setup(JanusGraphSimpleAuthenticator.java:37)
jce-janusgraph   |      at org.apache.tinkerpop.gremlin.server.AbstractChannelizer.createAuthenticator(AbstractChannelizer.java:202)
jce-janusgraph   |      ... 4 more
jce-janusgraph   | 6039 [main] ERROR org.apache.tinkerpop.gremlin.server.GremlinServer  - Gremlin Server was unable to start and will now begin shutdown: Could not create/configure Authenticator null
jce-janusgraph   | 6040 [main] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - Shutting down OpProcessor[]
jce-janusgraph   | 6040 [main] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - Shutting down OpProcessor[session]
jce-janusgraph   | 6040 [main] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - Shutting down OpProcessor[traversal]
jce-janusgraph   | 6040 [main] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - Shutting down thread pools.
jce-janusgraph   | 6042 [gremlin-server-stop] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - Executing shutdown LifeCycleHook
jce-janusgraph   | 6042 [gremlin-server-stop] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - Executed once at shutdown of Gremlin Server.
jce-janusgraph   | 10069 [gremlin-server-stop] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - Closed Graph instance [graph]
jce-janusgraph   | 10072 [gremlin-server-stop] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - Gremlin Server - shutdown complete

ARM64 Image

I would like to run a development environment with Janusgraph, Solr and Cassandra on my Raspberry Pies. Solr and Cassandra both provide ARM64 compatible images on Docker Hub.

Sadly Janusgraph only provides AMD images.

It would be nice if Janusgraph had also compatible images.

Thank you for your feedback.

Switch to Docker Hub automated builds

We currently deploy the images automatically to Docker Hub via Travis CI. This has the disadvantage that we cannot include the README.md as the description there. I opted to instead include a minimal version of the README there and then link to the README for a more detailed description. This means that we need to maintain two versions of those docs.

We could switch to automated builds via Docker Hub which would allow us to just use the README as the description.

Unable to access /var/lib/janusgraph permission denied

Janus container version: 0.5.3.
I am using Kubernetes yaml file to configure pre populated database files.
In order to do so, I run the following:

mkdir /var/lib/janusgraph/data
mkdir /var/lib/janusgraph/index
tar -xzf /mnt/kb-data/janusgraph-be.tar.gz -C /var/lib/janusgraph

but container is failing with error that I do not have permission for /var/lib/janusgraph folder
This code used to work before, but I know that permission handling was changed, and I guess this is the result.

I see in your dockerfile that you set:
useradd -r -g janusgraph --uid=999 -d ${JANUS_DATA_DIR} janusgraph && \
and also
chown -R janusgraph:janusgraph ${JANUS_HOME} ${JANUS_INITDB_DIR} ${JANUS_CONFIG_DIR} ${JANUS_DATA_DIR}
so I wonder why I can't access this folder.

Note: I do have access to /opt/janusgraph/ but not /var/lib/janusgraph

here is my some parts of the kubernetes yaml:

apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: janusgraph-test2
  labels:
    app: janusgraph-test2
spec:
  serviceName: janusgraph-service-test2
  replicas: 1
  selector:
    matchLabels:
      app: janusgraph-test2
  template:
    metadata:
      labels:
        app: janusgraph-test2
    spec:
      containers:
        - name: janusgraph-test2
          image: janusgraph/janusgraph:0.5.3
          env:
          - name: JAVA_OPTIONS
            value: "-javaagent:/var/lib/janusgraph/jmx_prometheus_javaagent-0.13.0.jar=8090:/var/lib/janusgraph/config.yml"
          - name: janusgraph.query.force-index
            value: "true"
          - name: janusgraph.storage.read-only
            value: "true"
          - name: janusgraph.storage.berkeleyje.lock-mode
            value: "LockMode.READ_UNCOMMITTED"
          - name: gremlinserver.channelizer
            value: "org.apache.tinkerpop.gremlin.server.channel.WsAndHttpChannelizer"
          - name: gremlinserver.maxContentLength
            value: "1048576"
          - name: gremlinserver.writeBufferHighWaterMark
            value: "1048576"
          - name: janusgraph.storage.berkeleyje.cache-percentage
            value: "80"
          - name: janusgraph.cache.db-cache
            value: "true"
          - name: janusgraph.cache.db-cache-clean-wait
            value: "10000"
          - name: janusgraph.graph.replace-instance-if-exists
            value: "true"

          command: 
          - /bin/bash 
          - "-c" 
          - |
            set -ex
            if [[ ! -d /var/lib/janusgraph/data ]]; then
                mkdir /var/lib/janusgraph/data
                mkdir /var/lib/janusgraph/index
                tar -xzf /mnt/kb-data/janusgraph-be.tar.gz -C /var/lib/janusgraph
                cp /mnt/kb-data/jmx_prometheus_javaagent-0.13.0.jar /var/lib/janusgraph
                cp /mnt/kb-data/config.yml /var/lib/janusgraph
                echo "KB-Data populated $(date)"
            fi 
            sed -i 's/consoleReporter: {enabled: true/consoleReporter: {enabled: false/' /opt/janusgraph/conf/gremlin-server/gremlin-server.yaml
            sed -i 's/csvReporter: {enabled: true/csvReporter: {enabled: false/' /opt/janusgraph/conf/gremlin-server/gremlin-server.yaml
            sed -i 's/slf4jReporter: {enabled: true/slf4jReporter: {enabled: false/' /opt/janusgraph/conf/gremlin-server/gremlin-server.yaml
            sed -i 's/jmxReporter: {enabled: false/jmxReporter: {enabled: true/' /opt/janusgraph/conf/gremlin-server/gremlin-server.yaml
            grep -qxF 'graph.replace-instance-if-exists=true' /opt/janusgraph/conf/janusgraph-inmemory.properties || echo 'graph.replace-instance-if-exists=true' >> /opt/janusgraph/conf/janusgraph-inmemory.properties
            docker-entrypoint.sh janusgraph

Disk space requirements and check

Recently when running

docker run -it -p 8182:8182 janusgraph/janusgraph

on an Ubuntu 18.04 LTS machine i got th error message:

cp: error writing '/etc/opt/janusgraph/janusgraph.properties': No space left on device
cp: error writing '/etc/opt/janusgraph/gremlin-server.yaml': No space left on device
/usr/local/bin/docker-entrypoint.sh: line 59: echo: write error: No space left on device
/usr/local/bin/docker-entrypoint.sh: line 59: echo: write error: No space left on device
/usr/local/bin/docker-entrypoint.sh: line 59: echo: write error: No space left on device
/usr/local/bin/docker-entrypoint.sh: line 59: echo: write error: No space left on device
/usr/local/bin/docker-entrypoint.sh: line 59: echo: write error: No space left on device
/usr/local/bin/docker-entrypoint.sh: line 74: echo: write error: No space left on device
waiting for storage...

The reason was that the docker server environment was out of disk space.
It would be an improvement if there would be a hint on how much disk space is needed and a rudimentary check if a minimal amount of disk space is still available before proceesing.

Container is not terminated on failure of docker-entrypoint-initdb.d groovy scripts

I've written graph initialisation groovy script and mounted to docker-entrypoint-initdb.d. I'm expecting that the container will terminate if the script throws any exception.

Since I'm using kubernetes, if the script fails with some connection error and the container is not terminated, kubernetes will not try to restart it.

Is it the default behaviour of this image or do I need to configure something so that the container is terminated if initialisation script fails

How to change docker-compose-cql-es.yml to use remote es server?

Hi guys,
I only change the hostname value from dockerName to ipAddress in docker-compose-cql-es.yml , then I got the error: No such property: graph for class: Script2.
origin:
janusgraph.storage.hostname: jce-cassandra
janusgraph.index.search.hostname: jce-elastic
After Change:
janusgraph.storage.hostname: 127.0.0.1:9042
janusgraph.index.search.hostname: 127.0.0.1:9200

Could someone help me out please?

Cannot call REST API of JanusGraph from Host (PostMan)

hi All,

I have up and ran the JanusGraph with Docker Compose (Cassandra + ElasticSearch) via docker-compose-cql-es.yml. The Gremlin server works well if I connect directly from inside the docker container via command:

docker exec -it jce-janusgraph ./bin/gremlin.sh
gremlin> :remote connect tinkerpop.server conf/remote.yaml

However, it doesn't work when I tried with Postman on my host machine with the request url
POST http://localhost:8182

Please give me the advise how to fix it, which configuration I'm missing. Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.