📣 极限科技诚招搜索运维工程师(Elasticsearch/Easysearch)- 全职/北京 👉 : 立即申请加入

版本范围: 6.8-7.13

错误概述 #

简要来说,当 Elasticsearch 尝试读取由主节点写入数据存储的文件时遇到问题,就会出现此错误。这可能是由于以下原因导致的:

  • 网络问题
  • 磁盘空间不足
  • 文件损坏

解决方案 #

要解决此问题,可以尝试以下方法:

  1. 检查并确保有足够的磁盘空间
  2. 验证节点之间的网络连接
  3. 检查文件损坏情况,必要时从备份恢复
  4. 重启 Elasticsearch 服务

日志上下文 #

日志 “a file written by master to the store [” 的类名是 BlobStoreRepository.java。我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入上下文的开发者参考:

if (seedRead.equals(seed) == false) {
    throw new RepositoryVerificationException(metadata.name(), "Seed read from master.dat was [" + seedRead +
        "] but expected seed [" + seed + "]");
}
} catch (NoSuchFileException e) {
    throw new RepositoryVerificationException(metadata.name(), "a file written by master to the store [" + blobStore() +
        "] cannot be accessed on the node [" + localNode + "]. " +
        "This might indicate that the store [" + blobStore() + "] is not shared between this node and the master node or " +
        "that permissions on the store don't allow reading files written by the master node", e);
} catch (Exception e) {
    throw new RepositoryVerificationException(metadata.name(), "Failed to verify repository", e);