how to configure a jenkins slave node

351 views
Skip to first unread message

ycollet

unread,
Aug 27, 2013, 2:16:14 AM8/27/13
to jenkins...@googlegroups.com
Hello,

I've got some questions related to the configuration of a jenkins slave node (I already dig into the wiki and I have a nearly working duo master / slave).

The first one: do I need to install jenkins on the slave node or do the master will copy all the required jar files into the good directory when the jenkins slave is started up ?

The second one: do I need to turn on some special options in my sshd config file ? Because, up to now, I was not able to perform a checkout on my slave (I can connect to the slave via ssh, I can perform a manual checkout on the slave, but the checkout doesn't seems to work via jenkins).
The work around I found is to use a pre build ssh command to create the working copy.

The last one: for the build step, I first selected "use a shell script" and add my cmake + make commands in. But it doesn't work. The only solution I found is to use a ssh command.

Best regards,

YC

ycollet

unread,
Aug 27, 2013, 2:18:19 AM8/27/13
to jenkins...@googlegroups.com

I forgot to add: my master use windows and is up to date (jenkins + plugins).
The slave node use debian 6 and is up to date too.

david....@barclays.com

unread,
Aug 27, 2013, 3:49:56 AM8/27/13
to jenkins...@googlegroups.com

I’ve not configured a master/slave from windows to linux, but when setting up your slave it should deploy the necessary slave.jar etc onto your slave machine, and start them automatically. I assume you’re launching via ssh and have specified some or all of the

 

 Host 

  Username  

  Password  

  Private Key File  

  Port 

 

Does the slave node run? Before you try running the build job?

 

It should run on the slave and not require ssh to run your commands.

 

dD

--
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/groups/opt_out.


This e-mail and any attachments are confidential and intended solely for the addressee and may also be privileged or exempt from disclosure under applicable law. If you are not the addressee, or have received this e-mail in error, please notify the sender immediately, delete it from your system and do not copy, disclose or otherwise act upon any part of this e-mail or its attachments.

Internet communications are not guaranteed to be secure or virus-free.
The Barclays Group does not accept responsibility for any loss arising from unauthorised access to, or interference with, any Internet communications by any third party, or from the transmission of any viruses. Replies to this e-mail may be monitored by the Barclays Group for operational or business reasons.

Any opinion or other information in this e-mail or its attachments that does not relate to the business of the Barclays Group is personal to the sender and is not given or endorsed by the Barclays Group.

Barclays Bank PLC.Registered in England and Wales (registered no. 1026167).
Registered Office: 1 Churchill Place, London, E14 5HP, United Kingdom.

Barclays Bank PLC is authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and the Prudential Regulation Authority (Financial Services Register No. 122702).

ycollet

unread,
Aug 27, 2013, 3:58:47 AM8/27/13
to jenkins...@googlegroups.com
Hello,

I started the slave via the master and everything is OK.
I can see the master deploying the necessary jar and waiting.

When I submit my job on the slave, a ssh communication occurs because the directory of the job is correctly created. But right after this, an error is printed.
Here is the message I've got:

Started by user anonymous
[EnvInject] - Loading node environment variables.
Building remotely on Compilation Debian 6 64 bits - 2 in workspace /home/admin/jenkins/workspace/TESTLinux
hudson.util.IOException2: remote file operation failed: /home/admin/jenkins/workspace/TESTLinux at hudson.remoting.Channel@1cc380ca:Compilation Debian 6 64 bits - 2
	at hudson.FilePath.act(FilePath.java:905)
	at hudson.FilePath.act(FilePath.java:882)
	at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:743)
	at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:685)
	at hudson.model.AbstractProject.checkout(AbstractProject.java:1408)
	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:676)
	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:581)
	at hudson.model.Run.execute(Run.java:1603)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
	at hudson.model.ResourceController.execute(ResourceController.java:88)
	at hudson.model.Executor.run(Executor.java:247)
Caused by: java.io.IOException: Remote call on Compilation Debian 6 64 bits - 2 failed
	at hudson.remoting.Channel.call(Channel.java:723)
	at hudson.FilePath.act(FilePath.java:898)
	... 11 more
