This Question is Possibly Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
4 Replies Last post: Jul 18, 2013 11:22 PM by Mike Waldner  
Jim Fiorato Newbie 10 posts since
Jul 5, 2005
Currently Being Moderated

May 10, 2013 1:14 AM

Intermittent TeamCity Bitbucket HTTPS connection failure "TransportException -1 null" when going through proxy server

I'm getting the below error intermittently in TeamCity when I "Test Connection" on a VCS Root page. I am behind a proxy server, and I have added -Dhttps.proxyHost=XXX -Dhttps.proxyPort=1234 to the TEAMCITY_SERVER_OPTS environment variable. It does complete succesfully sometimes, but around 50% of the time it fails with this error. This is not an every few days kind of issue. If I click the "Test Connection" button 10 times in a row, it fails 5 of those times.

 

I've consistently succesfully connected on the TeamCity server to the repository via the Windows git client over https. Accessing https://bitbucket.org from the server is consistently fine.

 

I've tried updating Java to 1.7 in attempt to complete the steps in this post here: http://forums.netbeans.org/topic53840.html, but I continued having the same issue.

 

SSH isn't an option because of network rules, and BitBucket doesn't yet support ssh over 443.

 

It seems like the problem might be with jgit, but the error isn't very helpful.

 

Has anyone seen anything similar? Any clues as to what might be causing this specific issue?

 

[2013-05-09 15:12:56,854]   WARN [bio-8001-exec-8] -      jetbrains.buildServer.VCS - Error occurred in test connection

jetbrains.buildServer.vcs.VcsException: List remote refs failed: org.eclipse.jgit.errors.TransportException: https://XX@bitbucket.org/YY/ZZ.git://XX@bitbucket.org/YY/ZZ.git: -1 null

at jetbrains.buildServer.buildTriggers.vcs.git.OperationContext.wrapException(OperationContext.java:134)

at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getRemoteRefs(GitVcsSupport.java:497)

at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getCurrentState(GitVcsSupport.java:128)

at jetbrains.buildServer.buildTriggers.vcs.git.TestConnectionCommand.checkFetchConnection(TestConnectionCommand.java:100)

at jetbrains.buildServer.buildTriggers.vcs.git.TestConnectionCommand.testConnection(TestConnectionCommand.java:68)

at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.testConnection(GitVcsSupport.java:412)

at jetbrains.buildServer.controllers.admin.projects.EditVcsRootsController.doPost(EditVcsRootsController.java:204)

at jetbrains.buildServer.controllers.BaseFormXmlController$1.handleRequest(BaseFormXmlController.java:54)

at jetbrains.buildServer.controllers.AjaxRequestProcessor.processRequest(AjaxRequestProcessor.java:45)

at jetbrains.buildServer.controllers.BaseFormXmlController.doHandle(BaseFormXmlController.java:52)

at jetbrains.buildServer.controllers.BaseController.handleRequestInternal(BaseController.java:73)

at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)

at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)

at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)

at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)

at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)

at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

at jetbrains.buildServer.maintenance.TeamCityDispatcherServlet.service(TeamCityDispatcherServlet.java:0)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

at jetbrains.buildServer.web.ParametersProviderCalculationContextFilter.doFilter(ParametersProviderCalculationContextFilter.java:6)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

at jetbrains.buildServer.web.DisableSessionIdFromUrlFilter.doFilter(DisableSessionIdFromUrlFilter.java:5)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

at jetbrains.buildServer.web.DiagnosticFilter.doFilter(DiagnosticFilter.java:55)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

at jetbrains.buildServer.web.ResponseFragmentFilter.doFilter(ResponseFragmentFilter.java:7)

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:224)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)

at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)

at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)

at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:298)

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)

Caused by: org.eclipse.jgit.errors.TransportException: https://XX@bitbucket.org/YY/ZZ.git://XX@bitbucket.org/YY/ZZ.git: -1 null

at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:488)

at org.eclipse.jgit.transport.TransportHttp.openFetch(TransportHttp.java:305)

at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getRemoteRefs(GitVcsSupport.java:513)

at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getRemoteRefs(GitVcsSupport.java:495)

... 44 more

Doug Rathbone Newbie 1 posts since
Jun 24, 2013

I experience the exact same issue while behind a proxy server to Bitbucket.

 

Exact some frustration: hit test 10 times, 8 times itll be fine, the other 2 it'll fail.

 

The exceptions are:

 

Failed for the root 'https://bitbucket.org/myUsername/myRepo.git#master' #16: List remote refs failed: org.eclipse.jgit.errors.TransportException: : -1 null 
Mike Waldner Newbie 8 posts since
Oct 6, 2006

Exact same issue here too. Anyone solve this problem?

Mike Waldner Newbie 8 posts since
Oct 6, 2006

Hey Jim, thanks for getting back to me. It's too bad that HTTPS didn't work.

 

Hopefully someday bitbucket implements something like github where they have servers listening on port 443 and they handle the connections accordingly. (See https://bitbucket.org/site/master/issue/3831)

 

Here's a terrible hack I used - I ended up just cloning the repo locally and updating periodically in bash using the https connection. Then I just point Teamcity to that local .git folder.  I know, .

More Like This

  • Retrieving data ...