elasticsearch,nfs,Docker,elasticsearch,Nfs" /> elasticsearch,nfs,Docker,elasticsearch,Nfs" />

Docker Elasticsearch创建快照回购抛出RepositoryVerificationException

Docker Elasticsearch创建快照回购抛出RepositoryVerificationException,docker,elasticsearch,nfs,Docker,elasticsearch,Nfs,我正在尝试为elasticsearch集群拍摄快照。在Docker容器中有3个VM分别运行1个主节点、1个数据节点和1个客户端节点。每个虚拟机都连接了一个用于存储的卷。因此,一个包含3个主机、3个客户端、3个数据节点和3个卷的集群 阅读文档后,我创建了一个单独的备份卷,并将其连接到其中一个VM。之后,我在所有3个VM之间创建了一个NFS,将数据保存在备份卷上,然后修改了集群,并将共享NFS目录作为卷装载到集群中的所有节点 因此,现在每个VM都有以下功能: VM1: VM2: VM3: 当我在其中

我正在尝试为elasticsearch集群拍摄快照。在Docker容器中有3个VM分别运行1个主节点、1个数据节点和1个客户端节点。每个虚拟机都连接了一个用于存储的卷。因此,一个包含3个主机、3个客户端、3个数据节点和3个卷的集群

阅读文档后,我创建了一个单独的备份卷,并将其连接到其中一个VM。之后,我在所有3个VM之间创建了一个NFS,将数据保存在备份卷上,然后修改了集群,并将共享NFS目录作为卷装载到集群中的所有节点

因此,现在每个VM都有以下功能:

VM1:

VM2:

VM3:

当我在其中创建一个文件时,我可以看到它、修改它或其他任何东西,并且操作可以从每个VM中看到

Elasticsearch docker节点:

drwxr-xr-x 1 elasticsearch elasticsearch   4096 May 15  2018 config
drwxr-xr-x 4 elasticsearch elasticsearch   4096 Jul 23 12:15 data
drwxr-xr-x 2 elasticsearch elasticsearch   4096 Jul 24 15:08 elastic-backup
每个docker elasticsearch节点都装载了相同的目录。我可以看到每个节点的所有文件

问题在于,每当我尝试创建快照存储库时,都会出现以下错误:

电话:

错误:

