apache / camel-quarkus

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

Intermittent failure of test `CxfWsTrustTest.programmaticStsNotSet` #4988

Open jamesnetherton opened 1 year ago

jamesnetherton commented 1 year ago

Bug description

2023-06-14T03:36:28.4259208Z Caused by: java.net.ConnectException: ConnectException invoking http://localhost:8081/jaxws-samples-wsse-policy-trust-sts/SecurityTokenService: Connection refused

Note the URL has port 8081. Which probably comes from here:

https://github.com/apache/camel-quarkus/blob/main/integration-test-groups/cxf-soap/cxf-soap-ws-trust/src/main/resources/AsymmetricSAML2Policy.xml#L50-L52

The resulting exception is thrown from AbstractSTSClient:

trust}sayHello has thrown exception, unwinding now: org.apache.cxf.ws.security.trust.TrustException: Exception when trying to retrieve/process a WSDL via WS-MEX
2023-06-14T03:47:00.2152933Z    at org.apache.cxf.ws.security.trust.AbstractSTSClient.configureViaEPR(AbstractSTSClient.java:612)
2023-06-14T03:47:00.2153531Z    at org.apache.cxf.ws.security.trust.STSUtils.getClientWithIssuer(STSUtils.java:166)
2023-06-14T03:47:00.2154101Z    at org.apache.cxf.ws.security.trust.STSTokenRetriever.getToken(STSTokenRetriever.java:68)
2023-06-14T03:47:00.2155000Z    at org.apache.cxf.ws.security.policy.interceptors.IssuedTokenInterceptorProvider$IssuedTokenOutInterceptor.handleMessage(IssuedTokenInterceptorProvider.java:147)
2023-06-14T03:47:00.2155767Z    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
2023-06-14T03:47:00.2156286Z    at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:528)
2023-06-14T03:47:00.2156730Z    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:439)
2023-06-14T03:47:00.2157149Z    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:354)
2023-06-14T03:47:00.2157580Z    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:312)
2023-06-14T03:47:00.2158031Z    at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
2023-06-14T03:47:00.2158506Z    at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:140)
2023-06-14T03:47:00.2158915Z    at jdk.proxy2/jdk.proxy2.$Proxy102.sayHello(Unknown Source)

What's interesting is that test only fails some of the time. Meaning that the exception is probably being swallowed or ignored when the test passes.

jamesnetherton commented 1 year ago

Reopening as this appears to still not be fixed.