Build returning error code -1

44 views
Skip to first unread message

Jeff Schmitz

unread,
Mar 29, 2014, 10:19:44 AM3/29/14
to jenkins...@googlegroups.com
Still a newbie, I've moved on to a PC running windows 7 and Java 7.  I'm trying to build the example in the Jenkins Definitive Guide book, and am getting the below exception.  I am able to clone the remote repository from the Git Bash command line:

git clone g...@github.com:<username>/game-of-life.git

 so the network connection is there and working.  I Googled for jenkins return status code of -1 and got nothing, so hoping someone here may have an idea.  Note that I'm not behind a proxy wall so don't have any proxy config setup...

Building in workspace C:\.jenkins\workspace\gameoflife-default
Fetching changes from the remote Git repository
Fetching upstream changes from g...@github.com:jeffrey-a-schmitz/game-of-life.git
ERROR: Timeout after 10 minutes
FATAL: Failed to fetch from g...@github.com:jeffrey-a-schmitz/game-of-life.git
hudson.plugins.git.GitException: Failed to fetch from g...@github.com:jeffrey-a-schmitz/game-of-life.git
	at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:621)
	at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:853)
	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:878)
	at hudson.model.AbstractProject.checkout(AbstractProject.java:1320)
	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:609)
	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:518)
	at hudson.model.Run.execute(Run.java:1688)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:88)
	at hudson.model.Executor.run(Executor.java:231)
Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress g...@github.com:jeffrey-a-schmitz/game-of-life.git +refs/heads/*:refs/remotes/origin/*" returned status code -1:
stdout: 
stderr: 
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1192)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1062)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$200(CliGitAPIImpl.java:89)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:222)
	at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:619)

Mark Waite

unread,
Mar 29, 2014, 1:09:25 PM3/29/14
to jenkins...@googlegroups.com
Usually a timeout in calls to git are due to missing credentials information.  In your case, that doesn't seem to be the root problem, since I can view the contents of that repository without credentials.  If you want to experiment with it, you could create a credential for that github repository.

If you don't need to push back to the repository from the Jenkins job, you could use the faster and lighter (read-only) git protocol by using "git://github.com/jeffrey-a-schmitz/game-of-life.git" instead of "g...@github.com:jeffrey-a-schmitz/game-of-life.git".  

If neither of those work, you could try the https protocol, "https://github.com/jeffrey-a-schmitz/game-of-life.git".

Thanks,
Mark Waite


--
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.



--
Thanks!
Mark Waite

Jeff Schmitz

unread,
Mar 29, 2014, 3:37:34 PM3/29/14
to jenkins...@googlegroups.com
Tried the git://github... link, still no luck.  Note that it did download the files to the workspace (C:/.jenkins/workspace), but then the build just hung and still hasn't finished after 10 minutes.  Haven't had time to try the https link yet.

Mark Waite

unread,
Mar 29, 2014, 4:28:58 PM3/29/14
to jenkins...@googlegroups.com
Was the stack trace different on the attempt with the git:// URL?  The stack trace you listed shows that "git fetch" failed, which would usually mean that the repository did not complete its download.

http://stackoverflow.com/questions/15708490/jenkins-hanging-at-fetching-upstream-changes-from-origin suggests that you might have added the msysgit "cmd" directory into your PATH before the msysgit "bin" directory.  Jenkins needs the msysgit "bin" directory in the path rather than the "cmd" directory.

The "cmd" directory can be added to the PATH without the "bin" directory by the msysgit installer.  It has three alternatives to provide git functions to the user.  One of them only adds "cmd" to the PATH, the other adds "bin" to the PATH (and the third option adds nothing to the PATH).

Thanks,
Mark Waite

Jeff Schmitz

unread,
Mar 31, 2014, 10:22:21 AM3/31/14
to jenkins...@googlegroups.com
Didn't notice if the stack was the same, but now I'm behind a firewall with a proxy server.  I setup my command line git client and am able to use the https://... address to clone the github repository.  So I setup the jenkins proxy page to match what I used for the git http.proxy and https.proxy settings, and I get the following error when I try to validate 

(show details)
java.net.UnknownHostException: http://proxy.boeing.com
	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 Source)
	at java.net.Socket.connect(Unknown Source)
	at java.net.Socket.(Unknown Source)
	at java.net.Socket.(Unknown Source)
	at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:80)
	at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:122)
	at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
	at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
	at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
	at hudson.ProxyConfiguration$DescriptorImpl.doValidateProxy(ProxyConfiguration.java:321)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96)
	at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:120)
	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
	at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:248)
	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:631)
	at org.kohsuke.stapler.Stapler.service(Stapler.java:225)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:96)
	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:88)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:46)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

Mark Waite

unread,
Mar 31, 2014, 10:36:30 AM3/31/14
to jenkins...@googlegroups.com
I think that means that the Jenkins process cannot convert proxy.boeing.com into an IP address.  Check that "nslookup proxy.boeing.com" returns a reasonable result from the computer which is hosting Jenkins.

Richard Bywater

unread,
Mar 31, 2014, 2:21:26 PM3/31/14
to jenkins...@googlegroups.com
I'd say you have http:// in the proxy host name field - remove that and I think you'll be good.

Richard.
--
Reply all
Reply to author
Forward
0 new messages