Team, It was an kubernetes DNS resolution issue. With the help of following link - https://kubernetes.io/docs/tasks/administer-cluster/dns-debugging-resolution/ created (*dnsutils.yaml*) pod and found that my K8s cluster pods was returning following error "*connection timed out; no servers could be reached"* for below command.
kubectl exec -i -t dnsutils -- nslookup kubernetes.default So i have uninstalled and re-installed *Kubernetes version - v1.19.0*. Now everything working fine. Thanks.!!! On Friday, August 28, 2020 at 10:16:45 AM UTC+5:30, Mk wrote: > > Dear Team, > > I have *Jenkins Master* &* K8s-Master* running on same server(*CentOS-8*), > Configured Jenkins *Kubernetes Plugin version - 1.26.4* But while running > pipeline job i always getting an error, Below is K8s cluster jenkins agent > pod log. > > [root@K8s-Master /]# kubectl logs -f pipeline-test-33-sj6tl-r0clh-g559d -c > jnlp > > Aug 08, 2020 8:37:21 AM hudson.remoting.jnlp.Main createEngine > INFO: Setting up agent: pipeline-test-33-sj6tl-r0clh-g559d > Aug 08, 2020 8:37:21 AM hudson.remoting.jnlp.Main$CuiListener <init> > INFO: Jenkins agent is running in headless mode. > Aug 08, 2020 8:37:21 AM hudson.remoting.Engine startEngine > INFO: Using Remoting version: 4.3 > Aug 08, 2020 8:37:21 AM org.jenkinsci.remoting.engine.WorkDirManager > initializeWorkDir > INFO: Using /home/jenkins/agent/remoting as a remoting work directory > Aug 08, 2020 8:37:21 AM org.jenkinsci.remoting.engine.WorkDirManager > setupLogging > INFO: Both error and output logs will be printed to > /home/jenkins/agent/remoting > Aug 08, 2020 8:37:21 AM hudson.remoting.jnlp.Main$CuiListener status > INFO: Locating server among [http://jenkins-serverjenkins/] > Aug 08, 2020 8:37:41 AM hudson.remoting.jnlp.Main$CuiListener error > > SEVERE: Failed to connect to > http://jenkins-server/jenkins/tcpSlaveAgentListener/: jenkins-server > java.io.IOException: Failed to connect to > http://jenkins-serverjenkins/tcpSlaveAgentListener/: jenkins-server > at > org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.resolve(JnlpAgentEndpointResolver.java:217) > at hudson.remoting.Engine.innerRun(Engine.java:693) > at hudson.remoting.Engine.run(Engine.java:518) > Caused by: java.net.UnknownHostException: jenkins-server > at > java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184) > at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) > at java.net.Socket.connect(Socket.java:607) > at sun.net.NetworkClient.doConnect(NetworkClient.java:175) > at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) > at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) > at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) > at sun.net.www.http.HttpClient.New(HttpClient.java:339) > at sun.net.www.http.HttpClient.New(HttpClient.java:357) > at > sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) > at > sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) > at > sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) > at > sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) > at > org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.resolve(JnlpAgentEndpointResolver.java:214) > > > ... 2 more > > > Below settings configuration already enabled glocal security section. > > Manage Jenkins --> Configure Global Security --> Agents Random [Enabled] > > > > [image: 1.png] > > > > > I am successfully able to communicate from my Jenkins to the K8s master > cluster(Verified in Jenkins Cloud section). > > Even in K8s master server all the namespace pods are running. *Flannel > CNI installed*, Not sure what is causing problem with agent provisioning > through Jenkins. > > Would appreciate any suggestions. > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b0e419c3-c06a-4052-b5cd-64609b038d55o%40googlegroups.com.
