New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

io.fabric8.kubernetes.client.KubernetesClientException occured under kubernetes v1.3.0-alpha #46

Closed
tangfx opened this Issue Jun 15, 2016 · 5 comments

Comments

Projects
None yet
3 participants
@tangfx

tangfx commented Jun 15, 2016

[vagrant@localhost origin]$ kubectl --kubeconfig=kubeconfig version
Client Version: version.Info{Major:"1", Minor:"4+", GitVersion:"v1.4.0-alpha.0.181+77419c48fd7d7e", GitCommit:"77419c48fd7d7e674b1947325f33716bb3671fbe", GitTreeState:"clean", BuildDate:"2016-06-15T01:42:25Z", GoVersion:"go1.6.2", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"3+", GitVersion:"v1.3.0-alpha.2.0+6a87dba0b8a50d", GitCommit:"6a87dba0b8a50dccaddb67a4c7748696db1918ec", GitTreeState:"clean", BuildDate:"2016-04-11T19:42:40Z", GoVersion:"go1.6", Compiler:"gc", Platform:"linux/amd64"}

[vagrant@localhost origin]$ kubectl --kubeconfig=kubeconfig logs es-master-6q2ny
[2016-06-15 04:57:14,245][INFO ][node ] [Black Dragon] version[2.3.3], pid[12], build[218bdf1/2016-05-17T15:40:04Z]
[2016-06-15 04:57:14,267][INFO ][node ] [Black Dragon] initializing ...
[2016-06-15 04:57:16,240][INFO ][plugins ] [Black Dragon] modules [reindex, lang-expression, lang-groovy], plugins [cloud-kubernetes], sites []
[2016-06-15 04:57:16,350][INFO ][env ] [Black Dragon] using [1] data paths, mounts [[/data (/dev/mapper/vg_vagrant-lv_root)]], net usable_space [18gb], net total_space [37.7gb], spins? [possibly], types [ext4]
[2016-06-15 04:57:16,353][INFO ][env ] [Black Dragon] heap size [1015.6mb], compressed ordinary object pointers [true]
[2016-06-15 04:57:25,015][INFO ][node ] [Black Dragon] initialized
[2016-06-15 04:57:25,018][INFO ][node ] [Black Dragon] starting ...
[2016-06-15 04:57:25,300][INFO ][transport ] [Black Dragon] publish_address {172.17.0.13:9300}, bound_addresses {172.17.0.13:9300}
[2016-06-15 04:57:25,322][INFO ][discovery ] [Black Dragon] myesdb/ccLWmZ6SRKOVyzEkPaHzKw
[2016-06-15 04:57:27,179][WARN ][io.fabric8.elasticsearch.discovery.kubernetes.KubernetesUnicastHostsProvider] [Black Dragon] Exception caught during discovery: An error has occurred.
io.fabric8.kubernetes.client.KubernetesClientException: An error has occurred.
at io.fabric8.kubernetes.client.KubernetesClientException.launderThrowable(KubernetesClientException.java:57)
at io.fabric8.kubernetes.client.dsl.base.BaseOperation.get(BaseOperation.java:125)
at io.fabric8.elasticsearch.cloud.kubernetes.KubernetesAPIServiceImpl.endpoints(KubernetesAPIServiceImpl.java:35)
at io.fabric8.elasticsearch.discovery.kubernetes.KubernetesUnicastHostsProvider.readNodes(KubernetesUnicastHostsProvider.java:112)
at io.fabric8.elasticsearch.discovery.kubernetes.KubernetesUnicastHostsProvider.lambda$buildDynamicNodes$0(KubernetesUnicastHostsProvider.java:80)
at java.security.AccessController.doPrivileged(Native Method)
at io.fabric8.elasticsearch.discovery.kubernetes.KubernetesUnicastHostsProvider.buildDynamicNodes(KubernetesUnicastHostsProvider.java:79)
at org.elasticsearch.discovery.zen.ping.unicast.UnicastZenPing.sendPings(UnicastZenPing.java:335)
at org.elasticsearch.discovery.zen.ping.unicast.UnicastZenPing.ping(UnicastZenPing.java:240)
at org.elasticsearch.discovery.zen.ping.ZenPingService.ping(ZenPingService.java:106)
at org.elasticsearch.discovery.zen.ping.ZenPingService.pingAndWait(ZenPingService.java:84)
at org.elasticsearch.discovery.zen.ZenDiscovery.findMaster(ZenDiscovery.java:886)
at org.elasticsearch.discovery.zen.ZenDiscovery.innerJoinCluster(ZenDiscovery.java:350)
at org.elasticsearch.discovery.zen.ZenDiscovery.access$4800(ZenDiscovery.java:91)
at org.elasticsearch.discovery.zen.ZenDiscovery$JoinThreadControl$1.run(ZenDiscovery.java:1237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
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
...

@pires

This comment has been minimized.

Show comment
Hide comment
@pires

pires Jun 15, 2016

Owner

Your pods don't have the CA file to validate self-signed API server HTTPS.

Owner

pires commented Jun 15, 2016

Your pods don't have the CA file to validate self-signed API server HTTPS.

@pires pires closed this Jun 15, 2016

@pires pires referenced this issue Sep 13, 2016

Closed

discovery warning #56

@Bregor

This comment has been minimized.

Show comment
Hide comment
@Bregor

Bregor Mar 6, 2017

ServiceAccount data is in place:

elasticsearch@elasticsearch-master-1999154599-cfn3r:~$ ls -al /var/run/secrets/kubernetes.io/serviceaccount/{ca.crt,token}
lrwxrwxrwx 1 root root 13 Mar  6 12:58 /var/run/secrets/kubernetes.io/serviceaccount/ca.crt -> ..data/ca.crt
lrwxrwxrwx 1 root root 12 Mar  6 12:58 /var/run/secrets/kubernetes.io/serviceaccount/token -> ..data/token

API is accessible with them:

elasticsearch@elasticsearch-master-1999154599-cfn3r:~$ curl --cacert /var/run/secrets/kubernetes.io/serviceaccount/ca.crt -H "Authorization: Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)"  https://kubernetes.default.svc.kubernetes.local
{
  "paths": [
    "/api",
    "/api/v1",
    "/apis",
    "/apis/apps",
...

But error is still here:

elasticsearch-master-1999154599-716wc elasticsearch 2017-03-06T13:01:23.693562953Z [2017-03-06T13:01:23,692][WARN ][i.f.e.d.k.KubernetesUnicastHostsProvider] [URsZ58j] Exception caught during discovery: io.fabric8.kubernetes.client.KubernetesClientException: An error has occurred.

Is there any possibility to know which particular error is occured?

Bregor commented Mar 6, 2017

ServiceAccount data is in place:

elasticsearch@elasticsearch-master-1999154599-cfn3r:~$ ls -al /var/run/secrets/kubernetes.io/serviceaccount/{ca.crt,token}
lrwxrwxrwx 1 root root 13 Mar  6 12:58 /var/run/secrets/kubernetes.io/serviceaccount/ca.crt -> ..data/ca.crt
lrwxrwxrwx 1 root root 12 Mar  6 12:58 /var/run/secrets/kubernetes.io/serviceaccount/token -> ..data/token

API is accessible with them:

elasticsearch@elasticsearch-master-1999154599-cfn3r:~$ curl --cacert /var/run/secrets/kubernetes.io/serviceaccount/ca.crt -H "Authorization: Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)"  https://kubernetes.default.svc.kubernetes.local
{
  "paths": [
    "/api",
    "/api/v1",
    "/apis",
    "/apis/apps",
...

But error is still here:

elasticsearch-master-1999154599-716wc elasticsearch 2017-03-06T13:01:23.693562953Z [2017-03-06T13:01:23,692][WARN ][i.f.e.d.k.KubernetesUnicastHostsProvider] [URsZ58j] Exception caught during discovery: io.fabric8.kubernetes.client.KubernetesClientException: An error has occurred.

Is there any possibility to know which particular error is occured?

@pires

This comment has been minimized.

Show comment
Hide comment
@pires

pires Mar 6, 2017

Owner

This repo no longer uses said plug-in.

Owner

pires commented Mar 6, 2017

This repo no longer uses said plug-in.

@Bregor

This comment has been minimized.

Show comment
Hide comment
@Bregor

Bregor Mar 6, 2017

@pires you mean discovery-kubernetes?

Bregor commented Mar 6, 2017

@pires you mean discovery-kubernetes?

@pires

This comment has been minimized.

Show comment
Hide comment
@pires

pires Mar 6, 2017

Owner

I mean fabric8 Kubernetes discovery plug-in for Elasticsearch.

Owner

pires commented Mar 6, 2017

I mean fabric8 Kubernetes discovery plug-in for Elasticsearch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment