Unable to Add Confluence as A Trusted Application

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

Adding Confluence to JIRA as a trusted application fails. Visiting http://<confluence url>/admin/appTrustCertificate produces the following stack trace:

java.lang.NullPointerException
	org.apache.commons.codec.digest.DigestUtils.md5(DigestUtils.java:86)
	com.atlassian.confluence.security.trust.DefaultTrustedApplicationsManager.getAliasForSid(DefaultTrustedApplicationsManager.java:141)
	com.atlassian.confluence.security.trust.DefaultTrustedApplicationsManager.getSystemAlias(DefaultTrustedApplicationsManager.java:135)
	com.atlassian.confluence.security.trust.DefaultTrustedApplicationsManager.getCurrentApplication(DefaultTrustedApplicationsManager.java:115)
	sun.reflect.GeneratedMethodAccessor1001.invoke(Unknown Source)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	java.lang.reflect.Method.invoke(Method.java:585)

 

java.lang.NullPointerException
at com.atlassian.confluence.applinks.ConfluenceInternalHostApplication.getId(ConfluenceInternalHostApplication.java:212)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:129)
at $Proxy154.getId(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)


診断

When going to Confluence license key panel, the Server ID looks like:

Server ID   	 $action.serverId  

原因

Trusted application works by retrieving a Public Key from the application it's going to trust. In this case, Confluence failed to produce a public key because it does not have a server id in the database.

ソリューション

First Step: Restore the Server ID

You will need to retrieve the server ID from <confluence data>/confluence.cfg.xml into the database. This can be done by executing a java script from CONF-10576.

Please follow the instruction here (applies for Confluence 3.x as well).

Second Step: Initialize KEYSTORE table in Confluence database
  1. Download a JSP file called initKeyStore_2_10.jsp from CONF-11074. Despite its name, it works with Confluence 3.x.
  2. Place it in your <confluence install>/confluence/admin folder
  3. Confluence を再起動します。
  4. Open a browser to http://<confluence url>/admin/initKeyStore_2_10.jsp
  5. Click on the 'Proceed' button

(info) Confirm by visiting http://<confluence url>/admin/appTrustCertificate. Some text with an encoded key should appear, rather than the stacktrace above.

If you are running on Confluence 4 and later, you may instead download a JSP file called initKeyStore_4_2.jsp from CONF-11074 and follow the same instructions above.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Last modified on Mar 30, 2016

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.