Error: `Failed to authenticate`, when connection pool size is >1 for GremlinServer with ArcadeDB

Hi Friends, I am exploring and evaluating ArcadeDB. The DB is setup with GremlinServerPlugin to expose GremlinServer at port 8182. Using SpringBoot to create client app. @Bean Cluster cluster() { cluster = Cluster.build().port(arcadedbServerPort).addContactPoint(arcadedbServerHost) .credentials(arcadedbServerUserName, arcadedbServerPassword).create(); return cluster; } @Bean GraphTraversalSource g(Cluster cluster) { GraphTraversalSource g = traversal().withRemote(DriverRemoteConnection.using(cluster)); logger.debug("Graph Features=>: {}", g.getGraph()); // Using this line to create the conenction pool during server start up and to avoid creation during the first actual request. logger.debug("Graph Total Vertex=>: {}", g.V().count().toList()); return g; } @PreDestroy public void cleanArcadedbGraphCluster() { if (cluster != null) { cluster.close(); } The GraphTraversalSource object is created once and used across the application. When tried to load test(using default gremlin driver Cluster settings for connection pool (min 2 , max 8)) starting with 500req/sec, getting below error and around 80% requests failed. Error: org.apache.tinkerpop.gremlin.driver.exception.ResponseException: Failed to authenticate The only credentials configured is at the ArcadeDB first start up and with these credentials am able to initialize Cluster. The simple logic : g.V().hasLabel("Category").count() is been run in the request The only way I could solve this was by increasing the connection pool closer to concurrent requests, but may not be the ideal approach for a throughput for 1 million req/sec(optimistic) If the connection pool is set to (min 1 , max 1) all requests succeeds with each request latency has the effect of the load but no authentication issue, connection pool > 1 failed to authenticate. Requesting your insights.
5 Replies
spmallette
spmallette7mo ago
I'm not sure how authentication works for ArcadeDB. I assume the "Failed to authenticate" is the client side error. Is there any server-side output that might give some hints as to what is happening? Perhaps some stack traces printed to the console or server logs (not sure how ArcadeDB outputs things)? Perhaps someone from @arcadedb can offer insight on this one?
starcode100
starcode1007mo ago
Adding more details of the issue: Cluster settings for connection pool = (min 2 , max 8)) In high load. E.g.: 1000 request/sec below log is written: INFO 116840 --- [gremlin-driver-conn-scheduler-1] o.a.tinkerpop.gremlin.driver.Connection : Created new connection for ws://ec2-**.ap-southeast-2.compute.amazonaws.com:8182/gremlin INFO 116840 --- [gremlin-driver-conn-scheduler-2] o.a.tinkerpop.gremlin.driver.Connection : Created new connection for ws://ec2-**.ap-southeast-2.compute.amazonaws.com:8182/gremlin INFO 116840 --- [gremlin-driver-host-scheduler-1] o.a.t.gremlin.driver.ConnectionPool : Opening connection pool on Host{address=ec2-**.ap-southeast-2.compute.amazonaws.com/**:8182, hostUri=ws://ec2-**.ap-southeast-2.compute.amazonaws.com:8182/gremlin} with core size of 2 INFO 33720 --- [gremlin-driver-worker-19] o.a.t.gremlin.driver.ConnectionPool : Replace Connection{host=Host{address=ec2-**.ap-southeast-2.compute.amazonaws.com/**:8182, hostUri=ws://ec2-**.ap-southeast-2.compute.amazonaws.com:8182/gremlin}}, {channel=254bbe33} Following up after this, will get the error: org.apache.tinkerpop.gremlin.driver.exception.ResponseException: Failed to authenticate at org.apache.tinkerpop.gremlin.driver.Handler$GremlinResponseHandler.channelRead0(Handler.java:246) ~[gremlin-driver-3.7.0.jar:3.7.0] at org.apache.tinkerpop.gremlin.driver.Handler$GremlinResponseHandler.channelRead0(Handler.java:201) ~[gremlin-driver-3.7.0.jar:3.7.0] Upon checking the error in gremlin source code, I could see that its originating from gremlin server class: SaslAuthenticationHandler when the below condition is false: if (requestMessage.getOp().equals(Tokens.OPS_AUTHENTICATION) && requestMessage.getArgs().containsKey(Tokens.ARGS_SASL)) Note:- Is there a configuration tuning towards Cluster recommended(rule of thump) for high concurrent loads if that has affect on the above issue?
Luca (Arcade)
Luca (Arcade)7mo ago
@arcadedb completely relies on the Gremlin Server for authentication and transport. That error seems related to the Gremlin Server. Maybe a concurrency issue with high load?
starcode100
starcode1006mo ago
Hi @spmallette , do we have a workaround on the above issue? because I get the same issue with other tinkerpop enabled DB's as well. So It seems to be tied with Gremlin. I could see a similar issue thread: https://issues.apache.org/jira/browse/TINKERPOP-2132, https://issues.apache.org/jira/browse/TINKERPOP-2205
spmallette
spmallette6mo ago
if it is the same problem as TINKERPOP-2132, then judging from my comments, there's not much that can be done for a workaround beyond what was described there. cc/ @Kennh
Want results from more Discord servers?
Add your server
More Posts
How can I use the .io("filename.json").write() pattern to append to an existing graphson file?I have read about defining a custom GraphWriter using the builder, but wanted to ask first before spusing tinkerpop 3.6.x on a jdk 21 projectI'm using tinkerpop 3.6.5 to read/write over an AWS neptune graph database. Is there any issues usinIs the following use of next() allowed?The update does not seem to work in this case, even when `changes` is a non-empty object. No error iGremlin-go cannot bring out props when querying Vertex with Neptune```golang g := gremlingo.Traversal_().WithRemote(driverRemoteConnection) traversal := g.GetGraphsearch for vertices where multiple propertiesI need to search for vertices where multiple properties are a certain value. Here is what I am able repeat and until methods in Javascript Gremlin:I'm not particularly sure how to use them properly. From my current understanding, repeat() and untiGremlin driver setup for Amazon Neptune behind a Load balancerHi folks, I've been running into issues connecting to Amazon Neptune behind an HAProxy as detailed Gremlin (with Python + Neptune) Out of Memory Error with .toList()[0], .next() Fixes It. But Why?This is not really a question, but more of a discussions on how internally this would cause an out oAWS Neptune and gremlin-javascript versionsHi, I'm using the js gremlin client 3.6.2 with AWS Neptune version 1.2.1.0 and I get the following Docker Janusgraph Custom ID ValuesI'm trying to setup a janusgraph database with custom verex ID values. I have the following docker-c