I'd suggest you remove the Gremlin Server from the picture just to start, so go ahead and shut it down. If you were using the pre-packaged JanusGraph server (which spins up C*, ES, and Gremlin Server), shut that down too.
Using JanusGraph with Berkeley and Lucene is really easy to use with the Gremlin Console. They store data locally on the file system. If you look in the conf/janusgraph-berkeleyje-lucene.properties file, you'll see the specific file directories. Since you've had a few false starts, you'd probably be best off recursively deleting those directories so you can start from scratch.
$ bin/gremlin.sh
\,,,/
(o o)
-----oOOo-(3)-oOOo-----
gremlin> graph = JanusGraphFactory.open('conf/janusgraph-berkeleyje-lucene.properties')
==>standardjanusgraph[berkeleyje:/opt/janusgraph-0.2.0-hadoop2/conf/../db/berkeley]
gremlin> g = graph.traversal()
==>graphtraversalsource[standardjanusgraph[berkeleyje:/opt/janusgraph-0.2.0-hadoop2/conf/../db/berkeley], standard]
gremlin> :q
$ ls -R db
berkeley searchindex
db/berkeley:
00000000.jdb je.config.csv je.info.0 je.lck je.stat.csv
db/searchindex:
That's it. You are all set to go at this point. You can see the directories/files that were created by your storage/indexing backends. If you want to start from scratch again, just remove those files and directories.
Next, like Robert mentioned before, BerkeleyJE doesn't allow multiple connections to it. For example, you can't have 2 different Gremlin Console sessions connecting to the same db using the method above. This is one situation where you might want to introduce the Gremlin Server. When you do this, the Gremlin Server has to be the one that connects to BerkeleyJE. So if you are currently connected via the Gremlin Console, close that down first.
I'm going to walk through what I think you did, then fix it as we go. So first you updated the conf/gremlin-server/gremlin-server.yaml so that it uses BerkeleyJE/Lucene instead of C*/ES.
graphs: {
graph: conf/janusgraph-berkeleyje-lucene.properties
}
Start the Gremlin Server which uses conf/gremlin-server/gremlin-server.yaml by default:
$ bin/gremlin-server.sh
0 [main] INFO org.apache.tinkerpop.gremlin.server.GremlinServer -
\,,,/
(o o)
-----oOOo-(3)-oOOo-----
100 [main] INFO org.apache.tinkerpop.gremlin.server.GremlinServer - Configuring Gremlin Server from conf/gremlin-server/gremlin-server.yaml
162 [main] INFO org.apache.tinkerpop.gremlin.server.util.MetricManager - Configured Metrics ConsoleReporter configured with report interval=180000ms
163 [main] INFO org.apache.tinkerpop.gremlin.server.util.MetricManager - Configured Metrics CsvReporter configured with report interval=180000ms to fileName=/tmp/gremlin-server-metrics.csv
219 [main] INFO org.apache.tinkerpop.gremlin.server.util.MetricManager - Configured Metrics JmxReporter configured with domain= and agentId=
221 [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
326 [main] WARN org.apache.tinkerpop.gremlin.server.GremlinServer - Graph [graph] configured at [conf/janusgraph-berkeleyje-lucene.properties] could not be instantiated and will not be available in Gremlin Server. GraphFactory message: Configuration must contain a valid 'gremlin.graph' setting
java.lang.RuntimeException: Configuration must contain a valid 'gremlin.graph' setting
at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:57)
at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:104)
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:110)
at org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor.<init>(ServerGremlinExecutor.java:89)
at org.apache.tinkerpop.gremlin.server.GremlinServer.<init>(GremlinServer.java:110)
at org.apache.tinkerpop.gremlin.server.GremlinServer.main(GremlinServer.java:354)
327 [main] INFO org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor - Initialized Gremlin thread pool. Threads in pool named with pattern gremlin-*
774 [main] INFO org.apache.tinkerpop.gremlin.groovy.engine.ScriptEngines - Loaded gremlin-groovy ScriptEngine
1301 [main] WARN org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor - Could not initialize gremlin-groovy ScriptEngine with scripts/empty-sample.groovy as script could not be evaluated - javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: graph for class: Script1
1301 [main] INFO org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor - Initialized GremlinExecutor and preparing GremlinScriptEngines instances.
1323 [main] INFO org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor - Initialized gremlin-groovy GremlinScriptEngine and registered metrics
1338 [main] INFO org.apache.tinkerpop.gremlin.server.op.OpLoader - Adding the standard OpProcessor.
1339 [main] INFO org.apache.tinkerpop.gremlin.server.op.OpLoader - Adding the control OpProcessor.
1341 [main] INFO org.apache.tinkerpop.gremlin.server.op.OpLoader - Adding the session OpProcessor.
1499 [main] INFO org.apache.tinkerpop.gremlin.server.op.OpLoader - Adding the traversal OpProcessor.
1505 [main] INFO org.apache.tinkerpop.gremlin.server.op.traversal.TraversalOpProcessor - Initialized cache for TraversalOpProcessor with size 1000 and expiration time of 600000 ms
1576 [main] INFO org.apache.tinkerpop.gremlin.server.AbstractChannelizer - Configured application/vnd.gremlin-v1.0+gryo with org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0
1578 [main] WARN org.apache.tinkerpop.gremlin.server.AbstractChannelizer - The org.apache.tinkerpop.gremlin.driver.ser.GryoLiteMessageSerializerV1d0 serialization class is deprecated.
1578 [main] INFO org.apache.tinkerpop.gremlin.server.AbstractChannelizer - Configured application/vnd.gremlin-v1.0+gryo-lite with org.apache.tinkerpop.gremlin.driver.ser.GryoLiteMessageSerializerV1d0
1578 [main] INFO org.apache.tinkerpop.gremlin.server.AbstractChannelizer - Configured application/vnd.gremlin-v1.0+gryo-stringd with org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0
1585 [main] INFO org.apache.tinkerpop.gremlin.server.AbstractChannelizer - Configured application/vnd.gremlin-v1.0+json with org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV1d0
1597 [main] INFO org.apache.tinkerpop.gremlin.server.AbstractChannelizer - Configured application/vnd.gremlin-v2.0+json with org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV2d0
1597 [main] INFO org.apache.tinkerpop.gremlin.server.AbstractChannelizer - Configured application/json with org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0
1668 [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.
1668 [gremlin-server-boss-1] INFO org.apache.tinkerpop.gremlin.server.GremlinServer - Channel started at port 8182.
That's a lot of output, and if you didn't scroll back to find the error, you might think that the server started with no errors. The error indicates that the properties file is missing a property. Update conf/janusgraph-berkeleyje-lucene.properties with this:
gremlin.graph=org.janusgraph.core.JanusGraphFactory
Restart the Gremlin Server and you'll see the error has gone away. I've included the key parts to look for below:
1309 [main] INFO org.apache.tinkerpop.gremlin.server.GremlinServer - Graph [graph] was successfully configured via [conf/janusgraph-berkeleyje-lucene.properties].
... snip ...
2497 [main] INFO org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor - A GraphTraversalSource is now bound to [g] with graphtraversalsource[standardjanusgraph[berkeleyje:../db/berkeley], standard]
... snip ...
2731 [gremlin-server-boss-1] INFO org.apache.tinkerpop.gremlin.server.GremlinServer - Channel started at port 8182.
You can see that the Gremlin Server was able to create the graph and the graph traversal source 'g'. Now you can connect to the graph running on the Gremlin Server. Keep in mind that you will be doing a remote connection, instead of a direct connecction as we did initially. You don't need to make a direct connection with JanusGraphFactory because the Gremlin Server has already done this for you.