Linux machine failed to connect slave from mac machine connection in Jenkins?
Asked Answered
H

1

0

Installed Jenkins on Linux machine and jenkins hosted on name say jiort04:8080. Created slave name it as mac-slave in Jenkins and launch method used it as Launch agent via Java Web Start Method and necessary configurations are added. However, it failed to connect to slave said logs and error attached below screen-shot.enter image description here

Log

`

java.net.UnknownHostException: jiort04
 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 java.net.Socket.connect(Socket.java:538)
 at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
 at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
 at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
 at sun.net.www.http.HttpClient.<init>(HttpClient.java:211)
 at sun.net.www.http.HttpClient.New(HttpClient.java:308)
 at sun.net.www.http.HttpClient.New(HttpClient.java:326)
 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$6.run(HttpURLConnection.java:1022)
 at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1020)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.security.AccessController.doPrivilegedWithCombiner(AccessController.java:782)
 at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1019)
 at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:966)
 at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1546)
 at sun.net.www.protocol.http.HttpURLConnection.access$200(HttpURLConnection.java:91)
 at sun.net.www.protocol.http.HttpURLConnection$9.run(HttpURLConnection.java:1466)
 at sun.net.www.protocol.http.HttpURLConnection$9.run(HttpURLConnection.java:1464)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.security.AccessController.doPrivilegedWithCombiner(AccessController.java:782)
 at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1463)
 at com.sun.deploy.net.HttpUtils.followRedirects(Unknown Source)
 at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
 at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
 at com.sun.deploy.net.BasicHttpRequest.doGetRequest(Unknown Source)
 at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
 at com.sun.deploy.net.DownloadEngine.downloadResource(Unknown Source)
 at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
 at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
 at com.sun.javaws.LaunchDownload$DownloadTask.call(Unknown Source)
 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
 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)

`

Hipparch answered 26/5, 2017 at 6:26 Comment(1)
There are already a few posts which might cover your problem. Try downloading the jlnp file jenkins-ci.361315.n4.nabble.com/… or #14278012Paleontology
W
1

enter image description hereTry this: manage-jenkins -> manage-nodes -> configure -> Host :

put ip of slave here

Setup ssh between master and slave. And if you are using any user credential as shown in image then update ssh key inside user credential.

Woodborer answered 26/5, 2017 at 6:39 Comment(9)
under ManageNodes-> configure no option such as Host. Are you talking about particular node configure still no Host option seen.Hipparch
Launch method is sshWoodborer
you have to setup ssh connection between two machines.Woodborer
okay configured Do i have to now launch agent from mac m/c only ? Because cordova using as project and ios platform build to generate it using mac m/c.Hipparch
@Avi- getting an following an error [05/26/17 07:57:52] [SSH] Opening SSH connection to 10.5.0.165:22. Cannot find SSH User credentials with id: null [05/26/17 07:57:52] Launch failed - cleaning up connection [05/26/17 07:57:52] [SSH] Connection closed.Hipparch
@Avi-After adding Credentials using Git and generated access token which is used as password while creating credentials now selected credential under Host- ip address. Failed due to say, [05/26/17 08:03:10] [SSH] Opening SSH connection to 10.5.0.165:22. ERROR: Failed to authenticate as *******. Wrong password. (credentialId: 4bbb0ed1f5b6c8967BT-2a2d-402d-b9e3-4bbb0ed1f5b6/method:password) [05/26/17 08:03:12] [SSH] Authentication failed. Authentication failed.Hipparch
I have done something like this you can try. Jenkins->credentials->click on your username -> update --> and you will know what to do. I tried add ssh key directly.Woodborer
#44197212 trying to do the same. I am getting following an error stiil, thanks. Also had look at this linuxacademy.com/community/posts/show/topic/… but not getting solution where to check.Hipparch
Thanks but still getting same problem didn't get solutionHipparch

© 2022 - 2024 — McMap. All rights reserved.