In MultiExcerpt Include seeing "jiraissues.unexpected.error Jira issues is not available" error

Description

On a page with a MultiExcerpt Include that is connected to a MultiExcerpt that has a Jira macro in it, Confluence 7.4.0

The link to the issue renders but the the icon, the bug title, and the bug status that surround the link are not rendered. Instead:

Error: *jiraissues.unexpected.error Jira issues is not available *

How could this failure happen in a MultiExcerpt Include but not on the "original" page where the excerpt is located?
We suspect that the failure is occurring in the Jira macro when it tries to connect to Jira to get the details of the linked Jira issue like the status and the icon. The failure that is displayed came from the Jira macro after the ME-Include found it and handed it off to Confluence to render.

The included Jira macro in the ME-Include is not rendered in exactly the same context as the original Jira macro on the excerpt page. The ME-Include finds the original excerpt page and builds a context for that page to give to Confluence for rendering the markup from the body of the excerpt in the original page. This works fine for Jira macros in our testing.

It is likely that the context that the ME-Include builds is necessary to reproduce the problem. It is also likely that the problem is related to authorization/authentication by Jira of the request coming from Confluence. The markup that is rendered, the definition of the Jira macro from the body of the excerpt, is correct. It is the same as the markup on the original page. We have verified that using a debugger. The only difference we see in the rendering of the Jira macros on the 2 different pages is the context used to render them.

WORKAROUND:
Navigate to the page w/ the MultiExcerpt on it (the MultiExcerpt w/ a jiraissues macro in it).

Then navigate to the page w/ the MultiExcerpt-Include on it and the jiraissues macro renders fine.
TODO: does this happen with ME cache disabled?

Freshdesk Tickets

None

Create a Support Ticket

Activity

Show:
Ture Hoefner
February 25, 2021, 4:50 PM
Edited

The customer who reported this issue has updated SSL certs for their load balancing proxy server (they have a Data Center cluster) and the problem went away. Not sure if the cert update is the reason for the problem going away.

We (Artemis support) were unable to reproduce the problem locally.

For the future, here are some troubleshooting steps that use a simplified reproducer to narrow things down closer to root cause:

Th broken Jira macro does render the link to the Jira issue but fails to render the the icon, the bug title, and the bug status that surround the link. The message "jiraissues.unexpected.error Jira issues is not available" is coming from the Jira macro implementation:

if you click the link in the broken Jira macro it successfully navigates to the issue in Jira.
Look at the markup for that link and save the link so you can compare it to the link for the Jira macro when it is not broken (see the end of this message).
When it is working:

From this information we can surmise that the ME-Include successfully found the ME w/ the Jira issue macro in it and was able to invoke the execute() method on the Jira macro, even when the Jira macro was broken. The Jira macro was able to process far enough to render a link to the issue but failed when processing/querying Jira to obtain data about the issue (status, etc.). That sounds like a connection or authentication failure.

The configuration for the Application Link between Jira and Confluence is complex and the Jira macro is notorious for problems related to the URLs (application URL vs display URL) used in rendering the macro: https://www.google.com/search?q=jira+%22display+URL%22+%22application+URL%22+icon&oq=jira+%22display+URL%22+%22application+URL%22+icon&aqs=chrome..69i57j33i160.11361j0j7&sourceid=chrome&ie=UTF-8

With Data Center and your load balancing reverse proxy that routes requests to Confluence cluster nodes there is added complexity (or at least more to think about) when configuring the application URL and display URL for your Jira <--> Confluence application connection.

One possibility is a problem with OAuth between the 2 servers. There are a few ways to configure the application link w.r.t. authentication and users (users are the same on both servers, or user management is delegated to Jira, or....). We may eventually need to dig into the application link configuration.

We will need to narrow down the problem space in an attempt to figure out exactly why the Jira macro is failing.

Try the simplest possible test to narrow our focus:

*disable caching globally for ME-Includes and flush the cache. That is done in the admin configuration tool for ME.
*in a test space, create Page 1 with an ME on it that contains only a Jira macro that links to one Jira issue
*in the same space create Page 2 with an ME-Include on it that includes your ME

  • With caching disabled I'd like to know if you see the problem in the ME-Include and, if you do, if the workaround of navigating to the ME page fixes it (but see special steps below for the workaround to be explicit about session management).

For your workaround we will want to figure out if it is the establishment of a session w/ the Jira server that is fixing things or if it is something else:

  • you have the page with the broken Jira macro displayed on a tab in your browser

  • ME caching is disabled and has been disabled from the beginning (let's leave caching out of the picture completely until we figure this out)

  • open a new tab in icognito mode or open a completely different browser (like Firefox vs Chrome) to establish a completely different session with your Confluence server.

  • in that separate session, navigate to the ME page

  • in the ORIGINAL browser session, the one w/ the ME-Include, refresh the page and see if it is now fixed.

  • if that didn't fix it then use the ORIGINAL browser session to navigate to the ME page, then go back to the ME-Include page and see if that fixes it.

  • For these tests you will want to login w/ a username that you know for sure is on both the Jira and Confluence servers and has full access to both the Confluence pages and the Jira project/issue.

Assignee

Unassigned

Reporter

Leslie Gilbert

Labels

None

Product

None

Priority

Major