Only 1 Windows Slave is allowed by Jenkins?? Unexpected error in launching a slave

511 views
Skip to first unread message

Voll AufMühlen

unread,
Mar 8, 2016, 9:26:56 AM3/8/16
to Jenkins Users
Hi there,

hope that you can help me out :)

my Configuration : Jenkins Master, Version: 1.651 (Ubuntu 14.04 LTS 64bit)
    Launching via: JNLP
    Java Version: 1.80_65
    Windows Slave Plugin: 1.1

   
it's 3 days now that i have searched the whole internet, but couldn't find an answer to my problem.

The Problem. I have several Linux slaves that are connecting with jenkins master without a problem. And I have one Windows 2012 RS slave that is working without problems. But when I try to add a new windows slave (again Windows 2012 R2), (with JNLP) I always receive an error.

I tried everything. Using the jenkins URL ....using Jenkins IP instead....shutting down the firewall on windows slave. There is no proxy on the network.

My thoughts are.....The Jenkins Master is trying to connect with every Windows Jenkins Slave using the same port and that is the problem here.


--------------------------------------------------------------------------


C:\Windows\system32>"C:\Program Files\Java\jre1.8.0_65\bin\java.exe" -jar C:\jenkins\slave.jar -jnlpUrl  https://jenkins.de/computer/JSlave/slave-agent.jnlp -secret 961XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
hudson.remoting.jnlp.Main createEngine
INFO: Setting up slave:
hudson.remoting.jnlp.Main$CuiListener <init>
INFO: Jenkins agent is running in headless mode.
hudson.remoting.jnlp.Main$CuiListener status
INFO: Locating server among [https://jenkins.de/]
hudson.remoting.jnlp.Main$CuiListener status
INFO: Handshaking
hudson.remoting.jnlp.Main$CuiListener status
INFO: Connecting to jenkins.de:58844 (retrying:2)
java.net.ConnectException: Connection timed out: connect
        at java.net.DualStackPlainSocketImpl.connect0(Native Method)
        at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
        at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
        at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
        at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
        at java.net.PlainSocketImpl.connect(Unknown Source)
        at java.net.SocksSocketImpl.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at java.net.Socket.<init>(Unknown Source)
        at java.net.Socket.<init>(Unknown Source)
        at hudson.remoting.Engine.connect(Engine.java:327)
        at hudson.remoting.Engine.run(Engine.java:235)




---------------------------------------------------------------------------------------------------------------

And here is the log outpout on the Jenkins Master:

/var/lib/jenkins/logs/slaves/JSlave/slave.log

Verbinde zu JSlave
ERROR: Unerwarteter Fehler beim Starten eines Slave-Prozesses aufgetreten. Vermutlich handelt es sich um einen Fehler in Jenkins.
ha:CCCAAAWB+XXXXXLCAAAAAXAAAP9bXXX/DDDSXSSS/XXXXXb5MSSSSSSXXXXX=java.net.UnknownHostException: JSlave: 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 java.net.InetAddress.getByName(InetAddress.java:1076)
        at hudson.os.windows.ManagedWindowsServiceLauncher.launch(ManagedWindowsServiceLauncher.java:190)
        at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:253)
        at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
        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)


---------------------------------------------------------------------------------------------------------------

Can someone tell me where the problem is?

jpd4nt

unread,
Mar 8, 2016, 11:17:38 AM3/8/16
to Jenkins Users
Hi.

Rough guess it network issue, ie jenkins is not listening on port 58844 due to firewall or some issue.

Not used the windows slave plugin as I use ec2 plugin but that uses the same slave-agent.jnlp.

Use telnet to see if the socket is open from the windows box back to the jenkins master.
35

Voll AufMühlen

unread,
Mar 9, 2016, 5:17:18 AM3/9/16
to Jenkins Users
@jpd4nt

Thanks for the quick answer.

On the windows machines, the firewall is disabled. Therefore...all ports are open.

I checked with telnet on the windows slave if the connection to the jenkins master is open. And yes, i can connect to the jenkins master on port 58844.

Any other guesses ?

jpd4nt

unread,
Mar 9, 2016, 11:01:11 AM3/9/16
to Jenkins Users
Packet sniff between master and windows slave to make sure its actually talking, as that the error.

Otherwise it could be a bug in the plugin.
24

Voll AufMühlen

unread,
Mar 10, 2016, 2:38:24 AM3/10/16
to Jenkins Users
@jpd4nt

I used wireshark to see to who the Jenkins Windows Slave is really talking to when it says that it is talking with the master (https://xxx.jenkins.de/....). And saw that the handshake happens with the gateway and never reaches the IP of the master. The gateway don't know the right IP address for the https://xxx.jenkins.de/ Master.

I then edited the hosts file of the 'Jenkins windows slave' and told him what the correct IP of https://xxx.jenkins.de/ is and after that the Jenkins slave immediately connected with the Jenkins master :) Now it is working again.

Thank you again for your help and the hints where to search for the problem !!!!

jpd4nt

unread,
Mar 10, 2016, 11:13:35 AM3/10/16
to Jenkins Users
Hi Voll.

No problems.
20

Vinay Sharma

unread,
Sep 19, 2016, 2:46:06 AM9/19/16
to Jenkins Users
Hi Voll AufMühlen,

I have been trying to configure Jenkins to launch Windows EC2 instances.
I have had success only with linux instances.

With windows instances I have been unsuccessful. My Jenkins is able to launch the windows instance, but post that, nothing happens. The windows instance
is launched(as I can see on my AWS console). But the slave node(this windows ec2 node) never comes online.

Also, a few weeks ago I tried this activity, when I received the error with WinRM; the node was lunched but jenkins was not able to connect to this node.

Since you have been able to connect your windows ec2 instance with your Jenkins; can you please help me configure the same.

Which plugin do you use in Jenkins for connecting to AWS cloud?
Settings you have done in (Jenkins configure) cloud option.
Settings needed on AWS?
How do you manage the authentication(User name and password for your windows EC2 slaves.0

It will be really helpful if you can help me with the same.

Thanks and regards,
Vinay Sharma

vint...@gmail.com
Reply all
Reply to author
Forward
0 new messages