Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gremlin Console for winsows error "The most significant bit.."

Seems like Gremlin Console not working for Windows: I downloaded the latest Gremlin console and run the bin\gremlin.bat file. seems like after connecting (as in the below commands) and running a simple remote command (g.V(123).count()) I'm getting an error:

The most significant bit should be set according to the format

This is the commands I run:

PS C:\Users\L836423\Downloads\apache-tinkerpop-gremlin-console-3.4.7-bin\apache-tinkerpop-gremlin-console-3.4.7\bin> .\gremlin.bat

         \,,,/
         (o o)
-----oOOo-(3)-oOOo-----
plugin activated: tinkerpop.server
plugin activated: tinkerpop.utilities
plugin activated: tinkerpop.tinkergraph
gremlin> :remote connect tinkerpop.server conf/remote.yaml
log4j:WARN No appenders could be found for logger (com.jcabi.manifests.Manifests).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
==>Configured my_gremlin_dns.com/55.222.88.111:8182
gremlin> :remote console
==>All scripts will now be sent to Gremlin Server - [my_gremlin_dns.com/55.222.88.111:8182] - type ':remote console' to return to local mode
gremlin> g.V(123).count()
The most significant bit should be set according to the format
Type ':help' or ':h' for help.
Display stack trace? [yN]
gremlin>
like image 306
toto Avatar asked Aug 04 '20 15:08

toto


People also ask

How important is the Gremlin console to new users?

It cannot be emphasized enough just how important the Gremlin Console is to new users. The interactive nature of a REPL makes it possible to quickly try some Gremlin code and get some notion of success or failure without the longer process of build tools (e.g. Maven ), IDEs , compilation, and application execution.

How do I fix a gremlin that fails to execute?

You copy your Gremlin code from the IDE and execute it in the console and confirm the failure: Note that next () is removed here. The Gremlin Console automatically tries to iterate all results from a line of execution. In the above case, that line returns a Traversal.

How to start Gremlin console with Groovy initialization script?

Following the use case, it would be nice if the initialization script contained the import statement for the driver and possibly the code to get the Session object ready for use. Start the Gremlin Console with that script by just adding it as an argument on the command line: bin/gremlin.sh -i init.groovy .

How do I debug my Gremlin code?

As you have the Gremlin Console open you decide to debug the problem there. You copy your Gremlin code from the IDE and execute it in the console and confirm the failure: Note that next () is removed here. The Gremlin Console automatically tries to iterate all results from a line of execution. In the above case, that line returns a Traversal.


Video Answer


1 Answers

This happens when the server you are connecting to does not support the string serialization of Graph Binary used by newer versions of TinkerPop. You will need to use an older client. Find out what level the server supports and use the corresponding Gremlin Client version.

Specifically, the change went into the Gremlin Client as part of the 3.4.3 release. Your server needs to be at least at that version to use a Gremlin Client >= 3.4.3

With 3.4.3 the default serializer for the Gremlin Client was changed to be GraphBinary. It is possible you could also edit the settings in the YAML file read by the client to use a different serializer.

like image 181
Kelvin Lawrence Avatar answered Sep 18 '22 14:09

Kelvin Lawrence