Bitbucket Server SSH server fails to start due to 'BouncyCastle is not registered as expected'

お困りですか?

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

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

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.

*Fisheye および Crucible は除く

問題

When starting up the Bitbucket Server application the ssh plugin does not start up.

atlassian.bitbucket.log に次のメッセージが出力される。

2015-06-10 00:26:21,021 ERROR [ThreadPoolAsyncTaskExecutor::Thread 22]  c.a.plugin.osgi.factory.OsgiPlugin Unable to start the plugin container for plugin 'com.atlassian.bitbucket.ssh-plugin'
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sshServer' defined in URL [bundle://49.0:0/META-INF/spring/atlassian-plugins-components.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.atlassian.bitbucket.internal.ssh.server.SshServer]: Constructor threw exception; nested exception is java.lang.IllegalStateException: BouncyCastle is not registered as expected
	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:254) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
	at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_40]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728) ~[spring-context-4.1.6.RELEASE.jar:4.1.6.RELEASE]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_40]
	at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_40]
	... 17 frames trimmed
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.atlassian.bitbucket.internal.ssh.server.SshServer]: Constructor threw exception; nested exception is java.lang.IllegalStateException: BouncyCastle is not registered as expected
	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:115) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
	... 5 common frames omitted
Caused by: java.lang.IllegalStateException: BouncyCastle is not registered as expected
	at com.google.common.base.Preconditions.checkState(Preconditions.java:145) ~[guava-11.0.2-atlassian-02.jar:na]
	at com.atlassian.bitbucket.internal.ssh.server.SshServer.<init>(SshServer.java:61) ~[na:na]
	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
	... 5 common frames omitted

診断

Diagnostic Steps

Within the application.xml file in a generated support.zip from Bitbucket Server you can see that the com.atlassian.bitbucket.ssh-plugin 's status is disabled.

    <plugin>
      <key>com.atlassian.bitbucket.ssh-plugin</key>
      <version>3.2.4</version>
      <vendor>Atlassian</vendor>
      <status>DISABLED</status>
      <vendor-url>http://www.atlassian.com</vendor-url>
      <framework-version>2</framework-version>
    </plugin>

原因

The presence of the following JAVA option will cause this error:

-Dsun.net.spi.nameservice.provider.1=dns,sun

ソリューション

Remove the option and restart the Bitbucket Server service.

The java arguments may be set on $BITBUCKET_INST/bin/_start-webapp.sh or in the Windows/Linux service.


最終更新日 2022 年 8 月 31 日

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

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