Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gremlin.bat and gremlin-server.bat issues in titan-1.0.0 #1242

Open
pluradj opened this issue Jan 14, 2016 · 6 comments
Open

gremlin.bat and gremlin-server.bat issues in titan-1.0.0 #1242

pluradj opened this issue Jan 14, 2016 · 6 comments

Comments

@pluradj
Copy link
Contributor

pluradj commented Jan 14, 2016

An old thread, but still relevant in titan10 and titan11 branches:
https://groups.google.com/d/msg/aureliusgraphs/tZ0XhwJY9jQ/R-jboJBWAgAJ

More recently
http://stackoverflow.com/questions/34793406/activate-tinkerpop-plugins-for-titan

If you unzip titan-1.0.0-hadoop1.zip on Windows, you'll see errors out of the box.

C:\titan-1.0.0-hadoop1>bin\gremlin.bat
Error opening zip file or JAR manifest missing : ..\lib\jamm-0.3.0.jar
Error occurred during initialization of VM
agent library failed to init: instrument

C:\titan-1.0.0-hadoop1\bin>gremlin.bat
The input line is too long.
The syntax of the command is incorrect.

I think the fix is to get the gremlin*.bat files better aligned with the latest from TinkerPop3. There are some additional Titan-specific changes required for the jamm-0.3.0.jar and the slf4j/logback conflict.

For the gremlin-server

C:\titan-1.0.0-hadoop1>bin\gremlin-server.bat
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/titan-1.0.0-hadoop1/lib/logback-classic-1.1.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/titan-1.0.0-hadoop1/lib/slf4j-log4j12-1.7.5.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 [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
16:19:38.362 [main] DEBUG i.n.u.i.l.InternalLoggerFactory - Using SLF4J as the default logging framework
16:19:38.378 [main] INFO  o.a.t.gremlin.server.GremlinServer -
         \,,,/
         (o o)
-----oOOo-(3)-oOOo-----

16:19:38.378 [main] ERROR o.a.t.gremlin.server.GremlinServer - Configuration file at conf/gremlin-server.yaml could not be found or parsed properly. [conf\gremlin-server.yaml (The system cannot find the file specified)]

This is looking in the wrong location by default. In the titan zip, the file is located at conf/gremlin-server/gremlin-server.yaml.

C:\titan-1.0.0-hadoop1>bin\gremlin-server.bat conf\gremlin-server\gremlin-server.yaml
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/titan-1.0.0-hadoop1/lib/logback-classic-1.1.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/titan-1.0.0-hadoop1/lib/slf4j-log4j12-1.7.5.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 [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
16:20:34.212 [main] DEBUG i.n.u.i.l.InternalLoggerFactory - Using SLF4J as the default logging framework
16:20:34.227 [main] INFO  o.a.t.gremlin.server.GremlinServer -
         \,,,/
         (o o)
-----oOOo-(3)-oOOo-----

16:20:34.337 [main] INFO  o.a.t.gremlin.server.GremlinServer - Configuring Gremlin Server from conf\gremlin-server\gremlin-server.yaml
16:20:34.399 [main] INFO  o.a.t.g.server.util.MetricManager - Configured Metrics ConsoleReporter configured with report interval=180000ms
16:20:34.399 [main] INFO  o.a.t.g.server.util.MetricManager - Configured Metrics CsvReporter configured with report interval=180000ms to fileName=/tmp/gremlin-server-metrics.csv
16:20:34.446 [main] INFO  o.a.t.g.server.util.MetricManager - Configured Metrics JmxReporter configured with domain= and agentId=
16:20:34.461 [main] INFO  o.a.t.g.server.util.MetricManager - Configured Metrics Slf4jReporter configured with interval=180000ms and loggerName=org.apache.tinkerpop.gremlin.server.Settings$Slf4jReporterMetrics
16:20:34.461 [main] DEBUG i.n.c.MultithreadEventLoopGroup - -Dio.netty.eventLoopThreads: 16
16:20:34.477 [main] DEBUG i.n.util.internal.PlatformDependent0 - java.nio.Buffer.address: available
16:20:34.477 [main] DEBUG i.n.util.internal.PlatformDependent0 - sun.misc.Unsafe.theUnsafe: available
16:20:34.477 [main] DEBUG i.n.util.internal.PlatformDependent0 - sun.misc.Unsafe.copyMemory: available
16:20:34.477 [main] DEBUG i.n.util.internal.PlatformDependent0 - java.nio.Bits.unaligned: true
16:20:34.477 [main] DEBUG i.n.util.internal.PlatformDependent - Platform: Windows

<snip>

16:20:36.957 [gremlin-server-boss-1] INFO  o.a.t.gremlin.server.GremlinServer - Gremlin Server configured with worker thread pool of 1, gremlin pool of 8 and boss thread pool of 1.
16:20:36.957 [gremlin-server-boss-1] INFO  o.a.t.gremlin.server.GremlinServer - Channel started at port 8182.

So this actually starts, but the logging here is incredibly noisy because the logback binding is getting loaded on the classpath before the slf4j binding. It seems that the preferred way in Titan is to put slf4j before logback, but Effy offered another workaround to put a logback.xml in $TITAN_HOME:

<configuration>
  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
    <!-- encoders are assigned the type
         ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
    <encoder>
      <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
    </encoder>
  </appender>
  <root level="info">
    <appender-ref ref="STDOUT" />
  </root>
</configuration>

I will have a pull request coming for this. Testing is still in progress, but you can look find it at https://github.com/pluradj/titan/tree/titan11-windows-bat

@mckenzig
Copy link

Hi - this resolved the gremlin.bat "The input line is too long." issue for me. Thanks,

@spmallette
Copy link
Member

@pluradj do you still have a PR coming for this?

@technotrance
Copy link

This is solely my own repository

@pluradj
Copy link
Contributor Author

pluradj commented Feb 10, 2016

@spmallette yeah, finally dusted off the Win machine again for TP3 voting. I'll get the PR submitted based off the branch linked above.

@spmallette
Copy link
Member

cool - i'd really like to get a titan release put together soon. the delay has been good in some sense, but there have been a lot of bug fixes on the TP side that titan should support at this point

@sheymann
Copy link

Any news about a fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants