-
Bug
-
Resolution: Cannot Reproduce
-
Minor
-
None
-
Jenkins: 2.19.2
kubernetes-plugin: 0.9
Hi,
I'm trying the job example, but the job fails on the shell step:
[Pipeline] container [Pipeline] { [Pipeline] stage [Pipeline] { (Build a Go project) [Pipeline] sh [k8s-test2] Running shell script Executing shell script inside container [golang] of pod [jenkins-slave-7be4b22b164184] java.net.UnknownHostException: kubernetes.default.svc: unknown error at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323) at java.net.InetAddress.getAllByName0(InetAddress.java:1276) at java.net.InetAddress.getAllByName(InetAddress.java:1192) at java.net.InetAddress.getAllByName(InetAddress.java:1126) at com.squareup.okhttp.Dns$1.lookup(Dns.java:39) at com.squareup.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:175) at com.squareup.okhttp.internal.http.RouteSelector.nextProxy(RouteSelector.java:141) at com.squareup.okhttp.internal.http.RouteSelector.next(RouteSelector.java:83) at com.squareup.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:174) at com.squareup.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:126) at com.squareup.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:95) at com.squareup.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:281) at com.squareup.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:224) at com.squareup.okhttp.Call.getResponse(Call.java:286) at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:243) at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:205) at com.squareup.okhttp.Call.access$100(Call.java:35) at com.squareup.okhttp.Call$AsyncCall.execute(Call.java:171) at com.squareup.okhttp.internal.NamedRunnable.run(NamedRunnable.java:33) 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) [Pipeline] } [Pipeline] // stage [Pipeline] } [Pipeline] // container [Pipeline] } [Pipeline] // stage [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline
But kube-dns is up and running :
@kubectl run -i --tty busybox --image=busybox --generator="run-pod/v1" Waiting for pod default/busybox to be running, status is Pending, pod ready: false Hit enter for command prompt / # nslookup kubernetes.default.svc Server: 172.18.200.10 Address 1: 172.18.200.10 kube-dns.kube-system.svc.cluster.local Name: kubernetes.default.svc Address 1: 172.18.200.1 kubernetes.default.svc.cluster.local
Any ideas?
- is duplicated by
-
JENKINS-40927 Jenkins failing with Configuring Kubernetes
-
- Closed
-
iocanel - Can you please clarify the comment , my setup is somewhat similar. I am running my jenkins master in docker swarm, but have configured it to run my slave workloads on remote kubernetes.
i have looked at the kubernetes-plugin code somewhat superficially , but dont see how the stack trace above correlates with any logic from the kubernetes-client plugin. Interestingly enough, this problem seems to impact all the shell commands in pipeline DSL , the other jvm calls seems okay.
https://github.com/jenkinsci/kubernetes-plugin/blob/52c0af572ef091399fa76657be34471c033d1464/src/main/java/org/csanchez/jenkins/plugins/kubernetes/pipeline/ContainerExecDecorator.java#L92
" if you use the kubernetes-plugin outside of kubernetes, you need to properlly configure it to talk to the remote kubernetes."
what configuration are you referring to (or) perhaps you are referring to the usage of the kubernetes-client within the kubernetes-plugin?
i tried setting the kubernetes_master (env) or kubernetes.master (system property) for jenkins master - but there is no change to the behavior