JIRA and Confluence applinks get broken due to Secure Login

Still need help?

The Atlassian Community is here for you.

Ask the community

This article only applies to Atlassian's server products. Learn more about the differences between cloud and server.

Problem

It's not possible to search for JIRA issues from Confluence pages or vice-versa. The following error appears when using Confluence Macros to search for JIRA issues:

The following error appears when searching for Confluence pages from JIRA issues:

The following error is seen in JIRA log:

2017-09-28 13:51:55,735 http-nio-8082-exec-13 ERROR username 831x100832x1 pqwz8l 10.200.200.141,0:0:0:0:0:0:0:1 /rest/confluenceIssueLink/1/confluence/space [c.a.p.r.c.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: Failed to parse Confluence Remote API response
java.lang.RuntimeException: Failed to parse Confluence Remote API response
	at com.atlassian.jira.plugin.link.confluence.service.rpc.ConfluenceRpcServiceImpl.parseXml(ConfluenceRpcServiceImpl.java:330)
	at com.atlassian.jira.plugin.link.confluence.service.rpc.ConfluenceRpcServiceImpl.handleResponse(ConfluenceRpcServiceImpl.java:307)
	at com.atlassian.jira.plugin.link.confluence.service.rpc.ConfluenceRpcServiceImpl.access$300(ConfluenceRpcServiceImpl.java:46)
	at com.atlassian.jira.plugin.link.confluence.service.rpc.ConfluenceRpcServiceImpl$SpaceResponseHandler.handle(ConfluenceRpcServiceImpl.java:259)
	at com.atlassian.jira.plugin.link.confluence.service.rpc.ConfluenceRpcServiceImpl$SpaceResponseHandler.handle(ConfluenceRpcServiceImpl.java:251)
	at com.atlassian.applinks.oauth.auth.OAuthApplinksResponseHandler$1.handle(OAuthApplinksResponseHandler.java:120)
	at com.atlassian.applinks.oauth.auth.OAuthApplinksResponseHandler.handle(OAuthApplinksResponseHandler.java:76)
	at com.atlassian.plugins.rest.module.jersey.JerseyRequest$2.handle(JerseyRequest.java:134)
	at com.atlassian.sal.core.net.HttpClientRequest.executeAndReturn(HttpClientRequest.java:104)
	at com.atlassian.plugins.rest.module.jersey.JerseyRequest.executeAndReturn(JerseyRequest.java:131)
	at com.atlassian.applinks.core.auth.ApplicationLinkRequestAdaptor.execute(ApplicationLinkRequestAdaptor.java:58)
	at com.atlassian.applinks.oauth.auth.OAuthRequest.execute(OAuthRequest.java:58)
	at com.atlassian.applinks.oauth.auth.OAuthApplinksResponseHandler.handle(OAuthApplinksResponseHandler.java:73)
	at com.atlassian.plugins.rest.module.jersey.JerseyRequest$2.handle(JerseyRequest.java:134)
	at com.atlassian.sal.core.net.HttpClientRequest.executeAndReturn(HttpClientRequest.java:104)
	at com.atlassian.plugins.rest.module.jersey.JerseyRequest.executeAndReturn(JerseyRequest.java:131)
	at com.atlassian.applinks.core.auth.ApplicationLinkRequestAdaptor.execute(ApplicationLinkRequestAdaptor.java:58)
	at com.atlassian.applinks.oauth.auth.OAuthRequest.execute(OAuthRequest.java:58)
	at com.atlassian.jira.plugin.link.confluence.service.rpc.ConfluenceRpcServiceImpl.getSpaces(ConfluenceRpcServiceImpl.java:188)
	at com.atlassian.jira.plugin.link.confluence.service.rest.ConfluenceRestServiceImpl.getSpaces(ConfluenceRestServiceImpl.java:86)
	at com.atlassian.jira.plugin.link.confluence.rest.ConfluenceResource.lambda$getSpaces$0(ConfluenceResource.java:99)
	at com.atlassian.fugue.Either$LeftProjection.on(Either.java:698)
	at com.atlassian.jira.plugin.link.confluence.rest.ConfluenceResource.getSpaces(ConfluenceResource.java:90)
	...
Caused by: org.xml.sax.SAXParseException; lineNumber: 115; columnNumber: 3; The element type "meta" must be terminated by the matching end-tag "</meta>".
	at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
	at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
	at javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
	at com.atlassian.jira.plugin.link.confluence.service.rpc.ConfluenceRpcServiceImpl.parseXml(ConfluenceRpcServiceImpl.java:324)
	... 276 more

Diagnosis

  • JIRA and Confluence applinks are created successfully
  • Both apps use the same Authentication methods e.g. OAuth with Impersonation for both Incoming and Outgoing
  • The statuses of the applinks are both Connected
  • Confluence's Remote API is enabled

Cause

The issue is caused by a 3rd-party add-on. In this case it's 2-Factor Auth (2FA) Secure Login - JIRA. It's discovered that in the latest version of the add-on (1.4.1), JIRA's and Confluence's IP address/es must be whitelisted.

Resolution

Whitelist JIRA's and Confluence's IP address/es via the add-on configuration:


Last modified on Nov 6, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.