Reputation: 11
I have setup a ssh tunnel from local machine to neptune db and established a connection using endpoint. ssh -L 8182:***.us-east-1.neptune.amazonaws.com:8182 ****
I see gremlin console work fine and i can able to run graph query but When i attempt with the python code i see some certificate verify failed.
try:
graph = Graph()
remoteConn = DriverRemoteConnection(
'wss://localhost:8182/gremlin', 'g')
g = graph.traversal().withRemote(remoteConn)
result = g.V().has('customer', 'customerId', 12549).out().valueMap().toList()
print(result)
remoteConn.close()
return result
except Exception as e:
Exeception: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)
Please advice.
Upvotes: 0
Views: 1307
Reputation: 14391
If you are connecting to Neptune over SSH and using HTTPS, you need to add the name of the Neptune cluster to your local hosts file so that the SSL cert chain can be resolved. Then do not use localhost
but the actual name of the cluster in your Python code. The hosts entry will look like this:
127.0.0.1 localhost my.cluster-xxxxxxxxxxxx.us-east-1.neptune.amazonaws.com
Upvotes: 4