Details

Description

In the Git plugin for SCM, there is a Sparse Checkout paths option to add under Additional Behaviours. I am currently unable to checkout my git repo using sparse-checkout. To simply this test job, the only step that it contains is the SCM portion.

Any assistance with this would be greatly appreciated. I'm currently working with a extremely large git repo (30+ GB) and utilizing sparse-checkout would save greatly on build times and drive space.

FATAL: java.io.IOException: Remote call on node_name failed error:

Started by user anonymous
Building remotely on _node_name_ in workspace C:\workspace\git-sparse-checkout
Cloning the remote Git repository
Using no checkout clone with sparse checkout.
Cloning repository user@some-git-server:gitrepo.git
> C:\Git\cmd\git.exe init C:\workspace\git-sparse-checkout # timeout=10
Fetching upstream changes from user@some-git-server:gitrepo.git
> C:\Git\cmd\git.exe --version # timeout=10
> C:\Git\cmd\git.exe -c core.askpass=true fetch --tags --progress user@some-git-server:gitrepo.git +refs/heads/*:refs/remotes/origin/* # timeout=90
> C:\Git\cmd\git.exe config remote.origin.url user@some-git-server:gitrepo.git # timeout=10
> C:\Git\cmd\git.exe config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
> C:\Git\cmd\git.exe config remote.origin.url user@some-git-server:gitrepo.git # timeout=10
Fetching upstream changes from user@some-git-server:gitrepo.git
> C:\Git\cmd\git.exe -c core.askpass=true fetch --tags --progress user@some-git-server:gitrepo.git +refs/heads/*:refs/remotes/origin/* # timeout=90
> C:\Git\cmd\git.exe rev-parse "refs/remotes/origin/master^{commit}" # timeout=10
> C:\Git\cmd\git.exe rev-parse "refs/remotes/origin/origin/master^{commit}" # timeout=10
Checking out Revision _some_sha_ (refs/remotes/origin/master)
FATAL: java.io.IOException: Remote call on _node_name_ failed
hudson.plugins.git.GitException: java.io.IOException: Remote call on _node_name_ failed
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:172)
at sun.reflect.GeneratedMethodAccessor273.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:131)
at com.sun.proxy.$Proxy67.execute(Unknown Source)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1033)
at hudson.scm.SCM.checkout(SCM.java:485)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1276)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532)
at hudson.model.Run.execute(Run.java:1744)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:374)
Caused by: java.io.IOException: Remote call on _node_name_ failed
at hudson.remoting.Channel.call(Channel.java:757)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:145)
... 15 more
Caused by: java.lang.ClassNotFoundException: Failed to deserialize the Callable object. Perhaps you needed to implement DelegatingCallable?
at hudson.remoting.UserRequest.perform(UserRequest.java:100)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:270)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
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:59)
at java.lang.Thread.run(Thread.java:744)
at ......remote call to _node_name_(Native Method)
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1361)
at hudson.remoting.UserResponse.retrieve(UserRequest.java:221)
at hudson.remoting.Channel.call(Channel.java:753)
... 16 more
Caused by: java.lang.ClassNotFoundException: hudson.plugins.git.extensions.impl.SparseCheckoutPath
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:270)
at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:625)
at hudson.remoting.ObjectInputStreamEx.resolveClass(ObjectInputStreamEx.java:50)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1612)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1517)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at java.util.ArrayList.readObject(ArrayList.java:771)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1017)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1893)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1990)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1915)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1706)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1344)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1990)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1915)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at java.util.ArrayList.readObject(ArrayList.java:771)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1017)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1893)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1990)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1915)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1990)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1915)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at hudson.remoting.UserRequest.deserialize(UserRequest.java:178)
at hudson.remoting.UserRequest.perform(UserRequest.java:98)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:270)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
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:59)
at java.lang.Thread.run(Thread.java:744)
Started calculate disk usage of build
Finished Calculation of disk usage of build in 0 seconds
Started calculate disk usage of workspace
Finished Calculation of disk usage of workspace in 0 seconds
Notifying upstream projects of job completion
Finished: FAILURE

Activity

Have you confirmed that you're able to perform a sparse checkout on the master node? The message seems to indicate that the class loader on the slave is somehow unable to find the SparseCheckout extension implementation class.

How is the slave agent started?

What operating system and Java version is the slave agent running?

If you configure a slave that executes on the master node (so it is using a remote call, but executing on the master node), does sparse checkout succeed?

Are you using git protocol, http protocol, https protocol, or ssh protocol for the clone? Does it behave any differently if you clone with a different protocol?

Mark Waite
added a comment - 2015-07-08 02:51 Have you confirmed that you're able to perform a sparse checkout on the master node? The message seems to indicate that the class loader on the slave is somehow unable to find the SparseCheckout extension implementation class.
How is the slave agent started?
What operating system and Java version is the slave agent running?
If you configure a slave that executes on the master node (so it is using a remote call, but executing on the master node), does sparse checkout succeed?
Are you using git protocol, http protocol, https protocol, or ssh protocol for the clone? Does it behave any differently if you clone with a different protocol?

The jobs set up are triggered to run on the slave node, never on the master node. This is not an option to change as there are quite a few slave nodes that are set up, which all needs to be able to conduct a sparse checkout. I was able to successfully do a sparse checkout on a slave node, which is the same node that failed when testing the sparse checkout feature in Jenkins.

SSH protocol is being used (user@some-git-server:gitrepo.git). I also verified that the .ssh folder with my openSSL key is set up correctly. There are no other protocol optionals to switch to.

Lani Morton
added a comment - 2015-07-09 17:44 Slave nodes are setup via Windows services.
OS: Windows 7
Java: 7.45
The jobs set up are triggered to run on the slave node, never on the master node. This is not an option to change as there are quite a few slave nodes that are set up, which all needs to be able to conduct a sparse checkout. I was able to successfully do a sparse checkout on a slave node, which is the same node that failed when testing the sparse checkout feature in Jenkins.
SSH protocol is being used (user@some-git-server:gitrepo.git). I also verified that the .ssh folder with my openSSL key is set up correctly. There are no other protocol optionals to switch to.

Once the change has been included in the git client plugin, if you're interested in trying a pre-release build, we could provide you pre-release builds of the next git client plugin and the next git plugin. I don't know if his change will resolve your issue, but it looks surprisingly similar to the issue he was encountering.

Mark Waite
added a comment - 2015-07-09 17:59 Nicolas De Loof just discovered a slave node class loading problem (mentioned in JENKINS-21520 ) which might also be causing this message. He's started a pull request for the git client plugin based on what he learned. A similar change will be needed in the git plugin.
Once the change has been included in the git client plugin, if you're interested in trying a pre-release build, we could provide you pre-release builds of the next git client plugin and the next git plugin. I don't know if his change will resolve your issue, but it looks surprisingly similar to the issue he was encountering.

The git client plugin 1.18.0 release and the git plugin 2.4.0 release were both delivered today. They include the work around for JENKINS-21520 mentioned in the previous comment. Please try them to see if that improves the behavior.

Also, please share how you're starting your slave nodes, whether as swarm agents, as JNLP from the Windows desktop, as services, or some other way.

Mark Waite
added a comment - 2015-07-18 21:28 The git client plugin 1.18.0 release and the git plugin 2.4.0 release were both delivered today. They include the work around for JENKINS-21520 mentioned in the previous comment. Please try them to see if that improves the behavior.
Also, please share how you're starting your slave nodes, whether as swarm agents, as JNLP from the Windows desktop, as services, or some other way.