升级Greemlin会断开连接 [英] Upgrading gremlin breaks connection

查看:150
本文介绍了升级Greemlin会断开连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

With gremlin javascript version 3.2.10 the following function connects to my Neptune cluster correctly:

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 它会引发以下错误:

If I upgrade to version ^3.4.0 it throws the following error:


错误:TypeError:无法读取未定义的属性'reader'

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

这在NodeJS 8.10 的Lambda函数中运行。该文档似乎并未指示该版本中有任何新内容,AWS也未指定与Neptune的兼容性问题。我是否配置错误?

This is running in a Lambda function on NodeJS 8.10. The docs don't seem to indicate anything new in this version, nor does AWS specify a compatibility issue with Neptune. Do I have this misconfigured?

编辑:添加堆栈跟踪

{
  "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)"
  ]
}


推荐答案

此补丁最近已被接受,并且根据此问题报告

A patch was accepted for this recently and should land in 3.3.6 and 3.4.1 soon according to this issue report.

这篇关于升级Greemlin会断开连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