Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-26721

Unable to load gadget directory if gadget subscription URL is unreachable

    XMLWordPrintable

Details

    Description

      If a gadget subcription is not reachable by JIRA, JIRA will not be able to load the gadget directory. There is no other way to delete a gadget subscription other than from the gadget directory itself (oops!)

      Steps to reproduce

      1. In JIRA instance A, add gadget subscription, say http://localhost:8090
      2. Export JIRA instance A to XML
      3. In JIRA instance B, restore XML backup from instance A. Make sure instance A is not reachable from instance B (important to reproduce this problem)
      4. In JIRA instance B, try adding gadget to dashboard. JIRA will throw browser prompt:
        The Gadget Directory failed to load

      Diagnosis:

      1. Set "com.atlassian.gadgets.directory" logging to DEBUG
      2. Reproduce, the following stack trace appears in log:
        2012-01-06 09:46:24,529 TP-Processor8 DEBUG testuser 583x1195x3 1dymzqi 211.24.247.39,207.223.247.45 /rest/config/1.0/directory.json [gadgets.directory.internal.HttpCache$1] ThreadSafeClientConnManager.getConnection: HttpRoute[{}->http://localhost:8090], timeout = 0
        2012-01-06 09:46:24,528 TP-Processor12 DEBUG testuser 580x1121x2 1dymzqi 211.24.247.39,207.223.247.45 /rest/config/1.0/directory.json [gadgets.directory.internal.GadgetSpecProviderHelper$GadgetSpecProviderToEntriesFunction] Unable to get the contents of the GadgetSpecProvider
        org.codehaus.httpcache4j.HTTPException: org.apache.http.conn.HttpHostConnectException: Connection to http://localhost:8090 refused
               at org.codehaus.httpcache4j.cache.HTTPCache.handleResolve(HTTPCache.java:178)
               at org.codehaus.httpcache4j.cache.HTTPCache.unconditionalResolve(HTTPCache.java:167)
               at org.codehaus.httpcache4j.cache.HTTPCache.getFromCache(HTTPCache.java:144)
               at org.codehaus.httpcache4j.cache.HTTPCache.doCachedRequest(HTTPCache.java:104)
               at org.codehaus.httpcache4j.cache.HTTPCache.doCachedRequest(HTTPCache.java:80)
               at com.atlassian.gadgets.directory.internal.GadgetFeedsSpecProvider$FeedSpecProvider$LazyFeedReference.create(GadgetFeedsSpecProvider.java:351)
        
        

      Workaround

      Delete the subscription from the database

      delete from propertystring where id = (select id from propertyentry where property_key = 'com.atlassian.gadgets.directory.SubscribedGadgetFeedStore');
      
      delete from propertyentry where property_key = 'com.atlassian.gadgets.directory.SubscribedGadgetFeedStore';
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              amohdaris Azwandi Mohd Aris (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: