英文:
JanusGraph 1.0.0, gremlin console getting serializer error
问题
我已经在CentOS 7上配置了新的JanusGraph janusgraph-full-1.0.0-rc1,使用janusgraph-cql-es。但是当我使用apache-tinkerpop-gremlin-console-3.4.8/bin/gremlin.sh连接时,它抛出以下异常:
在远程控制台之后:
> g.V();
WARN org.apache.tinkerpop.gremlin.driver.MessageSerializer - Response [PooledUnsafeDirectByteBuf(ridx: 57, widx: 57, cap: 57)] could not be deserialized by org.apache.tinkerpop.gremlin.driver.ser.AbstractGryoMessageSerializerV3d0.
java.lang.IndexOutOfBoundsException: Index 127 out of bounds for length 0
at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)
at java.base/java.util.Objects.checkIndex(Objects.java:372)
at java.base/java.util.ArrayList.get(ArrayList.java:459)
at org.apache.tinkerpop.shaded.kryo.util.MapReferenceResolver.getReadObject(MapReferenceResolver.java:60)
at org.apache.tinkerpop.shaded.kryo.Kryo.readReferenceOrNull(Kryo.java:834)
at org.apache.tinkerpop.shaded.kryo.Kryo.readObject(Kryo.java:684)
at org.apache.tinkerpop.gremlin.driver.ser.AbstractGryoMessageSerializerV3d0.deserializeResponse(AbstractGryoMessageSerializerV3d0.java:157)
而且它还在服务器上抛出错误:
08:40:45 WARN org.apache.tinkerpop.gremlin.server.handler.WsGremlinBinaryRequestDecoder.select - Gremlin Server is not configured with a serializer for the requested mime type [application/vnd.gremlin-v3.0+gryo-stringd] - using org.apache.tinkerpop.gremlin.driver.ser.GraphBinaryMessageSerializerV1 by default
08:40:45 WARN org.apache.tinkerpop.gremlin.server.handler.WsGremlinBinaryRequestDecoder.decode - Serialization error while decoding request
org.apache.tinkerpop.gremlin.driver.ser.SerializationException: The most significant bit should be set according to the format
at org.apache.tinkerpop.gremlin.driver.ser.binary.RequestMessageSerializer.readValue(RequestMessageSerializer.java:45) ~[gremlin-driver-3.6.1.jar:3.6.1]
at org.apache.tinkerpop.gremlin.driver.ser.GraphBinaryMessageSerializerV1.deserializeRequest(GraphBinaryMessageSerializerV1.java:175) ~[gremlin-driver-3.6.1.jar:3.6.1]
at org.apache.tinkerpop.gremlin.server.handler.WsGremlinBinaryRequestDecoder.decode(WsGremlinBinaryRequestDecoder.java:77) ~[gremlin-server-3.6.1.jar:3.6.1]
需要指导如何正确配置,以便JanusGraph正常工作并能够使用Gremlin控制台访问数据。谢谢。
英文:
I have configured New JanusGraph janusgraph-full-1.0.0-rc1 on centos 7 with janusgraph-cql-es.
But when i am connecting using apache-tinkerpop-gremlin-console-3.4.8/bin/gremlin.sh
it is throwing following exception :
after remote console
> g.V();
WARN org.apache.tinkerpop.gremlin.driver.MessageSerializer - Response [PooledUnsafeDirectByteBuf(ridx: 57, widx: 57, cap: 57)] could not be deserialized by org.apache.tinkerpop.gremlin.driver.ser.AbstractGryoMessageSerializerV3d0.
java.lang.IndexOutOfBoundsException: Index 127 out of bounds for length 0
at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)
at java.base/java.util.Objects.checkIndex(Objects.java:372)
at java.base/java.util.ArrayList.get(ArrayList.java:459)
at org.apache.tinkerpop.shaded.kryo.util.MapReferenceResolver.getReadObject(MapReferenceResolver.java:60)
at org.apache.tinkerpop.shaded.kryo.Kryo.readReferenceOrNull(Kryo.java:834)
at org.apache.tinkerpop.shaded.kryo.Kryo.readObject(Kryo.java:684)
at org.apache.tinkerpop.gremlin.driver.ser.AbstractGryoMessageSerializerV3d0.deserializeResponse(AbstractGryoMessageSerializerV3d0.java:157)
And its also throwing error on server
08:40:45 WARN org.apache.tinkerpop.gremlin.server.handler.WsGremlinBinaryRequestDecoder.select - Gremlin Server is not configured with a serializer for the requested mime type [application/vnd.gremlin-v3.0+gryo-stringd] - using org.apache.tinkerpop.gremlin.driver.ser.GraphBinaryMessageSerializerV1 by default
08:40:45 WARN org.apache.tinkerpop.gremlin.server.handler.WsGremlinBinaryRequestDecoder.decode - Serialization error while decoding request
org.apache.tinkerpop.gremlin.driver.ser.SerializationException: The most significant bit should be set according to the format
at org.apache.tinkerpop.gremlin.driver.ser.binary.RequestMessageSerializer.readValue(RequestMessageSerializer.java:45) ~[gremlin-driver-3.6.1.jar:3.6.1]
at org.apache.tinkerpop.gremlin.driver.ser.GraphBinaryMessageSerializerV1.deserializeRequest(GraphBinaryMessageSerializerV1.java:175) ~[gremlin-driver-3.6.1.jar:3.6.1]
at org.apache.tinkerpop.gremlin.server.handler.WsGremlinBinaryRequestDecoder.decode(WsGremlinBinaryRequestDecoder.java:77) ~[gremlin-server-3.6.1.jar:3.6.1]
Need guidance on what is correct config that needs to be done, so that janusgraph works properly and i am able to access data using gremlin console.
Thanks.
答案1
得分: 2
不是每个JanusGraph版本都与每个TinkerPop版本兼容。JanusGraph文档包含一个“版本兼容矩阵”,显示与特定JanusGraph版本兼容的其他项目的版本。对于JanusGraph 1.0,兼容的TinkerPop版本是3.6.z。这已经解释了为什么在版本3.4.8中使用Gremlin Console时会遇到问题。如果您想使用JanusGraph 1.0,请使用3.6.z版本的Gremlin Console。
这两个版本之间的具体问题是您在Gremlin Console 3.4.8中使用的Gryo MessageSerializer在JanusGraph 1.0中已不再受支持。然而,当您使用Gremlin Console 3.6时,这个问题应该消失,因为它也不再使用Gryo作为消息序列化程序。
另请注意,JanusGraph 1.0.0-rc1是即将发布的1.0.0版本的候选版本。这意味着此版本不适用于生产使用,只用于尝试即将发布的版本。当然,您仍然可以根据自己的需要使用它,但应预期会有一些问题。
英文:
Not every JanusGraph version is compatible with every TinkerPop version. The JanusGraph documentation contains a Version Compatibility Matrix which shows the versions of other projects that are compatible with a given JanusGraph version. For JanusGraph 1.0, the compatible TinkerPop versions are 3.6.z. This already explains why you are having problems with Gremlin Console in version 3.4.8. Please use a 3.6.z version of Gremlin Console if you want to use JanusGraph 1.0.
Your concrete problem between these two versions is that the Gryo MessageSerializer that you are using with Gremlin Console 3.4.8 is not supported any more in JanusGraph 1.0. This problem should however go away when you use Gremlin Console 3.6 as that also does not use Gryo any more as a message serializer.
Also note that JanusGraph 1.0.0-rc1 is a release candidate for the upcoming 1.0.0 release. This means that this version is not meant to be used in production, but only to try out the upcoming release. You can of course still use it as you like, but you should expect some rough edges.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论