Bitbucket Data Center NodePassivationException the current node has been passivated when adding node to the cluster

お困りですか?

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

コミュニティに質問

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

問題

When adding an additional node to the Data Center cluster, the node does not join the cluster and the following appears in the atlassian-bitbucket.log for that node:

2015-10-01 10:31:04,322 WARN  [spring-startup]  o.s.w.c.s.XmlWebApplicationContext Exception encountered during context initialization - cancelling refresh attempt
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'crowdUserDao' defined in class path resource [crowd-spi-context.xml]: Unsatisfied dependency expressed through constructor argument with index 1 of type [com.atlassian.bitbucket.internal.project.ProjectDao]: : Error creating bean with name 'projectDao' defined in URL [jar:file:/opt/atlassian/bitbucket/4.0.0/atlassian-bitbucket/WEB-INF/lib/bitbucket-dao-impl-4.0.0.jar!/com/atlassian/bitbucket/internal/project/HibernateProjectDao.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [org.hibernate.SessionFactory]: : Error creating bean with name 'hazelcast' defined in class path resource [bitbucket-context.xml]: Invocation of init method failed; nested exception is com.atlassian.bitbucket.internal.cluster.NodePassivationException: The current node has been passivated; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hazelcast' defined in class path resource [bitbucket-context.xml]: Invocation of init method failed; nested exception is com.atlassian.bitbucket.internal.cluster.NodePassivationException: The current node has been passivated; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'projectDao' defined in URL [jar:file:/opt/atlassian/bitbucket/4.0.0/atlassian-bitbucket/WEB-INF/lib/bitbucket-dao-impl-4.0.0.jar!/com/atlassian/bitbucket/internal/project/HibernateProjectDao.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [org.hibernate.SessionFactory]: : Error creating bean with name 'hazelcast' defined in class path resource [bitbucket-context.xml]: Invocation of init method failed; nested exception is com.atlassian.bitbucket.internal.cluster.NodePassivationException: The current node has been passivated; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hazelcast' defined in class path resource [bitbucket-context.xml]: Invocation of init method failed; nested exception is com.atlassian.bitbucket.internal.cluster.NodePassivationException: The current node has been passivated
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757) ~[spring-context-4.1.6.RELEASE.jar:4.1.6.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480) ~[spring-context-4.1.6.RELEASE.jar:4.1.6.RELEASE]
	at javax.servlet.GenericServlet.init(GenericServlet.java:158) [servlet-api.jar:3.1.FR]
	at java.lang.Thread.run(Thread.java:745) [na:1.8.0_60]
	... 18 frames trimmed
...
Caused by: com.atlassian.bitbucket.internal.cluster.NodePassivationException: The current node has been passivated

原因

The NodePassivationException is thrown when a new node attempts to join the cluster and detects an issue, the node will passivate itself for safety. Potential reasons for this include:

  1. The failed node was using a different path for BITBUCKET_HOME_SHARED
  2. The failed node is configured for a different time zone than the running nodes

Bitbucket Data Center requires that the shared home path match across all nodes due to the absolute paths required for some git operations.

ソリューション

Shared home mismatch

Ensure that all nodes in the cluster are using the same path to the shared directory inside of BITBUCKET_HOME

The path that is being used can be checked during startup in the atlassian-bitbucket.log:

2015-10-01 10:46:40,408 INFO  [spring-startup]  c.a.b.internal.home.HomeLockAcquirer Successfully acquired lock on home directory /var/atlassian/application-data/bitbucket
2015-10-01 10:46:45,180 INFO  [spring-startup]  c.a.b.internal.home.HomeLockAcquirer Successfully acquired lock on home directory /mnt/nfs/bitbucket-shared

The first path is for BITBUCKET_HOME and the second is the for shared directory. The second path must match across all nodes.

Time zone mismatch


2016-11-07 11:33:41,179 WARN  [hz.hazelcast.IO.thread-Acceptor]  com.hazelcast.nio.tcp.SocketAcceptor [10.137.158.47]:5701 [testbitbucket] [3.5.2-atlassian-37] com.atlassian.stash.internal.cluster.NodeConnectionException: Required property 'timeZone' should be 'America/Chicago' but is 'US/Central'
com.atlassian.stash.internal.cluster.NodeConnectionException: Required property 'timeZone' should be 'America/Chicago' but is 'US/Central'

You can enforce a specific timezone for the JVM itself.

The following example sets the time zone for Chicago. You have to do that for each one of the nodes:

  • For Bitbucket Server version 4.14 and below, edit <BITBUCKET_INSTALL>/bin/setenv.sh:
  • For Bitbucket Server version 5.0 and above, edit <BITBUCKET_INSTALL>/bin/_start-webapp.sh:
<BITBUCKET_INSTALL>/bin/setenv.sh
-Duser.timezone=America/Chicago


Last modified on Mar 8, 2019

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

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