Try to test beyond ping.
As the error message indicate:
curl
http://xxxxxxx.ap-southeast-1.compute.amazonaws.com:8080/tcpSlaveAgentListener/
You should get something.

In Jenkins master, Configure Global Security -> Agent -> TCP port for
inbound agents, the default value is 50000.
Try to curl the 50000 port too
for example:
# curl http://xxxx:50000
Jenkins-Agent-Protocols: JNLP4-connect, Ping
Jenkins-Version: 2.176.4
Jenkins-Session: c0470948
Client: 10.0.181.80
Server: 10.0.78.182
Remoting-Minimum-Version: 3.4



On Thu, Feb 6, 2020 at 9:09 AM adrian lee <[email protected]> wrote:

>  I ran a pod in my cluster  exec the pod and ping my jenkins with no issue.
>
>
> On Thu, Feb 6, 2020 at 1:24 PM Liejun Tao <[email protected]> wrote:
>
>> Suggest to run a test pod from your cluster and check network
>> connectivity to your jenkins,
>> http://ec2-18-140-64-62.ap-southeast-1.compute.amazonaws.com:8080/
>> <http://ec2-18-140-64-62.ap-southeast-1.compute.amazonaws.com:8080/tcpSlaveAgentListener/>
>>
>> On Wed, Feb 5, 2020 at 7:57 PM adrian lee <[email protected]> wrote:
>>
>>>
>>>
>>> On Thursday, February 6, 2020 at 9:53:53 AM UTC+8, adrian lee wrote:
>>>>
>>>> Hi all
>>>>
>>>> I am trying to use jenkins and kubernetes plugin. I deployed a
>>>> kubernetes cluster in AWS using kubeadm and I installed jenkins on a EC2 
>>>> VM.
>>>>
>>>>
>>>> I configured the plugin such that its using Kubernetes server
>>>> certificate key to connect
>>>>
>>>>
>>>> I am trying to initiate the deployment of pods in the kubernetes
>>>> clusters using pipelines in jenkins.
>>>>
>>>> However I keep getting an agent time out
>>>>
>>>>
>>>> Any help?
>>>>
>>>> Error in provisioning; agent=KubernetesSlave name: mypod-j3d11-nwjvt, 
>>>> template=PodTemplate{, name='mypod-j3d11', label='mypod', 
>>>> nodeUsageMode=EXCLUSIVE, workspaceVolume=EmptyDirWorkspaceVolume 
>>>> [memory=false], containers=[ContainerTemplate{name='golang', 
>>>> image='golang:1.8.0', command='cat', ttyEnabled=true}], 
>>>> annotations=[org.csanchez.jenkins.plugins.kubernetes.PodAnnotation@aab9c821]}.
>>>>  Container jnlp exited with error 255. Logs: Feb 06, 2020 1:32:28 AM 
>>>> org.jenkinsci.remoting.engine.WorkDirManager setupLogging
>>>> INFO: Both error and output logs will be printed to 
>>>> /home/jenkins/agent/remoting
>>>> Feb 06, 2020 1:32:28 AM hudson.remoting.jnlp.Main$CuiListener status
>>>> INFO: Locating server among 
>>>> [http://xxxxxxx.ap-southeast-1.compute.amazonaws.com:8080/]
>>>> Feb 06, 2020 1:32:58 AM hudson.remoting.jnlp.Main$CuiListener error
>>>> SEVERE: Failed to connect to 
>>>> http://xxxxxxx.ap-southeast-1.compute.amazonaws.com:8080/tcpSlaveAgentListener/:
>>>>  connect timed out
>>>> java.io.IOException: Failed to connect to 
>>>> http://ec2-18-140-64-62.ap-southeast-1.compute.amazonaws.com:8080/tcpSlaveAgentListener/:
>>>>  connect timed out
>>>>    at 
>>>> org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.resolve(JnlpAgentEndpointResolver.java:206)
>>>>    at hudson.remoting.Engine.innerRun(Engine.java:527)
>>>>    at hudson.remoting.Engine.run(Engine.java:488)
>>>> Caused by: java.net.SocketTimeoutException: connect timed out
>>>>    at java.net.PlainSocketImpl.socketConnect(Native Method)
>>>>    at 
>>>> java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
>>>>    at 
>>>> java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
>>>>    at 
>>>> java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
>>>>    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:1220)
>>>>    at 
>>>> sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1156)
>>>>    at 
>>>> sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1050)
>>>>    at 
>>>> sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:984)
>>>>    at 
>>>> org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.resolve(JnlpAgentEndpointResolver.java:203)
>>>>    ... 2 more
>>>>
>>>>
>>>>
>>>> Feb 06, 2020 1:32:59 AM WARNING 
>>>> org.csanchez.jenkins.plugins.kubernetes.KubernetesLauncher launch
>>>>
>>>> Error in provisioning; agent=KubernetesSlave name: mypod-j3d11-nwjvt, 
>>>> template=PodTemplate{, name='mypod-j3d11', label='mypod', 
>>>> nodeUsageMode=EXCLUSIVE, workspaceVolume=EmptyDirWorkspaceVolume 
>>>> [memory=false], containers=[ContainerTemplate{name='golang', 
>>>> image='golang:1.8.0', command='cat', ttyEnabled=true}], 
>>>> annotations=[org.csanchez.jenkins.plugins.kubernetes.PodAnnotation@aab9c821]}
>>>> java.lang.IllegalStateException: Containers are terminated with exit 
>>>> codes: {jnlp=255}
>>>>    at 
>>>> org.csanchez.jenkins.plugins.kubernetes.KubernetesLauncher.checkTerminatedContainers(KubernetesLauncher.java:224)
>>>>    at 
>>>> org.csanchez.jenkins.plugins.kubernetes.KubernetesLauncher.launch(KubernetesLauncher.java:181)
>>>>    at hudson.slaves.SlaveComputer.lambda$_connect$0(SlaveComputer.java:292)
>>>>    at 
>>>> jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
>>>>    at 
>>>> jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:71)
>>>>    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>>>>    at 
>>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>>>>    at 
>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>>>>    at java.lang.Thread.run(Thread.java:748)
>>>>
>>>>
>>>>
>>>> this is my template below which I am using in my pipeline
>>>>
>>>> podTemplate(cloud: 'kubernetes', label: 'mypod',containers: [
>>>>     containerTemplate(name: 'golang', image: 'golang:1.8.0', ttyEnabled: 
>>>> true, command: 'cat')
>>>>   ]) {
>>>>
>>>>     node('mypod') {
>>>>
>>>>         stage('Get a Golang project') {
>>>>             git url: 'https://github.com/hashicorp/terraform.git'
>>>>             container('golang') {
>>>>                 stage('Build a Go project') {
>>>>                     sh 'echo hello world'
>>>>                 }
>>>>             }
>>>>         }
>>>>
>>>>     }
>>>> }
>>>>
>>>> --
>>> 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/bef526e0-ed81-41ea-be2c-909e77b9adb7%40googlegroups.com
>>> <https://groups.google.com/d/msgid/jenkinsci-users/bef526e0-ed81-41ea-be2c-909e77b9adb7%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>
>>
>> --
>> Thanks,
>> Baibai
>>
>> --
>> 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/CAMRm5jbyJnwdUxiYRd6hYqg8H-PLrzSg4uA1o%3DF2yObKriCgBw%40mail.gmail.com
>> <https://groups.google.com/d/msgid/jenkinsci-users/CAMRm5jbyJnwdUxiYRd6hYqg8H-PLrzSg4uA1o%3DF2yObKriCgBw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> 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/CAJi3E4QeV_Bs-eH2pWh_aHrfUbbvAhTS8syrsKDKGyfQrD5Zcw%40mail.gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-users/CAJi3E4QeV_Bs-eH2pWh_aHrfUbbvAhTS8syrsKDKGyfQrD5Zcw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Thanks,
Baibai

-- 
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/CAMRm5jYXJCZrcUZE9M%2BVEC7yoSyo4Su_o3i%2BuwJUf1Ayg-VnxQ%40mail.gmail.com.

Reply via email to