branchescom.atlassian.jira.plugins.dvcs.exception.SourceControlException: Could not retrieve list of branches

Atlassian JIRA | David Currie [Atlassian] | 9 months ago
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    h3. Summary When attempting to synchronise with a GitHub Enterprise account, a server-side exception was thrown. The DVCS plugin has not stopped attempting to synchronise within the client (ie Chrome) ever since. This affects multiple repositories in the account. h3. Environment * DVCS plugin integrated with GitHub Enterprise. * GitHub Enterprise server cannot be accessed. h3. Steps to Reproduce # Setup DVCS to integrate with GitHub Enterprise. # Alter the environment in such a way that an {{IOException}} will be thrown when trying to connect to it. # Synchronise the repository. h3. Expected Results The repository fails as per [^sync failed.jpg]. h3. Actual Results The sync continues perpetually as per [^infinite sync.jpg] and the network tools displays this in [^been going a while.jpg]. The below exception was thrown: {noformat} 2016-08-03 12:57:14,599 http-nio-6989-exec-22 ERROR superadmin 777x3437x1 1q9iesm /rest/bitbucket/1.0/repository/2069/softsync [c.a.j.p.d.sync.impl.DefaultSynchronizer] Could not retrieve list of branchescom.atlassian.jira.plugins.dvcs.exception.SourceControlException: Could not retrieve list of branches at com.atlassian.jira.plugins.dvcs.spi.github.GithubCommunicator.getBranches( at com.atlassian.jira.plugins.dvcs.spi.github.GithubCommunicator.startSynchronisation( at com.atlassian.jira.plugins.dvcs.service.remote.CachingCommunicator.startSynchronisation( at com.atlassian.jira.plugins.dvcs.sync.impl.DefaultSynchronizer.doSync( at com.atlassian.jira.plugins.dvcs.service.RepositoryServiceImpl.doSync( at com.atlassian.jira.plugins.dvcs.service.RepositoryServiceImpl.sync( at ... 3 filtered at java.lang.reflect.Method.invoke( ... 19 filtered at$JerseyOsgiServletContainer.doFilter( ... 1 filtered at ... 86 filtered at ... 16 filtered at ... 74 filtered at java.util.concurrent.ThreadPoolExecutor.runWorker( at java.util.concurrent.ThreadPoolExecutor$ at org.apache.tomcat.util.threads.TaskThread$ at Caused by: at at at at at at at<init>( at at at at at at at at at at org.eclipse.egit.github.core.client.GitHubClient.get( at at org.eclipse.egit.github.core.service.GitHubService.getAll( at org.eclipse.egit.github.core.service.GitHubService.getAll( at org.eclipse.egit.github.core.service.RepositoryService.getBranches( at com.atlassian.jira.plugins.dvcs.spi.github.GithubCommunicator.getBranches( ... 214 more {noformat} h3. Notes Querying the endpoint for the failing repo, /rest/bitbucket/1.0/repository/2068, shows us the sync has failed, however it seems the client is not accessing that endpoint for some reason: {code:java} { "id": 2068, "organizationId": 43, "dvcsType": "githube", "slug": "auto-regression", "name": "auto-regression", "lastCommitDate": 1469107962000, "linked": true, "deleted": false, "smartcommitsEnabled": true, "lastActivityDate": 1469107962000, "repositoryUrl": "", "fork": false, "sync": { "finished": false, "changesetCount": 0, "jiraCount": 0, "pullRequestActivityCount": 0, "synchroErrorCount": 0, "startTime": 1470193734482, "error": "Error during sync. See server logs.", "flightTimeMs": 0, "numRequests": 0, "smartCommitErrors": [ ], "softsync": true, "webHookSync": false, "warning": false } } {code}

    Atlassian JIRA | 9 months ago | David Currie [Atlassian]
    branchescom.atlassian.jira.plugins.dvcs.exception.SourceControlException: Could not retrieve list of branches

    Root Cause Analysis

    1. branchescom.atlassian.jira.plugins.dvcs.exception.SourceControlException

      Could not retrieve list of branches

      at com.atlassian.jira.plugins.dvcs.spi.github.GithubCommunicator.getBranches()
    2. com.atlassian.jira
      1. com.atlassian.jira.plugins.dvcs.spi.github.GithubCommunicator.getBranches(
      2. com.atlassian.jira.plugins.dvcs.spi.github.GithubCommunicator.startSynchronisation(
      3. com.atlassian.jira.plugins.dvcs.service.remote.CachingCommunicator.startSynchronisation(
      4. com.atlassian.jira.plugins.dvcs.sync.impl.DefaultSynchronizer.doSync(
      5. com.atlassian.jira.plugins.dvcs.service.RepositoryServiceImpl.doSync(
      6. com.atlassian.jira.plugins.dvcs.service.RepositoryServiceImpl.sync(
      7 frames