you are correct your kubernetes DNS can't resolve the name, assuming you have a service jenkins in the build-env namespace
On Thu, Oct 5, 2017 at 4:09 PM, WANG, YAN-HONG <allways.w...@gmail.com> wrote: > Hello, > > My environment: > Jenkins: 2.73.1 > Jenkins plugin (kubernetes: *1.0*). > Kuberntes Server: *v1.7.7* ( One master and one minion) > Platform: Ubuntu 16.04 (in *Synnefo *cluster environment) > > When I execute pipeline job with kubernetes plugin in Jenkins environment. > > The slave-jksnf-q6dlr is stay in "offline" state. > > *$ ​kubectl --namespace=build-env logs slave-jksnf-q6dlr jnlp* > Warning: JnlpProtocol3 is disabled by default, use JNLP_PROTOCOL_OPTS to > alter the behavior > Warning: SECRET is defined twice in command-line arguments and the > environment variable > Warning: AGENT_NAME is defined twice in command-line arguments and the > environment variable > Oct 05, 2017 1:29:32 PM hudson.remoting.jnlp.Main createEngine > INFO: Setting up slave: slave-jksnf-q6dlr > Oct 05, 2017 1:29:32 PM hudson.remoting.jnlp.Main$CuiListener <init> > INFO: Jenkins agent is running in headless mode. > Oct 05, 2017 1:29:32 PM hudson.remoting.Engine startEngine > WARNING: No Working Directory. Using the legacy JAR Cache location: > /home/jenkins/.jenkins/cache/jars > Oct 05, 2017 1:29:32 PM hudson.remoting.jnlp.Main$CuiListener status > INFO: Locating server among [http://jenkins.build-env.svc. > cluster.local:8080/] > Oct 05, 2017 1:29:37 PM hudson.remoting.jnlp.Main$CuiListener error > SEVERE: Failed to connect to http://jenkins.build-env.svc. > cluster.local:8080/tcpSlaveAgentListener/: jenkins.build-env.svc.cluster. > local > java.io.IOException: Failed to connect to http://jenkins.build-env.svc. > cluster.local:8080/tcpSlaveAgentListener/: jenkins.build-env.svc.cluster. > local > at org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.resolve( > JnlpAgentEndpointResolver.java:161) > at hudson.remoting.Engine.innerRun(Engine.java:495) > at hudson.remoting.Engine.run(Engine.java:447) > Caused by: java.net.UnknownHostException: jenkins.build-env.svc.cluster. > local > at java.net.AbstractPlainSocketImpl.connect( > AbstractPlainSocketImpl.java:184) > at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) > at java.net.Socket.connect(Socket.java:589) > 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:1202) > at sun.net.www.protocol.http.HttpURLConnection.plainConnect0( > HttpURLConnection.java:1138) > at sun.net.www.protocol.http.HttpURLConnection.plainConnect( > HttpURLConnection.java:1032) > at sun.net.www.protocol.http.HttpURLConnection.connect( > HttpURLConnection.java:966) > at org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.resolve( > JnlpAgentEndpointResolver.java:158) > ... 2 more > > It looks seem DNS can't solve name issue? or? > But, in minikube environment, there is no this problem... > > Thanks very much. > > Hong > > -- > 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 jenkinsci-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/jenkinsci-users/CADLWyO2XJG-50ouKNe7yVm6BiQ_- > cYoxQQrWg7P2iRRX7FZ%3DAA%40mail.gmail.com > <https://groups.google.com/d/msgid/jenkinsci-users/CADLWyO2XJG-50ouKNe7yVm6BiQ_-cYoxQQrWg7P2iRRX7FZ%3DAA%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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 jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CALHFn6MzS_EW_Fn4CQYb%2BRhi4xk7C7kuJ%2BBV-HjD%2Byp8b%3DaTvw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.