Hello
I currently used the Java SDK 3.0.8 and have the following issue.
I have a junit that simulate the update of the login\password ob server side. The idea behind is to automatically re login when the password change with a password rotation.
so the code is quite simple :
ClusterEnvironment clusterEnvironment = ClusterEnvironment.builder()
.retryStrategy(FailFastRetryStrategy.INSTANCE)
.build();
ClusterOptions clusterOptions = ClusterOptions.clusterOptions("MyUser",
"qwerty").environment(clusterEnvironment);
Cluster clusterTmp = Cluster.connect("couchbase://localhost", clusterOptions);
clusterTmp.waitUntilReady(Duration.ofMillis(1000));
clusterEnvironment.eventBus().subscribe(new ddd(clusterTmp));
Bucket bucket = clusterTmp.bucket("MyBucket");
bucket.waitUntilReady(Duration.ofMillis(1000));
for (int i = 0; i < 30; i++) {
log.info("i:" + i);
TimeUnit.SECONDS.sleep(1);
}
at this level during the previous loop , i change the pass from qwerty to MyPass
I reset the access to the server with ip action and i continue with
bucket.waitUntilReady(Duration.ofMillis(1000));
Collection collection = bucket.defaultCollection();
collection.get("DoicInsert1599546421768");
unfortunatly the " bucket.waitUntilReady" is stuck and my junit nerver stop.
in the log we can see :
2020-09-08 14:25:16 1747356 [cb-events] WARN com.couchbase.endpoint - [com.couchbase.endpoint][EndpointConnectionFailedEvent][13ms] Connect attempt 428 failed because of AuthenticationFailureException: Authentication Failure {“channelId”:“1A1AF5A300000001/000000008275B2E2”,“circuitBreaker”:“DISABLED”,“coreId”:“0x1a1af5a300000001”,“local”:“127.0.0.1:58050”,“remote”:“localhost:11210”,“type”:“KV”}
com.couchbase.client.core.error.AuthenticationFailureException: Authentication Failure {“channelId”:“1A1AF5A300000001/000000008275B2E2”,“circuitBreaker”:“DISABLED”,“coreId”:“0x1a1af5a300000001”,“local”:“127.0.0.1:58050”,“remote”:“localhost:11210”,“status”:“UNKNOWN”,“type”:“KV”,“xerror”:{“ref”:“d9f47e2c-87cd-446a-0d07-b15c0b11d446”}}
at com.couchbase.client.core.io.netty.kv.SaslAuthenticationHandler.failConnect(SaslAuthenticationHandler.java:475)
at com.couchbase.client.core.io.netty.kv.SaslAuthenticationHandler.maybeFailConnect(SaslAuthenticationHandler.java:280)
at com.couchbase.client.core.io.netty.kv.SaslAuthenticationHandler.channelRead(SaslAuthenticationHandler.java:239)
at com.couchbase.client.core.io.netty.kv.MemcacheProtocolVerificationHandler.channelRead(MemcacheProtocolVerificationHandler.java:84)
at java.lang.Thread.run(Thread.java:748)
As you can see the retry is 428… little too much
My question is how can to be sure that the wait is not stuck ?
I already try to creante an event consumer with some code that diconnect the bucket but without success
Nb The version of sdk is 3.0.8 (latest one)
Thanks for you help.
Vincent