apache / camel-quarkus

Apache Camel Quarkus
https://camel.apache.org
Apache License 2.0
257 stars 192 forks source link

Intermittent OS4JException: Unable to retrieve current session #4866

Open ppalaga opened 1 year ago

ppalaga commented 1 year ago

Saw this in https://github.com/apache/camel-quarkus/pull/4865 integration-tests-alternative-jdk on Java 17

Let's see if it happens again.

2023-05-01 01:06:11,819 ERROR [io.qua.ver.htt.run.QuarkusErrorHandler] (executor-thread-1) HTTP Request to /openstack/keystone/regions/getShouldSucceed failed, error id: 88412fdc-72f7-44dd-9928-a9b32eda3756-1: org.jboss.resteasy.spi.UnhandledException: org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[]
    at org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:105)
    at org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:359)
    at org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:218)
    at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:519)
    at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:261)
    at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:161)
    at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:364)
    at org.jboss.resteasy.core.SynchronousDispatcher.preprocess(SynchronousDispatcher.java:164)
    at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:247)
    at io.quarkus.resteasy.runtime.standalone.RequestDispatcher.service(RequestDispatcher.java:73)
    at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler.dispatch(VertxRequestHandler.java:151)
    at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler$1.run(VertxRequestHandler.java:91)
    at io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:576)
    at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
    at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
    at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[]
    at org.apache.camel.CamelExecutionException.wrapCamelExecutionException(CamelExecutionException.java:45)
    at org.apache.camel.support.ExchangeHelper.extractResultBody(ExchangeHelper.java:667)
    at org.apache.camel.impl.engine.DefaultProducerTemplate.extractResultBody(DefaultProducerTemplate.java:591)
    at org.apache.camel.impl.engine.DefaultProducerTemplate.extractResultBody(DefaultProducerTemplate.java:587)
    at org.apache.camel.impl.engine.DefaultProducerTemplate.requestBodyAndHeader(DefaultProducerTemplate.java:431)
    at org.apache.camel.quarkus.component.openstack.it.OpenstackKeystoneRegionResource.getShouldSucceed(OpenstackKeystoneRegionResource.java:75)
    at org.apache.camel.quarkus.component.openstack.it.OpenstackKeystoneRegionResource_ClientProxy.getShouldSucceed(Unknown Source)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:170)
    at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:130)
    at org.jboss.resteasy.core.ResourceMethodInvoker.internalInvokeOnTarget(ResourceMethodInvoker.java:660)
    at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTargetAfterFilter(ResourceMethodInvoker.java:524)
    at org.jboss.resteasy.core.ResourceMethodInvoker.lambda$invokeOnTarget$2(ResourceMethodInvoker.java:474)
    at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:364)
    at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:476)
    at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:434)
    at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:408)
    at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:69)
    at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:492)
    ... 15 more
Caused by: org.openstack4j.api.exceptions.OS4JException: Unable to retrieve current session. Please verify thread has a current session available.
    at org.openstack4j.openstack.internal.BaseOpenStackService.builder(BaseOpenStackService.java:106)
    at org.openstack4j.openstack.internal.BaseOpenStackService.builder(BaseOpenStackService.java:100)
    at org.openstack4j.openstack.internal.BaseOpenStackService.get(BaseOpenStackService.java:46)
    at org.openstack4j.openstack.identity.v3.internal.RegionServiceImpl.get(RegionServiceImpl.java:36)
    at org.apache.camel.component.openstack.keystone.producer.RegionProducer.doGet(RegionProducer.java:73)
    at org.apache.camel.component.openstack.keystone.producer.RegionProducer.process(RegionProducer.java:48)
    at org.apache.camel.support.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:66)
    at org.apache.camel.impl.engine.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:214)
    at org.apache.camel.impl.engine.SharedCamelInternalProcessor$1.process(SharedCamelInternalProcessor.java:111)
    at org.apache.camel.impl.engine.DefaultAsyncProcessorAwaitManager.process(DefaultAsyncProcessorAwaitManager.java:83)
    at org.apache.camel.impl.engine.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:108)
    at org.apache.camel.support.cache.DefaultProducerCache.send(DefaultProducerCache.java:199)
    at org.apache.camel.impl.engine.DefaultProducerTemplate.send(DefaultProducerTemplate.java:176)
    at org.apache.camel.impl.engine.DefaultProducerTemplate.send(DefaultProducerTemplate.java:172)
    at org.apache.camel.impl.engine.DefaultProducerTemplate.requestBodyAndHeader(DefaultProducerTemplate.java:429)
    ... 32 more

Error:  Tests run: 6, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.219 s <<< FAILURE! - in org.apache.camel.quarkus.component.openstack.it.OpenstackKeystoneRegionTest
Error:  getShouldSucceed  Time elapsed: 0.074 s  <<< FAILURE!
ppalaga commented 1 year ago

