Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » cannot open git-receive-pack: Server redirected too many times (20)
cannot open git-receive-pack: Server redirected too many times (20) [message #1701531] Mon, 13 July 2015 22:40 Go to next message
Sam Davis is currently offline Sam DavisFriend
Messages: 98
Registered: July 2012
Member
Hi,

The JUnit tests for the Gerrit Mylyn connector use JGit to create Gerrit reviews. The call to org.eclipse.jgit.api.PushCommand.call() started failing a couple of months ago without anything having changed (that I know of). The error message is "cannot open git-receive-pack: Server redirected too many times (20)"

Upon investigating I found that the tests pass when run on hudson-slave2 and fail on hudson-slave4 (on the shared Hudson instance), and fail on the Mylyn HIPP. Thinking this was a Hudson configuration problem, I opened a bug in Community / Hudson and it was suggested that the tests might be ignoring the proxy configuration, since slave2 (where they pass) does not use a proxy, but I don't think that's the case because the tests are able to clone the repository but fail to push. Plus, the tests used to work on our HIPP and now they don't.

As an experiment, I tried changing the tests to use git on the command line for pushing instead of JGit and that works fine.

Any help would be greatly appreciated. The test Gerrit instances are hosted at mylyn.org, and nothing was changed on that server AFAIK.

Here's the stack trace:

org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of push command
at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:156)
at org.eclipse.mylyn.gerrit.tests.support.GerritProject.commitAndPush(GerritProject.java:152)
at org.eclipse.mylyn.internal.gerrit.core.remote.ReviewHarness.commitAndPush(ReviewHarness.java:210)
at org.eclipse.mylyn.internal.gerrit.core.remote.ReviewHarness.pushFileToReview(ReviewHarness.java:148)
at org.eclipse.mylyn.internal.gerrit.core.remote.ReviewHarness.init(ReviewHarness.java:119)
at org.eclipse.mylyn.internal.gerrit.core.remote.PatchSetDetailRemoteFactoryTest.setUp(PatchSetDetailRemoteFactoryTest.java:55)
at junit.framework.TestCase.runBare(TestCase.java:139)
at junit.framework.TestResult$1.protect(TestResult.java:122)
at junit.framework.TestResult.runProtected(TestResult.java:142)
at junit.framework.TestResult.run(TestResult.java:125)
at junit.framework.TestCase.run(TestCase.java:129)
at junit.framework.TestSuite.runTest(TestSuite.java:255)
at junit.framework.TestSuite.run(TestSuite.java:250)
at junit.framework.TestSuite.runTest(TestSuite.java:255)
at junit.framework.TestSuite.run(TestSuite.java:250)
at junit.framework.TestSuite.runTest(TestSuite.java:255)
at junit.framework.TestSuite.run(TestSuite.java:250)
at org.eclipse.mylyn.commons.sdk.util.ManagedTestSuite.run(ManagedTestSuite.java:152)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84)
at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:123)
at org.eclipse.tycho.surefire.osgibooter.OsgiSurefireBooter.run(OsgiSurefireBooter.java:86)
at org.eclipse.tycho.surefire.osgibooter.AbstractUITestApplication$1.run(AbstractUITestApplication.java:35)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3515)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3164)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
at org.eclipse.tycho.surefire.osgibooter.UITestApplication.runApplication(UITestApplication.java:31)
at org.eclipse.tycho.surefire.osgibooter.AbstractUITestApplication.run(AbstractUITestApplication.java:114)
at org.eclipse.tycho.surefire.osgibooter.UITestApplication.start(UITestApplication.java:37)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
at org.eclipse.equinox.launcher.Main.main(Main.java:1384)
Caused by: org.eclipse.jgit.errors.TransportException: http://tests@mylyn.org/gerrit-2.11/org.eclipse.mylyn.test: cannot open git-receive-pack
at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:466)
at org.eclipse.jgit.transport.TransportHttp.openPush(TransportHttp.java:365)
at org.eclipse.jgit.transport.PushProcess.execute(PushProcess.java:130)
at org.eclipse.jgit.transport.Transport.push(Transport.java:1120)
at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:152)
... 59 more
Caused by: java.net.ProtocolException: Server redirected too many times (20)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1637)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
at org.eclipse.jgit.util.HttpSupport.response(HttpSupport.java:167)
at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:429)
... 63 more
Re: cannot open git-receive-pack: Server redirected too many times (20) [message #1702347 is a reply to message #1701531] Tue, 21 July 2015 16:12 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1268
Registered: July 2009
Senior Member
maybe this post can help
http://stackoverflow.com/questions/11022934/getting-java-net-protocolexception-server-redirected-too-many-times-error
Re: cannot open git-receive-pack: Server redirected too many times (20) [message #1702370 is a reply to message #1702347] Tue, 21 July 2015 20:49 Go to previous message
Sam Davis is currently offline Sam DavisFriend
Messages: 98
Registered: July 2012
Member
Thanks, but that doesn't seem to have made a difference (https://git.eclipse.org/r/#/c/52304/). Any idea why these failures would have suddenly started happening?
Previous Topic:Files in package explorer, Commit works error when pushing
Next Topic:How to clone a single branch in JGit
Goto Forum:
  


Current Time: Fri Apr 26 04:10:27 GMT 2024

Powered by FUDForum. Page generated in 0.07961 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top