Stash stops with HazelcastInstanceNotActiveException
プラットフォームについて: 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 は除く
問題
Stash stops and the following appears in the atlassian-stash.log
:
2015-04-21 11:00:00,000 DEBUG [Navlink Plugin Executor:thread-5] c.a.p.n.c.m.s.CachingLinkedApplicationCapabilitiesImpl Failed to refresh linked application capabilities cache
com.atlassian.cache.CacheException: com.hazelcast.core.HazelcastInstanceNotActiveException: Hazelcast instance is not active!
at com.atlassian.cache.memory.DelegatingCachedReference.get(DelegatingCachedReference.java:60) ~[atlassian-cache-memory-2.6.10.jar:na]
at com.atlassian.cache.hazelcast.HazelcastHybridCachedReference.get(HazelcastHybridCachedReference.java:79) ~[atlassian-cache-hazelcast-2.6.10.jar:na]
at com.atlassian.applinks.core.DefaultReadOnlyApplicationLinkService.getApplicationLinks(DefaultReadOnlyApplicationLinkService.java:128) ~[na:na]
at com.atlassian.plugins.navlink.consumer.menu.services.CapabilitiesCacheLoader.getKeys(CapabilitiesCacheLoader.java:39) ~[atlassian-nav-links-plugin-3.3.15_1425959230000.jar:na]
at com.atlassian.failurecache.ExpirationDateBasedCacheImpl.updateCacheKeys(ExpirationDateBasedCacheImpl.java:86) ~[atlassian-failure-cache-plugin-0.15.jar:na]
at com.atlassian.failurecache.ExpirationDateBasedCacheImpl.refresh(ExpirationDateBasedCacheImpl.java:78) ~[atlassian-failure-cache-plugin-0.15.jar:na]
at com.atlassian.plugins.navlink.consumer.menu.services.CachingLinkedApplicationCapabilitiesImpl.refreshCache(CachingLinkedApplicationCapabilitiesImpl.java:90) [atlassian-nav-links-plugin-3.3.15_1425959230000.jar:na]
at com.atlassian.plugins.navlink.consumer.menu.services.CachingLinkedApplicationCapabilitiesImpl.run(CachingLinkedApplicationCapabilitiesImpl.java:70) [atlassian-nav-links-plugin-3.3.15_1425959230000.jar:na]
at com.atlassian.sal.core.executor.ThreadLocalDelegateRunnable.run(ThreadLocalDelegateRunnable.java:38) ~[sal-core-2.13.3.jar:na]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) ~[na:1.7.0_25]
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351) ~[na:1.7.0_25]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178) ~[na:1.7.0_25]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178) ~[na:1.7.0_25]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ~[na:1.7.0_25]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ~[na:1.7.0_25]
at java.lang.Thread.run(Thread.java:724) ~[na:1.7.0_25]
... 21 frames trimmed
Caused by: com.hazelcast.core.HazelcastInstanceNotActiveException: Hazelcast instance is not active!
原因
When Hazelcast, the library Bitbucket Server uses for caching and many other things, detects an OutOfMemoryError it automatically shuts down.
Upon observing a lot of Full GC operations the heap size may need to be increased. The high memory consumption may also be caused by add-ons which don't manage their memory well.
ソリューション
Upgrade to Bitbucket Server 3.10+
In Bitbucket Server 3.10, the behavior was improved around Hazelcast and OutOfMemoryErrors - - BSERV-7420Getting issue details... STATUS
Increase the heap size
Bitbucket Server 5.0+ では setenv と環境変数に変更があります
Bitbucket Server 5.0 以降では setenv.sh
と setenv.bat
が取り除かれています。これらのファイルで設定されていたオプションは、環境変数で設定できるようになりました。環境変数の設定場所は、実行先のオペレーティング システムに応じます。
Linux
When using the atlbitbucket
service on Linux, the environment variables are ignored. You must set the parameters in _start-webapp.sh (or start-bitbucket.sh)
. These values will be read when the service starts.
たとえば、 JVM_SUPPORT_RECOMMENDED_ARGS
を設定するには、ファイルに次の行を追加します。
JVM_SUPPORT_RECOMMENDED_ARGS=-XX:+HeapDumpOnOutOfMemoryError
Windows
Bitbucket Server を実行しているユーザーで、パラメーターを環境変数として設定します。たとえば、JVM_SUPPORT_RECOMMENDED_ARGS
を設定したい場合、それを環境変数として作成して適切な値を割り当てます。Bitbucket Server がスタートアップ スクリプトやサービスを利用して起動する際に、この値が取得および適用されます。
Linux
Windows サービス
Windows (.batファイルから起動)
If having any 3rd party add-ons installed that could be causing this:
- Disable the add-on for a while.
- Monitor the Bitbucket Server instance, checking if the issue persists.
Some add-ons may require more memory to be used, so increasing the heap space may help in this case.
If the above doesn't help and the issue needs to be further investigated generate a Heap Dump as per the instructions in How to debug Out of Memory Heap Space and open a support ticket at https://support.atlassian.com/ja.