Getting below Error when the code execute the repo call like finall(). It happens sometime not all the time.We are usinfg Couchbase server 6.5
2021-07-05 04:37:17,923 ERROR [org.springframework.boot.web.servlet.support.ErrorPageFilter] (default task-2) Forwarding to error page from request [/onboarding/federate] due to exception [Active QUERY service found, but all unavailable.]: com.couchbase.client.mc.coordination.NoEntryFoundException: Active QUERY service found, but all unavailable.
at com.couchbase.client.mc.distribution.RoundRobinTrafficDistributor.selectBucket(RoundRobinTrafficDistributor.java:83)
at com.couchbase.client.mc.AsyncBucketProxy.query(AsyncBucketProxy.java:1386)
at com.couchbase.client.mc.BucketProxy.query(BucketProxy.java:199)
at com.exostar.iam.service.couchbase.mca.internal.SpringMcaBucket.query(SpringMcaBucket.java:541)
at org.springframework.data.couchbase.core.CouchbaseTemplate$8.doInBucket(CouchbaseTemplate.java:513)
at org.springframework.data.couchbase.core.CouchbaseTemplate$8.doInBucket(CouchbaseTemplate.java:510)
at org.springframework.data.couchbase.core.CouchbaseTemplate.execute(CouchbaseTemplate.java:553)
at org.springframework.data.couchbase.core.CouchbaseTemplate.queryN1QL(CouchbaseTemplate.java:510)
at org.springframework.data.couchbase.core.CouchbaseTemplate.findByN1QL(CouchbaseTemplate.java:445)
at org.springframework.data.couchbase.repository.support.N1qlCouchbaseRepository.findAll(N1qlCouchbaseRepository.java:80)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.data.repository.core.support.RepositoryComposition$RepositoryFragments.invoke(RepositoryComposition.java:371)
at org.springframework.data.repository.core.support.RepositoryComposition.invoke(RepositoryComposition.java:204)
at org.springframework.data.repository.core.support.RepositoryFactorySupport$ImplementationMethodExecutionInterceptor.invoke(RepositoryFactorySupport.java:657)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:621)
at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:605)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.data.couchbase.repository.support.ViewPostProcessor$ViewInterceptor.invoke(ViewPostProcessor.java:87)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
at com.sun.proxy.$Proxy592.findAll(Unknown Source)
at com.exostar.oap.security.ping.util.SigningKeyService.getActiveJwtKeyInfo(SigningKeyService.java:46)
at com.exostar.oap.security.ping.core.PingOpenTokenAuthenticationProvider.authenticate(PingOpenTokenAuthenticationProvider.java:121)
at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:175)
at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:195)
Code invoke the above Error:
tokenKeyRepo.findAll(Sort.by(Sort.Direction.DESC, “timeStamp”)).iterator().next();
TokenKeyRepo class extends PagingAndSortingRepository