问题
I have my Titan 1.0.0 and cassandra 2.1.2 setup running fine in my linux. When i start my gremlin using,
./gremlin.sh ../conf/gremlin-server/gremlin-server-cassandra-es.yaml
I get the following error:
\,,,/
(o o)
-----oOOo-(3)-oOOo-----
plugin activated: aurelius.titan
plugin activated: tinkerpop.server
plugin activated: tinkerpop.utilities
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/ec2-user/titan/titan-1.0.0- hadoop1/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/ec2-user/titan/titan-1.0.0-hadoop1/lib/logback-classic-1.1.2.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]
log4j:WARN No appenders could be found for logger (org.apache.hadoop.security.Groups).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
plugin activated: tinkerpop.hadoop
plugin activated: tinkerpop.tinkergraph
==>10.253.11.125
==>8182
==>1
==>8
==>30000
==>30000
Exception in thread "main" groovy.lang.MissingPropertyException: No such property: com for class: groovysh_evaluate
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:51)
at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:49)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:304)
at groovysh_evaluate.run(groovysh_evaluate:3)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at org.codehaus.groovy.tools.shell.Interpreter.evaluate(Interpreter.groovy:69)
at org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:185)
at org.apache.tinkerpop.gremlin.console.Console.initializeShellWithScript(Console.groovy:290)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at org.apache.tinkerpop.gremlin.console.Console.<init>(Console.groovy:141)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at org.apache.tinkerpop.gremlin.console.Console.main(Console.groovy:303)
When i use,
./gremlin.sh
It runs but shows me with some error.
\,,,/
(o o)
-----oOOo-(3)-oOOo-----
plugin activated: aurelius.titan
plugin activated: tinkerpop.server
plugin activated: tinkerpop.utilities
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/ec2-user/titan/titan-1.0.0-hadoop1/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/ec2-user/titan/titan-1.0.0-hadoop1/lib/logback-classic-1.1.2.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]
log4j:WARN No appenders could be found for logger (org.apache.hadoop.security.Groups).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
plugin activated: tinkerpop.hadoop
plugin activated: tinkerpop.tinkergraph
gremlin>
I want it to be connected to cassandra, so i want the first command to be working. I don't understand the issue there.
回答1:
You're starting the Gremlin console and telling it to load and execute the content of a .yaml
file, which won't work since it's not a Groovy file. Running with ./gremlin.sh
should do the trick, however...
... you appear to be starting Titan and the Gremlin console from the ./bin
folder rather than the Titan root ./
folder. Go to Titan root folder and try starting both Titan and the Console with the following commands:
bin/titan.sh start
bin/gremlin.sh
If you didn't change any configuration file, this should work out of the box with the default Titan v1.0.0 install. To troubleshoot more, start Titan in verbose mode with:
bin/titan.sh start -v
To follow-up on your comment, it looks like you're getting started with Titan (and TinkerPop) and mixing some of the core concepts of each. You're currently trying to configure quite an advanced setup. I would recommend getting familiar with TinkerPop and TinkerGraph first (in-memory graph). Once you're comfortable with this, you can experiment with Titan, first with a single machine setup with Cassandra embedded (default setup), then with a remote Cassandra setup (what you're trying to achieve).
回答2:
If I understand you correctly, you try to start Gremlin server with Cassandra as storage backend(?) In this case try
$ path/to/gremlin-server.sh path/to/your/gremlin-server-cassandra-es.yaml
In another terminal you start the Gremlin client using
$ path/to/your/gremlin.sh
Then you can connect to the gremlin server:
gremlin> :remote connect tinkerpop.server path/to/gremlin/conf/remote.yaml
As jbmusso already stated, in your first example you start the Gremlin client and pass it the config of the Gremlin server.
来源:https://stackoverflow.com/questions/37453145/gremlin-doesnt-start-up-while-connecting-to-cassandra