无法使用 Gremlin 连接到 AWS Neptune
Cannot connect to AWS Neptune with Gremlin
我目前正在尝试访问 AWS Neptune 服务器,但在尝试连接时收到以下错误。
我正在按照 AWS 的本教程进行操作,但没有成功:https://docs.aws.amazon.com/neptune/latest/userguide/access-graph-gremlin.html
有没有人遇到过这个问题?
我以为是因为 inbound/outbound 规则,但即使我允许所有流量也没有用。
端点也正确。仔细检查。
conf/neptune-remote.yml
hosts: [neptuneTest.cu7geofyk01wr.us-east-1.neptune.amazonaws.com]
port: 8182
serializer: { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0, config: { serializeResultToString: true }}
错误
\,,,/
(o o)
-----oOOo-(3)-oOOo-----
plugin activated: tinkerpop.server
plugin activated: tinkerpop.utilities
plugin activated: tinkerpop.tinkergraph
gremlin> :remote connect tinkerpop.server conf/neptune-remote.yaml
ERROR org.apache.tinkerpop.gremlin.driver.Handler$GremlinResponseHandler - Could not process the response
io.netty.handler.codec.http.websocketx.WebSocketHandshakeException: Invalid handshake response getStatus: 500 Internal Server Error
at io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker13.verify(WebSocketClientHandshaker13.java:191)
at io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker.finishHandshake(WebSocketClientHandshaker.java:216)
at org.apache.tinkerpop.gremlin.driver.handler.WebSocketClientHandler.channelRead0(WebSocketClientHandler.java:69)
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
类似的维基:
- Issues while connecting gremlin to gremlin server
- 不是同一个问题。
在 Kelvin Lawrence 的帮助下:
curl <yourinstancename>:8182/status
如果您看到以下错误,请修复您的 IAM roles/permissions
"requestId":"e2b4ccf0-5470-4a5d-0a34-211d4738f5a8","code":"AccessDeniedException","detailedMessage":"Missing Authentication Token"}
至于 2021 年 6 月,Python 有一种使用 SIG V4 的方法:
如果为 Amazon Neptune 集群启用了 IAM 身份验证,则所有查询请求都必须使用 SIG V4 进行签名。有关详细信息,请参阅 [1]。
[1] https://docs.aws.amazon.com/neptune/latest/userguide/iam-auth-connecting-gremlin-console.html
我目前正在尝试访问 AWS Neptune 服务器,但在尝试连接时收到以下错误。
我正在按照 AWS 的本教程进行操作,但没有成功:https://docs.aws.amazon.com/neptune/latest/userguide/access-graph-gremlin.html
有没有人遇到过这个问题?
我以为是因为 inbound/outbound 规则,但即使我允许所有流量也没有用。
端点也正确。仔细检查。
conf/neptune-remote.yml
hosts: [neptuneTest.cu7geofyk01wr.us-east-1.neptune.amazonaws.com]
port: 8182
serializer: { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0, config: { serializeResultToString: true }}
错误
\,,,/
(o o)
-----oOOo-(3)-oOOo-----
plugin activated: tinkerpop.server
plugin activated: tinkerpop.utilities
plugin activated: tinkerpop.tinkergraph
gremlin> :remote connect tinkerpop.server conf/neptune-remote.yaml
ERROR org.apache.tinkerpop.gremlin.driver.Handler$GremlinResponseHandler - Could not process the response
io.netty.handler.codec.http.websocketx.WebSocketHandshakeException: Invalid handshake response getStatus: 500 Internal Server Error
at io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker13.verify(WebSocketClientHandshaker13.java:191)
at io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker.finishHandshake(WebSocketClientHandshaker.java:216)
at org.apache.tinkerpop.gremlin.driver.handler.WebSocketClientHandler.channelRead0(WebSocketClientHandler.java:69)
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
类似的维基:
- Issues while connecting gremlin to gremlin server
- 不是同一个问题。
在 Kelvin Lawrence 的帮助下:
curl <yourinstancename>:8182/status
如果您看到以下错误,请修复您的 IAM roles/permissions
"requestId":"e2b4ccf0-5470-4a5d-0a34-211d4738f5a8","code":"AccessDeniedException","detailedMessage":"Missing Authentication Token"}
至于 2021 年 6 月,Python 有一种使用 SIG V4 的方法:
如果为 Amazon Neptune 集群启用了 IAM 身份验证,则所有查询请求都必须使用 SIG V4 进行签名。有关详细信息,请参阅 [1]。
[1] https://docs.aws.amazon.com/neptune/latest/userguide/iam-auth-connecting-gremlin-console.html