"unable to find valid certification path to requested target" error in kubernetes component

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

"unable to find valid certification path to requested target" error in kubernetes component

imranrazakhan
This post was updated on .
i am getting security error although i am providing oauthtoken in
kubernetes component

I am using OpenShift 3.11 with same oauthtoken i am accessing it from CLI like
> oc login https://localhost:8443 --token=xxxxx

Route:

    from("timer://foo?fixedRate=true&period=5000")
            .setHeader(KubernetesConstants.KUBERNETES_NAMESPACE_NAME,
simple("default"))
            .setHeader(KubernetesConstants.KUBERNETES_CONFIGMAP_NAME,
simple("my-config"))
            .to("kubernetes-config-maps://
https://localhost:8443?oauthToken=xxxx&operation=getConfigMap")
            .to("mock:result");

Following is error trace

io.fabric8.kubernetes.client.KubernetesClientException: Operation: [get]
 for kind: [ConfigMap]  with name: [my-config]  in namespace: [default]
 failed.
at
io.fabric8.kubernetes.client.KubernetesClientException.launderThrowable(KubernetesClientException.java:64)
~[kubernetes-client-4.1.1.jar:?]
at
io.fabric8.kubernetes.client.KubernetesClientException.launderThrowable(KubernetesClientException.java:72)
~[kubernetes-client-4.1.1.jar:?]
at
io.fabric8.kubernetes.client.dsl.base.BaseOperation.getMandatory(BaseOperation.java:254)
~[kubernetes-client-4.1.1.jar:?]
at
io.fabric8.kubernetes.client.dsl.base.BaseOperation.get(BaseOperation.java:210)
~[kubernetes-client-4.1.1.jar:?]
at
org.apache.camel.component.kubernetes.config_maps.KubernetesConfigMapsProducer.doGetConfigMap(KubernetesConfigMapsProducer.java:118)
~[camel-kubernetes-2.24.1.jar:2.24.1]
at
org.apache.camel.component.kubernetes.config_maps.KubernetesConfigMapsProducer.process(KubernetesConfigMapsProducer.java:73)
~[camel-kubernetes-2.24.1.jar:2.24.1]
at
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
~[camel-core-2.24.1.jar:2.24.1]
at
org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:178)
~[camel-core-2.24.1.jar:2.24.1]
at
org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:445)
~[camel-core-2.24.1.jar:2.24.1]
at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:173)
~[camel-core-2.24.1.jar:2.24.1]
at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548)
[camel-core-2.24.1.jar:2.24.1]
at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
[camel-core-2.24.1.jar:2.24.1]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:138)
[camel-core-2.24.1.jar:2.24.1]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:101)
[camel-core-2.24.1.jar:2.24.1]
at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
[camel-core-2.24.1.jar:2.24.1]
at
org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:197)
[camel-core-2.24.1.jar:2.24.1]
at
org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:79)
[camel-core-2.24.1.jar:2.24.1]
at java.util.TimerThread.mainLoop(Timer.java:555) [?:1.8.0_162]
at java.util.TimerThread.run(Timer.java:505) [?:1.8.0_162]
Caused by: javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find
valid certification path to requested target
at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) ~[?:1.8.0_162]
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1964)
~[?:1.8.0_162]
Reply | Threaded
Open this post in threaded view
|

Re: unable to find valid certification path to requested target error in kubernetes component

Andrea Cosentino-3
What is the Kubernetes cluster version? Do you have any real reproducer for
this?

Il ven 13 set 2019, 22:08 Imran Raza Khan <[hidden email]> ha
scritto:

> i am getting security error although i am providing oauthtoken in
> kubernetes component
>
> from("timer://foo?fixedRate=true&period=5000")
>         .setHeader(KubernetesConstants.KUBERNETES_NAMESPACE_NAME,
> simple("default"))
>         .setHeader(KubernetesConstants.KUBERNETES_CONFIGMAP_NAME,
> simple("my-config"))
>         .to("kubernetes-config-maps://
> https://localhost:8443?oauthToken=xxxx&operation=getConfigMap")
>         .to("mock:result");
>
> Following is error trace
>
> io.fabric8.kubernetes.client.KubernetesClientException: Operation: [get]
>  for kind: [ConfigMap]  with name: [my-config]  in namespace: [default]
>  failed.
> at
>
> io.fabric8.kubernetes.client.KubernetesClientException.launderThrowable(KubernetesClientException.java:64)
> ~[kubernetes-client-4.1.1.jar:?]
> at
>
> io.fabric8.kubernetes.client.KubernetesClientException.launderThrowable(KubernetesClientException.java:72)
> ~[kubernetes-client-4.1.1.jar:?]
> at
>
> io.fabric8.kubernetes.client.dsl.base.BaseOperation.getMandatory(BaseOperation.java:254)
> ~[kubernetes-client-4.1.1.jar:?]
> at
>
> io.fabric8.kubernetes.client.dsl.base.BaseOperation.get(BaseOperation.java:210)
> ~[kubernetes-client-4.1.1.jar:?]
> at
>
> org.apache.camel.component.kubernetes.config_maps.KubernetesConfigMapsProducer.doGetConfigMap(KubernetesConfigMapsProducer.java:118)
> ~[camel-kubernetes-2.24.1.jar:2.24.1]
> at
>
> org.apache.camel.component.kubernetes.config_maps.KubernetesConfigMapsProducer.process(KubernetesConfigMapsProducer.java:73)
> ~[camel-kubernetes-2.24.1.jar:2.24.1]
> at
>
> org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
> ~[camel-core-2.24.1.jar:2.24.1]
> at
>
> org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:178)
> ~[camel-core-2.24.1.jar:2.24.1]
> at
>
> org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:445)
> ~[camel-core-2.24.1.jar:2.24.1]
> at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:173)
> ~[camel-core-2.24.1.jar:2.24.1]
> at
>
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548)
> [camel-core-2.24.1.jar:2.24.1]
> at
>
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
> [camel-core-2.24.1.jar:2.24.1]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:138)
> [camel-core-2.24.1.jar:2.24.1]
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:101)
> [camel-core-2.24.1.jar:2.24.1]
> at
>
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
> [camel-core-2.24.1.jar:2.24.1]
> at
>
> org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:197)
> [camel-core-2.24.1.jar:2.24.1]
> at
> org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:79)
> [camel-core-2.24.1.jar:2.24.1]
> at java.util.TimerThread.mainLoop(Timer.java:555) [?:1.8.0_162]
> at java.util.TimerThread.run(Timer.java:505) [?:1.8.0_162]
> Caused by: javax.net.ssl.SSLHandshakeException:
> sun.security.validator.ValidatorException: PKIX path building failed:
> sun.security.provider.certpath.SunCertPathBuilderException: unable to find
> valid certification path to requested target
> at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) ~[?:1.8.0_162]
> at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1964)
> ~[?:1.8.0_162]
>