如何将本地 aws graph-explorer 连接到本地 gremlin 服务器?

问题描述 投票:0回答:1

可能涉及到的人,

在探索图形可视化工具时,我偶然发现了一些解决方案,例如neo4j的bloom和aws的graph-explorer(https://github.com/aws/graph-explorer)。 README 文件中指出,如果希望连接到 Neptune,它应该位于数据库实例的同一 VPC 中。不过,据称它也可以在本地环境中运行。 (https://apex974.com/articles/aws-graph-explorer-first-impression)似乎已经实现了与RDF图形数据库的本地连接,我尝试使用gremlin服务器实现相同的结果,但没有有用。我想知道是否可以将本地 aws graph-explorer 连接到本地 gremlin 服务器。

首先,我在 https://tinkerpop.apache.org/download.html 下载了最新的 tikerpop gramlin 服务器。并使用

bin/gremlin-server.sh conf/gremlin-server-rest-modern.yaml
代码运行它,以便与图形浏览器创建未来的 HTTP 连接。

然后,我克隆了 graph-explorer 的 git 存储库,并使用命令构建并运行了 docker 镜像,

docker build --build-arg host=localhost -t graph-explorer .
docker run -p 5173:5173 -p 8182:8182 graph-explorer

但是,我已将容器的 8182 端口更改为 8183,因为它已被 gremlin 服务器使用。在已经运行的 graph-explorer 容器 (localhost:5173) 上,我尝试连接到 https:\localhost:8182 上的 gremlin 服务器,但从未建立连接。

如果有人可以帮助将本地 aws graph-explorer 连接到本地 gremlin 服务器或确定这样的壮举是无法实现的,我将不胜感激。

您忠实的,

路易斯·马丁斯。

amazon-web-services docker gremlin graph-databases gremlin-server
1个回答
0
投票

我遇到了同样的问题,并花了很多时间试图理解为什么会发生这种情况。事实证明,本地 Gremlin 服务器的默认 Channelizer 使用 WebSocket Channelizer 导致连接永远无法完成。

在您的服务器

conf/gremlin-server.yaml
文件(或您正在使用的任何服务器 yaml 文件)中,更改通道器值:
org.apache.tinkerpop.gremlin.server.channel.WebSocketChannelizer

改为这个值:

org.apache.tinkerpop.gremlin.server.channel.WsAndHttpChannelizer

这将允许 Graph-Explorer 通过 HTTP 连接到 Gremlin Server。

对我来说最大的线索是,当我尝试在

graph-explorer
之外执行普通的 GET 请求时(例如,在 VS Code 中使用curl、Postman 或 ThunderClient),它根本没有响应。

一旦我这样做了,我就可以从本地运行

npm run serve
,转到
http://localhost:3000/
创建到
http://127.0.0.1:8182
的连接,它立即连接到我的本地 gremlin 服务器。

希望这有帮助!

© www.soinside.com 2019 - 2024. All rights reserved.