在 elasticsearch 7.3.2 的 fs 中创建快照时出错?

Error while creating snapshot in fs in elasticsearch 7.3.2?

我正在尝试在 elasticsearch 中创建快照 我在 elasticsearch.yml 中定义了 path.repo 正确指向文件夹 elasticsearch_backup 并且它具有权限

path.repo: /home/ubuntu/elasticsearch-backup

drwxr-xr-x 2 elasticsearch elasticsearch      4096 Dec 12 06:55 elasticsearch-backup/

我正在使用来自 kibana 的 api -

PUT /_snapshot/elasticsearch-backup
{
  "type": "fs",
  "settings": {
    "compress": true,
    "location": "/home/ubuntu/elasticsearch-backup"
  }
}

然后我得到的错误是 -

{
  "error": {
    "root_cause": [
      {
        "type": "repository_verification_exception",
        "reason": "[elasticsearch-backup] [[5_cX7DhMSw2KgPrVMEm3Gg, 'RemoteTransportException[[elastic-data-node-02][MY IP.11:9300][internal:admin/repository/verify]]; nested: RepositoryVerificationException[[elasticsearch-backup] a file written by master to the store [/home/ubuntu/elasticsearch-backup] cannot be accessed on the node [{elastic-data-node-02}{5_cX7DhMSw2KgPrVMEm3Gg}{KF6p34P9TSyp81QJQ56kgQ}{MY IP.11}{MY IP.11:9300}{di}{ml.machine_memory=8339873792, xpack.installed=true, ml.max_open_jobs=20}]. This might indicate that the store [/home/ubuntu/elasticsearch-backup] 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];'], [LhHj2udCRCWy7gt5iVQMsw, 'RemoteTransportException[[elastic-data-node-01][MY IP.10:9300][internal:admin/repository/verify]]; nested: RepositoryVerificationException[[elasticsearch-backup] a file written by master to the store [/home/ubuntu/elasticsearch-backup] cannot be accessed on the node [{elastic-data-node-01}{LhHj2udCRCWy7gt5iVQMsw}{S1TeQwE7Sjq6B__obrDEow}{MY IP.10}{MY IP.10:9300}{di}{ml.machine_memory=8339873792, xpack.installed=true, ml.max_open_jobs=20}]. This might indicate that the store [/home/ubuntu/elasticsearch-backup] 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];']]"
      }
    ],
    "type": "repository_verification_exception",
    "reason": "[elasticsearch-backup] [[5_cX7DhMSw2KgPrVMEm3Gg, 'RemoteTransportException[[elastic-data-node-02][MY IP.11:9300][internal:admin/repository/verify]]; nested: RepositoryVerificationException[[elasticsearch-backup] a file written by master to the store [/home/ubuntu/elasticsearch-backup] cannot be accessed on the node [{elastic-data-node-02}{5_cX7DhMSw2KgPrVMEm3Gg}{KF6p34P9TSyp81QJQ56kgQ}{MY IP.11}{MY IP.11:9300}{di}{ml.machine_memory=8339873792, xpack.installed=true, ml.max_open_jobs=20}]. This might indicate that the store [/home/ubuntu/elasticsearch-backup] 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];'], [LhHj2udCRCWy7gt5iVQMsw, 'RemoteTransportException[[elastic-data-node-01][MY IP.10:9300][internal:admin/repository/verify]]; nested: RepositoryVerificationException[[elasticsearch-backup] a file written by master to the store [/home/ubuntu/elasticsearch-backup] cannot be accessed on the node [{elastic-data-node-01}{LhHj2udCRCWy7gt5iVQMsw}{S1TeQwE7Sjq6B__obrDEow}{MY IP.10}{MY IP.10:9300}{di}{ml.machine_memory=8339873792, xpack.installed=true, ml.max_open_jobs=20}]. This might indicate that the store [/home/ubuntu/elasticsearch-backup] 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];']]"
  },
  "status": 500
}

This might indicate that the store [/home/ubuntu/elasticsearch-backup] 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

如果你有多个节点并且想使用 shared file system repository (fs),你需要有一个所有节点都可以访问的... 共享文件系统,否则这个无法工作。

为了注册共享文件系统存储库,必须将相同的共享文件系统挂载到所有主节点和数据节点上的相同位置。