gremlin - 升级 gremlin 会断开连接

标签 gremlin amazon-neptune

gremlin javascript 3.2.10 版本以下函数正确连接到我的 Neptune 集群:

export const initGremlinClient = () => {
  try {
    const dc = new DriverRemoteConnection(
      `ws://${process.env.NEPTUNE_ENDPOINT_URI}:${
        process.env.NEPTUNE_ENDPOINT_PORT
      }/gremlin`
    );
    const graph = new Graph();
    return {
      g: graph.traversal().withRemote(dc),
      closeGremlinConnection: () => dc.close()
    };
  } catch (error) {
    console.log("[GREMLIN INIT ERROR]", error);
    throw new Error(error);
  }
};

如果我升级到版本^3.4.0,它会抛出以下错误:

"Error: TypeError: Cannot read property 'reader' of undefined"

它在 NodeJS 8.10 上的 Lambda 函数中运行。这些文档似乎没有表明此版本中有任何新内容,AWS 也没有指定与 Neptune 的兼容性问题。我是否配置错误?

编辑:添加堆栈跟踪

{
  "errorMessage": "Cannot read property 'reader' of undefined",
  "errorType": "TypeError",
  "stackTrace": [
    "new Connection (/var/task/gremlinTest/node_modules/gremlin/lib/driver/connection.js:77:28)",
    "new Client (/var/task/gremlinTest/node_modules/gremlin/lib/driver/client.js:46:24)",
    "new DriverRemoteConnection (/var/task/gremlinTest/node_modules/gremlin/lib/driver/driver-remote-connection.js:53:20)",
    "exports.handler (/var/task/gremlinTest/index.js:6:14)"
  ]
}

最佳答案

最近为此接受了一个补丁,根据此 issue report 应该很快就会登陆 3.3.6 和 3.4.1 .

关于gremlin - 升级 gremlin 会断开连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54220750/

相关文章:

spring-boot - 未找到自定义类型 'janusgraph.RelationIdentifier' 的序列化器

rdf - RDF 可以对具有边缘属性的标记属性图进行建模吗?

orientdb - Gremlin:获取不具有某些属性字段的顶点列表

gremlin - 在graphdb中减去多个日期范围

amazon-neptune - Neptune 笔记本启动失败

java - Tinkerpop 遍历字符串

gremlin - 如何使用 Gremlin 删除/更新 AWS Neptune 中的属性值?

gremlin - 如何将自定义 DSL 添加到 Gremlin 控制台

graph-databases - 如何在一次查询中遍历回 gremlin 中的根顶点

gremlin - 当 Gremlin 查询发现无效状态时,是否有更好的方法强制其失败?