Uploaded image for project: 'Jira Software Data Center'
  1. Jira Software Data Center
  2. JSWSERVER-14668

JIRA DVCS will sync button spins infinitely when there is a server-side exception

    XMLWordPrintable

Details

    Description

      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.

      Environment

      • DVCS plugin integrated with GitHub Enterprise.
      • GitHub Enterprise server cannot be accessed.

      Steps to Reproduce

      1. Setup DVCS to integrate with GitHub Enterprise.
      2. Alter the environment in such a way that an IOException will be thrown when trying to connect to it.
      3. Synchronise the repository.

      Expected Results

      The repository fails as per sync failed.jpg.

      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:

      2016-08-03 12:57:14,599 http-nio-6989-exec-22 ERROR superadmin 777x3437x1 1q9iesm 172.22.48.175 /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(GithubCommunicator.java:624)
              at com.atlassian.jira.plugins.dvcs.spi.github.GithubCommunicator.startSynchronisation(GithubCommunicator.java:692)
              at com.atlassian.jira.plugins.dvcs.service.remote.CachingCommunicator.startSynchronisation(CachingCommunicator.java:208)
              at com.atlassian.jira.plugins.dvcs.sync.impl.DefaultSynchronizer.doSync(DefaultSynchronizer.java:176)
              at com.atlassian.jira.plugins.dvcs.service.RepositoryServiceImpl.doSync(RepositoryServiceImpl.java:519)
              at com.atlassian.jira.plugins.dvcs.service.RepositoryServiceImpl.sync(RepositoryServiceImpl.java:430)
              at com.atlassian.jira.plugins.dvcs.rest.RootResource.startRepositorySoftSync(RootResource.java:233)
              ... 3 filtered
              at java.lang.reflect.Method.invoke(Method.java:498)
              ... 19 filtered
              at com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:154)
              ... 1 filtered
              at com.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:68)
              ... 86 filtered
              at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:70)
              ... 16 filtered
              at com.atlassian.plugins.rest.module.servlet.RestSeraphFilter.doFilter(RestSeraphFilter.java:37)
              ... 74 filtered
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
              at java.lang.Thread.run(Thread.java:745)
      Caused by: java.net.UnknownHostException: git.example.com
              at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
              at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
              at java.net.Socket.connect(Socket.java:589)
              at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:668)
              at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
              at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
              at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
              at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
              at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
              at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1105)
              at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:999)
              at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
              at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1513)
              at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
              at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
              at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
              at org.eclipse.egit.github.core.client.GitHubClient.get(GitHubClient.java:733)
              at org.eclipse.egit.github.core.client.PageIterator.next(PageIterator.java:173)
              at org.eclipse.egit.github.core.service.GitHubService.getAll(GitHubService.java:151)
              at org.eclipse.egit.github.core.service.GitHubService.getAll(GitHubService.java:135)
              at org.eclipse.egit.github.core.service.RepositoryService.getBranches(RepositoryService.java:785)
              at com.atlassian.jira.plugins.dvcs.spi.github.GithubCommunicator.getBranches(GithubCommunicator.java:588)
              ... 214 more
      

      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:

      {
        "id": 2068,
        "organizationId": 43,
        "dvcsType": "githube",
        "slug": "auto-regression",
        "name": "auto-regression",
        "lastCommitDate": 1469107962000,
        "linked": true,
        "deleted": false,
        "smartcommitsEnabled": true,
        "lastActivityDate": 1469107962000,
        "repositoryUrl": "https://git.example.com/captainplanet/auto-regression",
        "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
        }
      }
      
      

      Attachments

        1. been going a while.jpg
          been going a while.jpg
          257 kB
        2. infinite sync.jpg
          infinite sync.jpg
          83 kB
        3. sync failed.jpg
          sync failed.jpg
          39 kB

        Issue Links

          Activity

            People

              cvanes Chris van Es (Inactive)
              dcurrie@atlassian.com Dave C
              Votes:
              2 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: