Help with Slaves: How to configure

73 views
Skip to first unread message

Ana MB

unread,
Mar 22, 2018, 8:00:47 AM3/22/18
to Jenkins Users
Hi guys! 

I'm fighting to configure slaves in my Jenkins, but I am not able to do it....
One of my proofs is the following, but I can't make it work.

Tell me what I'm doing wrong please... I'm turning crazy...
Thanks so much for your help...

I've changed the kind of "Launch method", but I've got the same result -> WRONG!

Thanks guys!

Mark Waite

unread,
Mar 22, 2018, 8:48:22 AM3/22/18
to jenkins...@googlegroups.com
It appears that you're launching a JNLP based agent from the master without providing the JNLP URL of the Jenkins master.  The -jnlpURL argument needs a value.

It also appears that you're using an outdated name for the jar file.  I believe it is now called "agent.jar" instead of "slave.jar".

I'm not sure why you'd launch an agent from the master without having that agent run somewhere else (on another machine, for example).  Is this an experiment, or intentional?

Refer to https://wiki.jenkins.io/display/JENKINS/Distributed+builds#Distributedbuilds-Launchagentheadlessly .  

--
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-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/ffa2e08a-e931-401a-8447-6fe44cd840ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ana MB

unread,
Mar 22, 2018, 8:57:18 AM3/22/18
to Jenkins Users
I'm pretty new in this field, so.... I don't know what I'm doing clearly. I read about it but I don't know how to do it works.

What argument is needed for -jnlpURL?

Thanks so much!!!

Mark Waite

unread,
Mar 22, 2018, 9:46:31 AM3/22/18
to jenkins...@googlegroups.com
On Thu, Mar 22, 2018 at 6:57 AM Ana MB <ama...@bufetedemarketing.com> wrote:
I'm pretty new in this field, so.... I don't know what I'm doing clearly. I read about it but I don't know how to do it works.

What argument is needed for -jnlpURL?


 the JNLP URL of the Jenkins master .


Mark Waite
 

Ana MB

unread,
Mar 22, 2018, 11:06:54 AM3/22/18
to Jenkins Users
This is what I've done and I tried writing:
 $ java -jar agent.jar -jnlpUrl http://yourserver:port/computer/agent-name/slave-agent.jnlp

But it's still showing:


And I don't know to resolve it...

Thanks so much.

Mark Waite

unread,
Mar 22, 2018, 11:15:35 AM3/22/18
to jenkins...@googlegroups.com
The picture says "unable to access agent.jar".  I think that means you need to download the agent.jar file into the directory where you are running the command which launches that agent.

I continue to believe that you may be making a more fundamental mistake than the command line arguments.

If you want to run an agent, and that agent is a Linux agent (or FreeBSD or macOS or Solaris or Raspbian or ...), then my first preference is to use the "ssh based" technique to start the agent, instead of using the JNLP based technique to start the agent.

If you want to run an agent and that agent is Windows, then you'll need to use the JNLP based method.  In my small environments, I've preferred to configure Windows agents to launch themselves from a command line on the Windows agent computer, rather than trying to make the Jenkins master start the agent.

Mark Waite

Burrows, John

unread,
Mar 22, 2018, 11:16:59 AM3/22/18
to jenkins...@googlegroups.com

Make sure the agent.jar file is located in the location where you are running the java command from.

 

You can manually download the agent.jar file from http://YOURSERVERNAME/jnlpJars/agent.jar

 

Thanks,

John


For more options, visit https://groups.google.com/d/optout.



This email message and any attachments may contain confidential, proprietary or non-public information. The information is intended solely for the designated recipient(s). If an addressing or transmission error has misdirected this email, please notify the sender immediately and destroy this email. Any review, dissemination, use or reliance upon this information by unintended recipients is prohibited. Any opinions expressed in this email are those of the author personally.

Burrows, John

unread,
Mar 22, 2018, 11:19:42 AM3/22/18
to jenkins...@googlegroups.com

I agree with Mark 100%, and have found the best way for Windows Jenkins Nodes, is to launch the JNLP Jenkins Agent using Windows Task Scheduler set on System Startup.

 

We (my company) uses SSH to launch non-Windows Agents and JNLP for Windows Agents. We have more than a dozen Jenkins Masters and close to 100 Jenkins Agents.

 

Thanks,

John

 

 

From: jenkins...@googlegroups.com [mailto:jenkins...@googlegroups.com] On Behalf Of Mark Waite
Sent: Thursday, March 22, 2018 11:15 AM
To: jenkins...@googlegroups.com
Subject: Re: Help with Slaves: How to configure

 

The picture says "unable to access agent.jar".  I think that means you need to download the agent.jar file into the directory where you are running the command which launches that agent.


For more options, visit https://groups.google.com/d/optout.

Ana MB

unread,
Mar 22, 2018, 12:20:37 PM3/22/18
to Jenkins Users
Thanks guys!

My company only uses Linux, so I can't launch JNLP from Windows Scheduler...

I'll try to download the agen.jar into the right folder.

Thanks so much....!!!!

Burrows, John

unread,
Mar 22, 2018, 12:42:28 PM3/22/18
to jenkins...@googlegroups.com

Ana,

 

If you are using Linux, then the suggested connectivity method to the Jenkins Master is SSH, download the SSH Slaves Plugin & SSH Credentials Plugin, and then change your Jenkins Node configuration to utilize “Launch slave agents via SSH” as shown in the accompanying screenshot:

 

 


For more options, visit https://groups.google.com/d/optout.

Ana MB

unread,
Mar 23, 2018, 3:53:53 AM3/23/18
to Jenkins Users
Hi!

I did it and now, there's a new error:

And 3 minutes later the error is:



How could I solve it?

Thanks soooo much!!!!!

Burrows, John

unread,
Mar 23, 2018, 7:01:42 AM3/23/18
to jenkins...@googlegroups.com
Ana,

You need to ensure that the credentials you are choosing in the server configuration page are valid. It looks like you are not using a valid User ID and Password that allows the connection via SSH.

John
--
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-use...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages