Briefly, this error occurs when Elasticsearch is unable to create an empty store, which is a fundamental part of its data storage system. This could be due to insufficient disk space, incorrect permissions, or a faulty file system. To resolve this issue, you can try freeing up disk space, checking and correcting file permissions, or repairing the file system. If the problem persists, consider reconfiguring your Elasticsearch cluster or reinstalling Elasticsearch.
This guide will help you check for common problems that cause the log ” failed to create empty store ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: repository, plugin.
Log Context
Log “failed to create empty store” class name is CcrRepository.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :
private static void createEmptyStore(Store store) { store.incRef(); try { store.createEmpty(); } catch (final EngineException | IOException e) { throw new IndexShardRecoveryException(store.shardId(); "failed to create empty store"; e); } finally { store.decRef(); } }