labels gadget error: An internal server error occurred when requesting resource .
Asked by Topher dailing:

Im trying to use the jira labels gadget within confluence. i have the gadget imported and i can add it to a space, but i get a "An internal server error occurred when requesting resource " when i try to set the gadgets parameters.

The link between confluence and jira is ok, all the other jira gadgets that i am using are working. its just the labels gadget that is not working. any ideas or directions to troubleshoot.


Answers:
author: Jobin Kuruvilla [Adaptavist]
body: An internal server error is a generic error. Are you seeing any details in the JIRA or Confluence logs? That might give you some more details!

comments: author: Jobin Kuruvilla [Adaptavist]
body: It is JIRA who is rejecting the request. Can you check the JIRA logs as well?


author: Topher dailing
body: I get the following errors in confluence:

2012-10-01 18:11:13,724 ERROR \[http-8090-13\] \[renderer.internal.http.HttpClientFetcher\] fetch Unable to retrieve response

-- url: /plugins/servlet/gadgets/makeRequest \| userName: user1 \| referer: [http://e5clinical.host1.org:8090/plugins/servlet/gadgets/ifr?container=atlassian\&mid=122406961152\&country=GB\&lang=en\&view=default\&view-params=%7B%22writable%22%3A%22true%22%7D\&st=atlassian%3AGL](http://e5clinical.host1.org:8090/plugins/servlet/gadgets/ifr?container=atlassian&mid=122406961152&country=GB&lang=en&view=default&view-params=%257B%2522writable%2522%253A%2522true%2522%257D&st=atlassian%253AGL) ... st%2Fgadgets%2F1.0%2Fg%2Fcom.atlassian.jira.gadgets%3Alabels-gadget%2Fgadgets%2Flabels-gadget.xml\&libs=auth-refresh

java.io.EOFException

at java.util.zip.GZIPInputStream.readUByte(GZIPInputStream.java:249)

....  
AND  
2012-10-01 18:11:13,786 WARN \[http-8090-13\] \[http.impl.client.DefaultRequestDirector\] handleResponse Authentication error: Unable to respond to any of these challenges: {oauth=WWW-Authenticate: OAuth realm="http%3A%2F%2Fe5clinical.host1.org%3A8100", oauth_problem="consumer_key_unknown"}

-- url: /plugins/servlet/gadgets/makeRequest \| userName: user1 \| referer:http://e5clinical.host1.org:8090/plugins/servlet/gadgets/ifr?container=atlassian\&mid=122406961152\&country=GB\&lang=en\&view=default\&view-params=%7B%22writable%22%3A%22true%22%7D\&st=...%2Fcom.atlassian.jira.gadgets%3Alabels-gadget%2Fgadgets%2Flabels-gadget.xml\&libs=auth-refresh

2012-10-01 18:11:13,786 WARN \[http-8090-13\] \[shindig.gadgets.oauth.OAuthResponseParams\] logDetailedWarning OAuth fetch fatal error: \[consumer_key_unknown,Service provider rejected request\]

-- url: /plugins/servlet/gadgets/makeRequest \| userName: user1 \| referer: [http://e5clinical.host1.org:8090/plugins/servlet/gadgets/ifr?container=atlassian\&mid=122406961152\&country=GB\&lang=en\&view=default\&view-params=%7B%22writable%22%3A%22true%22%7D\&st=...com.atlassian.jira.gadgets%3Alabels-gadget%2Fgadgets%2Flabels-gadget.xml\&libs=auth-refresh](http://e5clinical.host1.org:8090/plugins/servlet/gadgets/ifr?container=atlassian&mid=122406961152&country=GB&lang=en&view=default&view-params=%257B%2522writable%2522%253A%2522true%2522%257D&st=...com.atlassian.jira.gadgets%253Alabels-gadget%252Fgadgets%252Flabels-gadget.xml&libs=auth-refresh)


author: Topher dailing
body: here is relevant section from access_log:

10.0.2.150 1113x9772x1 - \[01/Oct/2012:18:33:50 -0700\] "GET /rest/gadgets/1.0/g/feed HTTP/1.1" 200 24530 15 "-" "Atlassian-Gadgets-HttpClient" "-"

10.0.2.150 1113x9773x1 - \[01/Oct/2012:18:33:50 -0700\] "GET /rest/gadgets/1.0/g/com.atlassian.jira.gadgets:labels-gadget/gadgets/labels-gadget.xml HTTP/1.1" 200 13515 15 "-" "-" "-"

10.0.2.150 1113x9774x1 - \[01/Oct/2012:18:33:50 -0700\] "GET /rest/gadgets/1.0/g/feed HTTP/1.1" 200 24530 0 "-" "Atlassian-Gadgets-HttpClient" "-"

10.0.2.150 1113x9775x1 cdailing \[01/Oct/2012:18:33:51 -0700\] "GET /rest/gadget/1.0/labels/gadget/fields HTTP/1.1" 200 93 0 "-" "-" "j0tr3n"

10.0.2.150 1113x9776x2 cdailing \[01/Oct/2012:18:33:50 -0700\] "GET /rest/gadget/1.0/filtersAndProjects?showFilters=false HTTP/1.1" 200 353 0 "-" "-" "6b7vw1"

10.0.2.150 1114x9777x1 - \[01/Oct/2012:18:34:00 -0700\] "POST /plugins/servlet/oauth/request-token HTTP/1.1" 401 34 16 "-" "-" "-"  
There is nothing in the other logs that are relevant.


author: Jobin Kuruvilla [Adaptavist]
body: Are you using the same hostname in the url as you are doing it for other gadgets?


author: Topher dailing
body: yes, same hostname, both jira and confluence are on the same host, just different port #s.

All other gadgets from jira work in confluence though...


author: Bruna Griebeler
body: Hi Topher!  

Since I don't know which version of Confluence and Jira you are running, I'm not sure if the issue you are experiencing is a bug or not.

Anyway, I suggest you to check on [jira.atlassian.com](https://jira.atlassian.com/ "https://jira.atlassian.com/") for bugs related to that and what's the workaround.  
For example, you may be experiencing this: [CONF-20426](https://jira.atlassian.com/browse/CONF-20426?focusedCommentId=203388&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-203388) So in this case, it happens when Jira and Confluence are in the same domain.  

Hope it helps!

comments: author: Topher dailing
body: Im on latest confluence ( 4.3.1 ) and jira (5.1.4). I checked [CONF-20426](https://jira.atlassian.com/browse/CONF-20426?focusedCommentId=203388&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-203388) and its related [JRA-23934](https://jira.atlassian.com/browse/JRA-23934) and i dont think it applies to me. The average age and pie chart gadget these issues use as examples for the issue work for me. Other JIRA gadgets ive use also work. I think it has something to do with the labels since its only the labels gadget that does not work.


Tags: gadget

jira