Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-34264

JIRA Chart Not Rendered when Inserting to Confluence page and throwing 504 Error

    XMLWordPrintable

Details

    Description

      Summary

      Trying to add JIRA Charts in Confluence page will render the chart properly in the screens before inserting it to the page, but clicking on Insert will get the chart disssapear and the Confluence page is unable to be saved. Seems like Confluence renders JIRA Charts data using both Application URL and Display URL.

      Steps to reproduce

      (execute the test from machine1)

      1. Set up JIRA on machine1 (sample IP: 10.60.5.193) and Confluence on machine2 (sample IP: 10.60.5.198)
      2. (Test scenario) Current Base URL of JIRA is *http://10.60.5.193:8630/jira* and Confluence is *http://10.60.5.198:10561/confluence*
      3. Set up /etc/hosts on machine1 with 127.0.0.1 jiraisawesome
      4. Login to http://10.60.5.193:8630/jira* from *machine1
      5. Set up application link using IP and ports (e.g: connect to *http://10.60.5.198:10561/confluence*)
      6. Login to http://10.60.5.198:10561/confluence* from *machine1
      7. Create a new Confluence Page
      8. Insert JIRA Chart by searching any existing JIRA project and Save the page (Chart is displayed successfully)
      9. Login to http://10.60.5.193:8630/jira* from *machine1
      10. Change the base URL of JIRA to use *http://jiraisawesome:8630/jira*
      11. Login to http://10.60.5.198:10561/confluence* from *machine1
      12. Modify the application link of JIRA - Display URL in Confluence to use *http://jiraisawesome:8630/jira*
      13. Perform Step 7 and 8 again

      Here are the results

      • We can view the chart in the preview of the prompt, but when insert the chart, its not showing in the page preview and unable to click on the save button.
      • URLs of the problem can be seen in the browser's developer mode
        HTTP 200 http://jiraisawesome:8624/jira/charts?filename=jfreechart-onetime-2627007503907999135.png
        
        HTTP 504 http://10.60.2.176:8553/553/plugins/servlet/image-generator?macro=jirachart&jql=project+%3D+DEMO&statType=assignees&appId=29d6aed3-a496-3929-a14b-c4653473b6b3&chartType=pie&authenticated=true

      Logs information

      • Confluence log
        2014-06-04 17:33:33,503 ERROR [http-bio-8090-exec-3] [confluence.plugins.jira.AbstractProxyServlet] requestByAnonymousUser Can not retrieve data from jira servers by anonymous user
         -- url: /plugins/servlet/image-generator | userName: admin
        com.atlassian.sal.api.net.ResponseException
        	at com.atlassian.confluence.plugins.jira.ImageGeneratorServlet.handleResponse(ImageGeneratorServlet.java:185)
        	at com.atlassian.confluence.plugins.jira.AbstractProxyServlet.requestByAnonymousUser(AbstractProxyServlet.java:176)
      • JIRA logs
        2014-06-04 17:33:33,498 http-bio-8080-exec-6 ERROR anonymous 1053x2945x1 - 192.168.200.3 /rest/gadget/1.0/piechart/generate [common.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service
        com.atlassian.jira.util.dbc.Assertions$NullArgumentException: parameter should not be null!
        	at com.atlassian.jira.util.dbc.Assertions.notNull(Assertions.java:38)
        	at com.atlassian.jira.charts.piechart.PieChartUrlGeneratorFactory.<init>(PieChartUrlGeneratorFactory.java:41)

      Additional Information

      JIRA 6.2.7
      Confluence 5.5.3

      Use case

      There are users who configures JIRA and Confluence integration to be using a different Application URL than the Display URL. This configuration is used when the two servers not able to be contacted between each other using the Display URL. At times this is the prefered configuration with communication between two internal servers to be using internal IP/hostnames instead of the external IP/hostnames.

      Expected behaviour

      The charts to be rendered normally in Confluence when using configurations of Display URL different than Application URL. With Display URL not necessarily able to reach the other server, but Application URL can.

      Attachments

        Issue Links

          Activity

            People

              kpham Khoa Pham
              znoorsazali Zul NS [Atlassian]
              Votes:
              2 Vote for this issue
              Watchers:
              26 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: