Cannot add JIRA as a trusted application due to multiple trusted applications

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Problem

The atlassian-confluence.log contains this error:

2008-04-30 15:37:29,524 ERROR [http-8040-Processor22] [[Catalina].[localhost].[/confluence].[noop]] invoke Servlet.service() for servlet noop threw exception
java.lang.NullPointerException
        at com.atlassian.seraph.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:86)
        at com.atlassian.confluence.util.AbstractBootstrapHotSwappingFilter.doFilter(AbstractBootstrapHotSwappingFilter.java:28)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
        ...
        at java.lang.Thread.run(Thread.java:619)

or

java.lang.NullPointerException
	at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter$CertificateServerImpl.writeCertificate(TrustedApplicationsFilter.java:201)
	at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:90)
	at com.atlassian.confluence.util.AbstractBootstrapHotSwappingFilter.doFilter(AbstractBootstrapHotSwappingFilter.java:30)
	at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.atlassian.seraph.filter.BaseLoginFilter.doFilter(BaseLoginFilter.java:150)

Cause

Confluence cannot fetch or process the keypair from KEYSTORE:

JIRA Trusted Application console

The connection to host http://yourdomain.com could not be established due to an error:
java.io.IOException: Server returned HTTP response code: 500 for URL: http://yourdomain.com/admin/appTrustCertificate.

There may be other entries in the KEYSTORE table from other trusted connections between Confluence (for instance Fisheye). The query to retrieve the keypair may retrieve all keys from KEYSTORE but the code relies on the assumption that only one keypair (the one for JIRA) is present in the table.

Resolution

Always backup your data before performing any modifications to the database.

  1. Delete all entries in the Confluence DB table: KEYSTORE
  2. Delete all of the Confluence entries in the JIRA DB table: trustedapp
  3. Run this JSP in Confluence to create a fresh keypair in KEYSTORE
  4. Set up trust in JIRA

 

 

Last modified on Mar 30, 2016

Was this helpful?

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