Caused by: java.lang.NoClassDefFoundError: jenkins.model.Jenkins
	at hudson.scm.SubversionSCM.createDefaultSVNOptions(SubversionSCM.java:844)
	at hudson.scm.SubversionSCM.createClientManager(SubversionSCM.java:834)
	at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:766)
	at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:753)
	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2417)
	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
	at hudson.remoting.Request$2.run(Request.java:326)
	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
	at java.lang.Thread.run(Thread.java:662)
Archiving artifacts
Finished: FAILURE


If I start everything using a ssh command (the svn checkout + the build) the project builds fine.

YC

ycollet

unread,
Aug 27, 2013, 4:44:12 AM8/27/13
to jenkins...@googlegroups.com
I was looking at the jenkins system logs and I saw some interesting messages:

2 error messages: one related to monitoring free disk space and the other one related to free temp space.
On the slave, I've got jdk1.6.0.45 installed.

Do I need to install a specific plugin to monitor the free space on the slave ?

YC

Failed to monitor Compilation Debian 6 64 bits - 2 for Free Disk Space
java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: Could not initialize class jenkins.model.Jenkins$MasterComputer
	at hudson.remoting.Channel$3.adapt(Channel.java:747)
	at hudson.remoting.Channel$3.adapt(Channel.java:742)
	at hudson.remoting.FutureAdapter.get(FutureAdapter.java:59)
	at hudson.node_monitors.AbstractAsyncNodeMonitorDescriptor.monitor(AbstractAsyncNodeMonitorDescriptor.java:97)
	at hudson.node_monitors.AbstractNodeMonitorDescriptor$Record.run(AbstractNodeMonitorDescriptor.java:282)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class jenkins.model.Jenkins$MasterComputer
	at hudson.FilePath.act(FilePath.java:909)
	at hudson.FilePath.act(FilePath.java:882)
	at hudson.FilePath$9.call(FilePath.java:1017)
	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
	at hudson.remoting.Request$2.run(Request.java:326)
	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
	at java.lang.Thread.run(Thread.java:662)




ycollet

unread,
Aug 28, 2013, 1:50:16 AM8/28/13
to jenkins...@googlegroups.com
Do I need to install jenkins on the slave or not ?

Andrew Melo

unread,
Aug 28, 2013, 2:12:01 AM8/28/13
to jenkins...@googlegroups.com
You'll need to have the JVM installed, but if you're running the slaves via the SSH plugin, you won't need to install jenkins on the slaves. Jenkins will transfer over the jar file and run it for you

hth,
Andrew


On Wed, Aug 28, 2013 at 12:50 AM, ycollet <jean.k...@gmail.com> wrote:
Do I need to install jenkins on the slave or not ?

--
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/groups/opt_out.



--
--
Andrew Melo

ycollet

unread,
Aug 28, 2013, 3:13:36 AM8/28/13
to jenkins...@googlegroups.com
Thanks for the answer.
I am able to connect to the node, but the project doesn't work.
The only project I am able to start is a project which is based on ssh commands:
- svn performed via a post_build ssh command
- build performed via a ssh command.

The jenkins / svn command fails and the shell command fails too.

YC

Andrew Melo

unread,
Aug 28, 2013, 3:16:00 AM8/28/13
to jenkins...@googlegroups.com
Does your svn repository require authentication of some kind? I'm not an expert, but the stack trace makes it seem like svn is balking when it tries to do a checkout. It's possible the user on your slave doesn't have the right credentials


--
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/groups/opt_out.



--
--
Andrew Melo

ycollet

unread,
Aug 28, 2013, 3:27:20 AM8/28/13
to jenkins...@googlegroups.com
I use the "same" command line in the post_build step as in the svn one.
I use a public key to perform the authentication and the credential is normally correctly stored in jenkins (I click on the question mark + click on the link to store the credential).
I wanted to find more verbose messages in the log, but I don't find any way to trigger simply debug messages in the ssh connect + svn co.
I tried something like

ssh m...@192.168.0.2 svn co svn+ssh://m...@192.168.0.3/home/projects/subversion/MyProject/trunk MyProject

And the co went fine.

YC

ycollet

unread,
Aug 28, 2013, 3:34:16 AM8/28/13
to jenkins...@googlegroups.com

Is there any prerequisite in the sshd configuration of the slave ?
Do I need to activate some specific protocols ?
Do I need to turn on some options ?
I know that svnkit is used by jenkins to perform the svn step, maybe it needs some specific options wrt to sshd config ?

YC
Reply all
Reply to author
Forward
0 new messages