org.codehaus.httpcache4j.HTTPException: org.apache.http.conn.HttpHostConnectException: Connection to http://localhost:8090 refused

Atlassian JIRA | Azwandi Mohd Aris | 5 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    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!) h4. Steps to reproduce # In JIRA instance A, add gadget subscription, say http://localhost:8090 # Export JIRA instance A to XML # 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) # In JIRA instance B, try adding gadget to dashboard. JIRA will throw browser prompt: {code}The Gadget Directory failed to load{code} h4. Diagnosis: # Set "com.atlassian.gadgets.directory" logging to DEBUG # Reproduce, the following stack trace appears in log: {code} 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) {code} h4. Workaround Delete the subscription from the database {code} 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'; {code}

    Atlassian JIRA | 5 years ago | Azwandi Aris [Atlassian]
    org.codehaus.httpcache4j.HTTPException: org.apache.http.conn.HttpHostConnectException: Connection to http://localhost:8090 refused
  2. 0

    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!) h4. Steps to reproduce # In JIRA instance A, add gadget subscription, say http://localhost:8090 # Export JIRA instance A to XML # 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) # In JIRA instance B, try adding gadget to dashboard. JIRA will throw browser prompt: {code}The Gadget Directory failed to load{code} h4. Diagnosis: # Set "com.atlassian.gadgets.directory" logging to DEBUG # Reproduce, the following stack trace appears in log: {code} 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) {code} h4. Workaround Delete the subscription from the database {code} 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'; {code}

    Atlassian JIRA | 5 years ago | Azwandi Mohd Aris
    org.codehaus.httpcache4j.HTTPException: org.apache.http.conn.HttpHostConnectException: Connection to http://localhost:8090 refused

    Root Cause Analysis

    1. org.codehaus.httpcache4j.HTTPException

      org.apache.http.conn.HttpHostConnectException: Connection to http://localhost:8090 refused

      at org.codehaus.httpcache4j.cache.HTTPCache.handleResolve()
    2. org.codehaus.httpcache4j
      HTTPCache.doCachedRequest
      1. org.codehaus.httpcache4j.cache.HTTPCache.handleResolve(HTTPCache.java:178)
      2. org.codehaus.httpcache4j.cache.HTTPCache.unconditionalResolve(HTTPCache.java:167)
      3. org.codehaus.httpcache4j.cache.HTTPCache.getFromCache(HTTPCache.java:144)
      4. org.codehaus.httpcache4j.cache.HTTPCache.doCachedRequest(HTTPCache.java:104)
      5. org.codehaus.httpcache4j.cache.HTTPCache.doCachedRequest(HTTPCache.java:80)
      5 frames
    3. com.atlassian.gadgets
      GadgetFeedsSpecProvider$FeedSpecProvider$LazyFeedReference.create
      1. com.atlassian.gadgets.directory.internal.GadgetFeedsSpecProvider$FeedSpecProvider$LazyFeedReference.create(GadgetFeedsSpecProvider.java:351)
      1 frame