1

I'm currently trying to access the AWS Neptune Server, but I receive the error below when trying to connect.

I'm following this tutorial from AWS, yet without success: https://docs.aws.amazon.com/neptune/latest/userguide/access-graph-gremlin.html

Has anyone encountered this issue before?

I thought it was because of the inbound/outbound rules, but it didn't work even when I allowed all traffic.

The endpoint is also correct. Double checked.

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 }}

Error

         \,,,/
         (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)

Similar wikis:

Jon Tan
  • 1,461
  • 3
  • 17
  • 33
  • 1
    Hi Jon, a few questions. Are you able to reach the server using a simple curl of the form `curl :8182/status` ? Are you running the Gremlin console from an EC2 instance that is in the same VPC as Neptune? Do you have IAM Authentication enabled? – Kelvin Lawrence Mar 20 '19 at 06:09
  • 1
    Thank you! I was able to get this reply: `"requestId":"e2b4ccf0-5470-4a5d-0a34-211d4738f5a8","code":"AccessDeniedException","detailedMessage":"Missing Authentication Token"}` I've fixed the IAM authentication and now it works! – Jon Tan Mar 20 '19 at 07:00

2 Answers2

7

With Kelvin Lawrence's help:

curl <yourinstancename>:8182/status

If you see the following error, fix your IAM roles/permissions

"requestId":"e2b4ccf0-5470-4a5d-0a34-211d4738f5a8","code":"AccessDeniedException","detailedMessage":"Missing Authentication Token"}
Jon Tan
  • 1,461
  • 3
  • 17
  • 33
0

As for June 2021, there is a way with Python using SIG V4:

If IAM authentication is enabled for the Amazon Neptune cluster all query requests must be signed using SIG V4. See [1] for more information.

[1] https://docs.aws.amazon.com/neptune/latest/userguide/iam-auth-connecting-gremlin-console.html

iamtodor
  • 734
  • 8
  • 21