Debug connection between node and master

2,012 views
Skip to first unread message

ycollet

unread,
Sep 2, 2013, 6:12:40 AM9/2/13
to jenkins...@googlegroups.com
Hello,

I have started a Linux node via ssh.
On the node, I can see the jars copied from jenkins in the directory I specified for the node and the log when I start the node seems OK.
I also can see the "java -jar slave.jar" running.

When I start a job, a job directory is created in workspace and then every command I started in my fails (excepted ssh ones).
I first try a svn checkout and I've got an error.
Then, I disabled the svn checkout and added only a sheel script performing a "echo hello" and the shell script launch fails.
If I add no command, the job went fine (I know, this sound stupid).

Is it possible to have a verbose output from slave.jar ?
Do we need to be able to connect from the slave to the master via ssh ?

YC

ycollet

unread,
Sep 2, 2013, 9:03:48 AM9/2/13
to jenkins...@googlegroups.com
I tested another way to run the slave:
- I logged on the slave, open firefox and connect to the master jenkins web page.
- here, I configured the node and select java web start to start the node.
- On the node, I enter the following command:
 java -jar slave.jar -jnlpUrl http://mymasterurl:8080/computer/the_slave_name/slave-agent.jnlp

I've got the following messages:

Sep 02, 2013 2:58:26 PM hudson.remoting.jnlp.Main$CuiListener <init>
INFO: Jenkins agent is running in headless mode.
Sep 02, 2013 2:58:26 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Locating server among [http://192.168.0.3:8081/]
Sep 02, 2013 2:58:26 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connecting to 192.168.0.3:24
Sep 02, 2013 2:58:26 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Handshaking
Sep 02, 2013 2:58:26 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connected

But if I start my job, I still have an error:

Started by user anonymous
[EnvInject] - Loading node environment variables.
Building remotely on slave_linux_64 in workspace /home/crystal/jenkins/workspace/TESTLinux
hudson.util.IOException2: remote file operation failed: /home/crystal/jenkins/workspace/TESTLinux at hudson.remoting.Channel@77f1201b:slave_linux_64
	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 slave_linux_64 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:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at hudson.remoting.Engine$1$1.run(Engine.java:63)
	at java.lang.Thread.run(Thread.java:724)
Finished: FAILURE




If I add ssh commands in my job (pre build ssh command to perform the checkout, ssh command to start the compilation), everything is running fine.

YC

ycollet

unread,
Sep 3, 2013, 2:32:22 AM9/3/13
to jenkins...@googlegroups.com
I was able to pass some options to java slave.jar via the option:
Suffix Start Slave Command
And I added -slaveLog log.txt.
But nothing really interesting in the log.
Can I add some more debug informations in this log ?

YC


ycollet

unread,
Sep 3, 2013, 3:27:20 AM9/3/13
to jenkins...@googlegroups.com

ycollet

unread,
Sep 9, 2013, 9:07:19 AM9/9/13
to jenkins...@googlegroups.com
I a

ycollet

unread,
Sep 9, 2013, 9:08:35 AM9/9/13
to jenkins...@googlegroups.com
I am still stuck with the connection debugging.
A looked at the jenkins code, but I am not a java specialist.
Do you know if there is a flag I can add on the java command line when I start slave.jar ?

Best regards,

YC
Reply all
Reply to author
Forward
0 new messages