Failed to obtain Jenkins slave

368 views
Skip to first unread message

mani Punnavalli

unread,
Aug 20, 2020, 10:45:44 AM8/20/20
to robotframework-users

In my scenario Jenkins master is available in Linux machine and i can access this in my Local windows machine also. I created one windows slave using launch method as "Launch agent by connecting to the master".As per guidelines , i created one folder in my windows and i pasted that slave and agent jars in that folder.

While I am trying to run the slave-agent i am getting error like below. (Screenshot attached) I tried with 2nd option as well i.e i took the provided command in Jenkins slave and i pasted that into command. again it is giving failed to connect error message. Please find below error message.

I am new to this configuration. Do i need provide my slave machine ip into the master machine or do i need to install any other things related to this. can someone please help me out.

Failed to obtain http://ip:7394839:computer/winslave1/slave-agent.jnlp?encrypt=true
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....etc


Hélio Guilherme

unread,
Aug 20, 2020, 11:26:08 AM8/20/20
to robotframework-users

I don't use Jenkins recently, but the connection used to include a secret created as shown in the node manager of Jenkins.
This is an example of my Windows slave connector:
java -jar D:\Jenkins\agent.jar -jnlpUrl http://IP_Version_4_of_Jenkins_Master:8080/computer/My_slave_node_name_Windows10/slave-agent.jnlp -secret anHexadecimal_Long_Number5d094b1f577bc772b65b7277ac57 -workDir "D:\Jenkins"

Prajakta Mhatre

unread,
Aug 20, 2020, 12:25:54 PM8/20/20
to heliox...@gmail.com, robotframework-users
Please also check that the Firewall (on both master and slave machines) is not blocking the communication. You can create inbound and outbound rules if needed.

--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/robotframework-users/b733f165-71e1-4ba5-af63-8cd1866ba0c0n%40googlegroups.com.

mani Punnavalli

unread,
Aug 21, 2020, 12:46:50 AM8/21/20
to robotframework-users
Yes, Guilherme,

In my scenario also it is proving cmd like this. Slave name with secrete key. I tried with the same in my windows slave. Still i can't access this and getting above error. 

mani.pun...@gmail.com

unread,
Aug 21, 2020, 4:12:34 AM8/21/20
to robotframework-users
@ Prajakta Mhatre 
 I checked that windows firewall. there is no blockers for this server and if there is any blocker we may get the notification.

Prajakta Mhatre

unread,
Aug 21, 2020, 4:51:46 AM8/21/20
to mani.pun...@gmail.com, robotframework-users
I faced the same issue while trying to implement the master/slave architecture on Jenkins. The only difference was both master and slave were Windows machines.
My Jenkins was running on 8282 port.
I created an outbound rule on the master system and allowed 8282 to send the traffic out. And then created an inbound rule on the slave system and allowed 8282 to accept the communication from all the tcp/ip ports.
On the slave machine executed the command as mentioned by Guilherme and the connection was successful!


On Fri, 21 Aug 2020, 1:42 pm mani.pun...@gmail.com, <mani.pun...@gmail.com> wrote:
@ Prajakta Mhatre 
 I checked that windows firewall. there is no blockers for this server and if there is any blocker we may get the notification.

On Friday, August 21, 2020 at 10:16:50 AM UTC+5:30 mani.pun...@gmail.com wrote:
Yes, Guilherme

--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.

mani Punnavalli

unread,
Aug 21, 2020, 5:26:45 AM8/21/20
to Prajakta Mhatre, robotframework-users
I found one more issue. My jenkins server ip is some120.231.140 , but while we are creating a new slave , this ip address changed as 141. For 140 ip addresses they are giving server access in GCP. So if it is generating new ip that does mean it is creating a new server. If it is creating a new server for every slave , we need to provide the access in the cloud. 

@Prajakta Is it expected behavior or is there any issue .

Prajakta Mhatre

unread,
Aug 21, 2020, 5:55:08 AM8/21/20
to mani Punnavalli, robotframework-users
I am not sure about this behaviour.
You can just try running the command on the slave server with your master's IP address.... so in this case it will be something like this:

java -jar D:\Jenkins\agent.jar -jnlpUrl http://120.231.140:8080/computer/My_slave_node_name_Windows10/slave-agent.jnlp -secret anHexadecimal_Long_Number5d094b1f577bc772b65b7277ac57 -workDir "D:\Jenkins"

Make sure the remote work directory you are providing is on the slave machine.

mani Punnavalli

unread,
Aug 21, 2020, 6:01:43 AM8/21/20
to Prajakta Mhatre, robotframework-users
If i try with java -jar D:\Jenkins\agent.jar -jnlpUrl http://120.231.140:8080/computer/My_slave_node_name_Windows10/slave-agent.jnlp -secret anHexadecimal_Long_Number5d094b1f577bc772b65b7277ac57 -workDir "D:\Jenkins"

It will launch master right ? but whatever slave i created for that cmd is java -jar D:\Jenkins\agent.jar -jnlpUrl http://120.231.141:8080/computer/My_slave_node_name_Windows10/slave-agent.jnlp -secret anHexadecimal_Long_Number5d094b1f577bc772b65b7277ac57 -workDir "D:\Jenkins"

There is change in IP for slave and master. If i launch the slave ip from the cmd we are getting a timed out error. 

Regarding path i provided a valid path in directory.

Hélio Guilherme

unread,
Aug 21, 2020, 6:19:14 AM8/21/20
to robotframework-users

You have a big problem, or I am not getting it right.
- Your master server should have known or static IP
- Your master server is not started by that script.
- The master must have been started and ready to accept connections from nodes.

mani Punnavalli

unread,
Aug 21, 2020, 6:29:03 AM8/21/20
to heliox...@gmail.com, robotframework-users
Hi Prajakta,

As you suggested I tried by changing Ip. Instead of launching with slave ip. I launched with Master ip. Event launched successfully. 
but i am not sure why it is generating separate IP while we are creating slaves.


Reply all
Reply to author
Forward
0 new messages