{
  "error": {
    "root_cause": [
      {
        "type": "repository_verification_exception",
        "reason": "[elastic-backup-1] [[some-id, 'RemoteTransportException[[master-2][VM2-ip][internal:admin/repository/verify]]; nested: RepositoryVerificationException[[elastic-backup-1] a file written by master to the store [/usr/share/elasticsearch/elastic-backup] cannot be accessed on the node [{master-2}{some-id}{some-id}{VM2-ip}{VM2-ip}{zone=AZ2}]. This might indicate that the store [/usr/share/elasticsearch/elastic-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];'], [some-id, 'RemoteTransportException[[data-2][VM2-ip][internal:admin/repository/verify]]; nested: RepositoryVerificationException[[elastic-backup-1] a file written by master to the store [/usr/share/elasticsearch/elastic-backup] cannot be accessed on the node [{data-2}{some-id}{some-id}{VM2-ip}{VM2-ip}{zone=AZ2}]. This might indicate that the store [/usr/share/elasticsearch/elastic-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];'], [some-id, 'RemoteTransportException[[data-1][VM1-ip][internal:admin/repository/verify]]; nested: RepositoryVerificationException[[elastic-backup-1] a file written by master to the store [/usr/share/elasticsearch/elastic-backup] cannot be accessed on the node [{data-1}{some-id}{some-id}{VM1-ip}{VM1-ip}{zone=AZ1}]. This might indicate that the store [/usr/share/elasticsearch/elastic-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];'], [some-id, 'RemoteTransportException[[master-1][VM1-ip][internal:admin/repository/verify]]; nested: RepositoryVerificationException[[elastic-backup-1] a file written by master to the store [/usr/share/elasticsearch/elastic-backup] cannot be accessed on the node [{master-1}{some-id}{some-id}{VM1-ip}{VM1-ip}{zone=AZ1}]. This might indicate that the store [/usr/share/elasticsearch/elastic-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];'], [some-id, 'RemoteTransportException[[data-3][VM3-ip][internal:admin/repository/verify]]; nested: RepositoryVerificationException[[elastic-backup-1] a file written by master to the store [/usr/share/elasticsearch/elastic-backup] cannot be accessed on the node [{data-3}{some-id}{some-id}{VM3-ip}{VM3-ip}{zone=AZ1}]. This might indicate that the store [/usr/share/elasticsearch/elastic-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];']]"
      }
etc ..
我做错了什么?如何解决此问题正如所述,您必须提供一个共享文件系统

您需要在所有节点都可以访问的存储库路径后面有一个共享卷,例如NFS卷。这意味着,如果节点1写入文件,节点2和节点3将看到该文件。因此,即使所有计算机上的路径相同,本地文件系统中的目录也无法工作

如所述,您必须提供一个共享文件系统

您需要在所有节点都可以访问的存储库路径后面有一个共享卷,例如NFS卷。这意味着,如果节点1写入文件,节点2和节点3将看到该文件。因此,即使所有计算机上的路径相同,本地文件系统中的目录也无法工作

drwxr-xr-x   3 root   root     4096 Jul 24 15:28 boot
drwxr-xr-x   5 root   root     4096 Jan 27 16:41 data
drwxr-xr-x  16 root   root     3560 Jul 24 10:30 dev
drwxr-xr-x   2 nobody nogroup  4096 Jul 24 15:34 elastic-backup
drwxr-xr-x 1 elasticsearch elasticsearch   4096 May 15  2018 config
drwxr-xr-x 4 elasticsearch elasticsearch   4096 Jul 23 12:15 data
drwxr-xr-x 2 elasticsearch elasticsearch   4096 Jul 24 15:08 elastic-backup
PUT /_snapshot/elastic-backup-1
{
  "type": "fs",
  "settings": {
    "location": "/usr/share/elasticsearch/elastic-backup"
  }
}
{
  "error": {
    "root_cause": [
      {
        "type": "repository_verification_exception",
        "reason": "[elastic-backup-1] [[some-id, 'RemoteTransportException[[master-2][VM2-ip][internal:admin/repository/verify]]; nested: RepositoryVerificationException[[elastic-backup-1] a file written by master to the store [/usr/share/elasticsearch/elastic-backup] cannot be accessed on the node [{master-2}{some-id}{some-id}{VM2-ip}{VM2-ip}{zone=AZ2}]. This might indicate that the store [/usr/share/elasticsearch/elastic-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];'], [some-id, 'RemoteTransportException[[data-2][VM2-ip][internal:admin/repository/verify]]; nested: RepositoryVerificationException[[elastic-backup-1] a file written by master to the store [/usr/share/elasticsearch/elastic-backup] cannot be accessed on the node [{data-2}{some-id}{some-id}{VM2-ip}{VM2-ip}{zone=AZ2}]. This might indicate that the store [/usr/share/elasticsearch/elastic-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];'], [some-id, 'RemoteTransportException[[data-1][VM1-ip][internal:admin/repository/verify]]; nested: RepositoryVerificationException[[elastic-backup-1] a file written by master to the store [/usr/share/elasticsearch/elastic-backup] cannot be accessed on the node [{data-1}{some-id}{some-id}{VM1-ip}{VM1-ip}{zone=AZ1}]. This might indicate that the store [/usr/share/elasticsearch/elastic-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];'], [some-id, 'RemoteTransportException[[master-1][VM1-ip][internal:admin/repository/verify]]; nested: RepositoryVerificationException[[elastic-backup-1] a file written by master to the store [/usr/share/elasticsearch/elastic-backup] cannot be accessed on the node [{master-1}{some-id}{some-id}{VM1-ip}{VM1-ip}{zone=AZ1}]. This might indicate that the store [/usr/share/elasticsearch/elastic-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];'], [some-id, 'RemoteTransportException[[data-3][VM3-ip][internal:admin/repository/verify]]; nested: RepositoryVerificationException[[elastic-backup-1] a file written by master to the store [/usr/share/elasticsearch/elastic-backup] cannot be accessed on the node [{data-3}{some-id}{some-id}{VM3-ip}{VM3-ip}{zone=AZ1}]. This might indicate that the store [/usr/share/elasticsearch/elastic-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];']]"
      }
etc ..