Space import Fails due to corrupt cache

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

The Space import procedure throws a java.lang.Null.Pointer.Exception on the UI, no further details are showed.

Diagnosis

Looking for references at the atlassian-confluence.log. The following stack is presented during Space import

2021-07-07 15:38:21,768 ERROR [Long running task: Importing data] [confluence.importexport.xmlimport.BackupImporter] importEntities Cannot import the entities: 
 -- url: /admin/restore.action | referer: https://localhost/admin/backup.action | traceId: a9415668574b2d69 | userName: keek | action: restore
java.lang.NullPointerException
	at com.atlassian.cache.hazelcast.HazelcastHybridCache.isFlushable(HazelcastHybridCache.java:311)
	at com.atlassian.cache.impl.AbstractCacheManager.flushCaches(AbstractCacheManager.java:103)
	at com.atlassian.confluence.cache.hazelcast.ConfluenceHazelcastCacheManager.flushCaches(ConfluenceHazelcastCacheManager.java:103)
	at com.atlassian.confluence.impl.cache.hibernate.HibernateClusterAwareCacheManager.flushCaches(HibernateClusterAwareCacheManager.java:91)
	at java.util.ArrayList.forEach(ArrayList.java:1259)
	at com.atlassian.confluence.impl.cache.CacheFlusher.lambda$createCompositeCacheFlusher$0(CacheFlusher.java:37)
	at com.atlassian.confluence.importexport.xmlimport.BackupImporter.postProcess(BackupImporter.java:466)
	at com.atlassian.confluence.importexport.xmlimport.BackupImporter.importEntities(BackupImporter.java:402)
	at com.atlassian.confluence.importexport.xmlimport.BackupImporter.importEverything(BackupImporter.java:368)
	at com.atlassian.confluence.importexport.xmlimport.FileBackupImporter.importEverything(FileBackupImporter.java:169)
	at com.atlassian.confluence.importexport.xmlimport.BackupImporter$1.doInTransactionWithoutResult(BackupImporter.java:260)
	at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:36)
	at com.atlassian.confluence.importexport.xmlimport.RestorePluginStateStoreTransactionCallbackDecorator.doInTransaction(RestorePluginStateStoreTransactionCallbackDecorator.java:47)
	at com.atlassian.confluence.importexport.xmlimport.RestoreBandanaValuesTransactionCallbackDecorator.doInTransaction(RestoreBandanaValuesTransactionCallbackDecorator.java:50)
	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140)
	at com.atlassian.confluence.importexport.xmlimport.BackupImporter.doImportInternal(BackupImporter.java:222)
	at com.atlassian.confluence.importexport.Importer.doImport(Importer.java:73)
	at com.atlassian.confluence.importexport.DefaultImportExportManager.performImportInternal(DefaultImportExportManager.java:118)
	at com.atlassian.confluence.importexport.DefaultImportExportManager.doPerformImport(DefaultImportExportManager.java:106)
	at com.atlassian.confluence.importexport.DefaultImportExportManager.performImport(DefaultImportExportManager.java:101)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

(warning)Note that the last methods of the stack are all related to Hazelcast

	at com.atlassian.cache.hazelcast.HazelcastHybridCache.isFlushable(HazelcastHybridCache.java:311)
	at com.atlassian.cache.impl.AbstractCacheManager.flushCaches(AbstractCacheManager.java:103)
	at com.atlassian.confluence.cache.hazelcast.ConfluenceHazelcastCacheManager.flushCaches(ConfluenceHazelcastCacheManager.java:103)
	at com.atlassian.confluence.impl.cache.hibernate.HibernateClusterAwareCacheManager.flushCaches(HibernateClusterAwareCacheManager.java:91)

The method below even appears at other tasks that might fail due to the same reason.

at com.atlassian.cache.hazelcast.HazelcastHybridCache.isFlushable(HazelcastHybridCache.java:311)


Also, when trying to flush the cache, we could have the following error on the UI.


This confirms that we have a large cache issue on the instance.

Resolution

As the error, while importing the space is a symptom of a bigger issue with the instance cache, we do recommend flushing the cache by restarting the application.

(warning) In Data-Center environments, a rolling restart is required to clean up the caches across the cluster.


Last modified on Jul 21, 2021

Was this helpful?

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