Same exception in main in https://github.com/apache/camel-quarkus/actions/runs/4949902160/jobs/8853518955?pr=4890#step:8:3383 :

[INFO] Running org.apache.camel.quarkus.component.openstack.it.OpenstackKeystoneRegionTest
2023-05-11 17:10:58,059 ERROR [io.qua.ver.htt.run.QuarkusErrorHandler] (executor-thread-2) HTTP Request to /openstack/keystone/regions/getShouldSucceed failed, error id: b8243cf2-1774-44ec-821f-216c193ecd49-1: org.jboss.resteasy.spi.UnhandledException: org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[]
    at org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:110)
    at org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:370)
    at org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:218)
    at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:519)
    at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:261)
    at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:161)
    at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:364)
    at org.jboss.resteasy.core.SynchronousDispatcher.preprocess(SynchronousDispatcher.java:164)
    at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:247)
    at io.quarkus.resteasy.runtime.standalone.RequestDispatcher.service(RequestDispatcher.java:82)
    at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler.dispatch(VertxRequestHandler.java:147)
    at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler$1.run(VertxRequestHandler.java:93)
    at io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:576)
    at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1512)
    at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
    at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[]
    at org.apache.camel.CamelExecutionException.wrapCamelExecutionException(CamelExecutionException.java:45)
    at org.apache.camel.support.ExchangeHelper.extractResultBody(ExchangeHelper.java:652)
    at org.apache.camel.impl.engine.DefaultProducerTemplate.extractResultBody(DefaultProducerTemplate.java:591)
    at org.apache.camel.impl.engine.DefaultProducerTemplate.extractResultBody(DefaultProducerTemplate.java:587)
    at org.apache.camel.impl.engine.DefaultProducerTemplate.requestBodyAndHeader(DefaultProducerTemplate.java:431)
    at org.apache.camel.quarkus.component.openstack.it.OpenstackKeystoneRegionResource.getShouldSucceed(OpenstackKeystoneRegionResource.java:74)
    at org.apache.camel.quarkus.component.openstack.it.OpenstackKeystoneRegionResource_ClientProxy.getShouldSucceed(Unknown Source)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:170)
    at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:130)
    at org.jboss.resteasy.core.ResourceMethodInvoker.internalInvokeOnTarget(ResourceMethodInvoker.java:660)
    at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTargetAfterFilter(ResourceMethodInvoker.java:524)
    at org.jboss.resteasy.core.ResourceMethodInvoker.lambda$invokeOnTarget$2(ResourceMethodInvoker.java:474)
    at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:364)
    at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:476)
    at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:434)
    at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:408)
    at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:69)
    at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:492)
    ... 15 more
Caused by: org.openstack4j.api.exceptions.OS4JException: Unable to retrieve current session. Please verify thread has a current session available.
    at org.openstack4j.openstack.internal.BaseOpenStackService.builder(BaseOpenStackService.java:106)
    at org.openstack4j.openstack.internal.BaseOpenStackService.builder(BaseOpenStackService.java:100)
    at org.openstack4j.openstack.internal.BaseOpenStackService.get(BaseOpenStackService.java:46)
    at org.openstack4j.openstack.identity.v3.internal.RegionServiceImpl.get(RegionServiceImpl.java:36)
    at org.apache.camel.component.openstack.keystone.producer.RegionProducer.doGet(RegionProducer.java:73)
    at org.apache.camel.component.openstack.keystone.producer.RegionProducer.process(RegionProducer.java:48)
    at org.apache.camel.support.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:66)
    at org.apache.camel.impl.engine.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:214)
    at org.apache.camel.impl.engine.SharedCamelInternalProcessor$1.process(SharedCamelInternalProcessor.java:111)
    at org.apache.camel.impl.engine.DefaultAsyncProcessorAwaitManager.process(DefaultAsyncProcessorAwaitManager.java:81)
    at org.apache.camel.impl.engine.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:108)
    at org.apache.camel.support.cache.DefaultProducerCache.send(DefaultProducerCache.java:165)
    at org.apache.camel.impl.engine.DefaultProducerTemplate.send(DefaultProducerTemplate.java:176)
    at org.apache.camel.impl.engine.DefaultProducerTemplate.send(DefaultProducerTemplate.java:172)
    at org.apache.camel.impl.engine.DefaultProducerTemplate.requestBodyAndHeader(DefaultProducerTemplate.java:429)
    ... 32 more

Error:  Tests run: 6, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.213 s <<< FAILURE! - in org.apache.camel.quarkus.component.openstack.it.OpenstackKeystoneRegionTest
Error:  getShouldSucceed  Time elapsed: 0.06 s  <<< FAILURE!