麋鹿在Docker Swarm和glusterFS崩溃 [英] Elk on Docker Swarm and glusterFS crash

查看:296
本文介绍了麋鹿在Docker Swarm和glusterFS崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在docker swarm上部署ELK堆栈.

I'm trying to deploy an ELK stack on docker swarm.

如果我将弹性数据目录绑定到Docker卷,就没有问题.

If I bind the elastic data directory to a Docker volume there is no problem.

当我尝试将弹性数据目录绑定到glusterFS卷时,问题就来了. 我使用glusterFS在集群中所有swarm节点之间同步数据. 我使用以下代码部署ELK:

The problems comes as soon as I try to bind the elstastic data directory to a glusterFS volume. I use glusterFS to synchronise the data between all the swarm nodes in the cluster. I deploy ELK using the following code:

elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:6.2.3
    # container_name: elasticsearch
    environment: 
      - "http.host=0.0.0.0"
      - "transport.host=127.0.0.1"
      - "ELASTIC_PASSWORD=changeme"
      - "TAKE_FILE_OWNERSHIP=1"
    ports: ['127.0.0.1:9200:9200']
    volumes:
      - /opt/dockershared/stack-elk/elk:/usr/share/elasticsearch/data
    networks: ['stack']

dir'/opt/dockershared/'是一个glusterFS卷:

The dir '/opt/dockershared/' is a glusterFS volume:

myhost:/opt/docker共享类型fuse.glusterfs上的/gvol0(rw,relatime,user_id = 0,group_id = 0,default_permissions,allow_other,max_read = 131072,_netdev)

myhost:/gvol0 on /opt/dockershared type fuse.glusterfs (rw,relatime,user_id=0,group_id=0,default_permissions,allow_other,max_read=131072,_netdev)

ELK堆栈启动没有问题,但是在30/60分钟后,分片分配失败. 在ELK日志中,我看到以下异常:

The ELK stack starts without problems, but after 30/60 minutes the allocation of the shards fails. In the ELK logs I see the following exceptions:

[2018-04-13T08:58:16,749] [WARN] [o.e.i.e.Engine] [MPxFOvC] [metricbeat-6.2.3-2018.04.13] [0]失败的引擎[刷新失败的源[时间表]] org.apache.lucene.index.CorruptIndexException:从商店读取索引时出现问题(MMapDirectory @/usr/share/elasticsearch/data/nodes/0/indices/fRcersH4RjecZ8AKb3WZTQ/0/index lockFactory = org.apache.lucene.store.NativeFSLockFactory @ 73620ce7)(资源=存储(MMapDirectory @/usr/share/elasticsearch/data/nodes/0/indices/fRcersH4RjecZ8AKb3WZTQ/0/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@73620ce7)) 在org.apache.lucene.index.SegmentCoreReaders.(SegmentCoreReaders.java:140)〜[lucene-core-7.2.1.jar:7.2.1 b2b6438b37073bee1fca40374e85bf91aa457c0b-ubuntu-2018-01-10 00:48:43] ...... 由以下原因引起:java.io.EOFException:过去的EOF:MMapIndexInput(path ="/usr/share/elasticsearch/data/nodes/0/indices/fRcersH4RjecZ8AKb3WZTQ/0/index/_47.cfe") 在org.apache.lucene.store.ByteBufferIndexInput.readByte(ByteBufferIndexInput.java:75)〜[lucene-core-7.2.1.jar:7.2.1 b2b6438b37073bee1fca40374e85bf91aa457c0b-ubuntu-2018-01-10 00:48:43] ...... 禁止:org.apache.lucene.index.CorruptIndexException:校验和状态不确定:其余= 0,请运行checkindex以获取更多详细信息(resource = BufferedChecksumIndexInput(MMapIndexInput(path ="/usr/share/elasticsearch/data/nodes/0/indices/fRcersH4RjecZ8AKb3WZTQ/0/index/_47.cfe))) .....

[2018-04-13T08:58:16,749][WARN ][o.e.i.e.Engine ] [MPxFOvC] [metricbeat-6.2.3-2018.04.13][0] failed engine [refresh failed source[schedule]] org.apache.lucene.index.CorruptIndexException: Problem reading index from store(MMapDirectory@/usr/share/elasticsearch/data/nodes/0/indices/fRcersH4RjecZ8AKb3WZTQ/0/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@73620ce7) (resource=store(MMapDirectory@/usr/share/elasticsearch/data/nodes/0/indices/fRcersH4RjecZ8AKb3WZTQ/0/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@73620ce7)) at org.apache.lucene.index.SegmentCoreReaders.(SegmentCoreReaders.java:140) ~[lucene-core-7.2.1.jar:7.2.1 b2b6438b37073bee1fca40374e85bf91aa457c0b - ubuntu - 2018-01-10 00:48:43] ...... Caused by: java.io.EOFException: read past EOF: MMapIndexInput(path="/usr/share/elasticsearch/data/nodes/0/indices/fRcersH4RjecZ8AKb3WZTQ/0/index/_47.cfe") at org.apache.lucene.store.ByteBufferIndexInput.readByte(ByteBufferIndexInput.java:75) ~[lucene-core-7.2.1.jar:7.2.1 b2b6438b37073bee1fca40374e85bf91aa457c0b - ubuntu - 2018-01-10 00:48:43] ...... Suppressed: org.apache.lucene.index.CorruptIndexException: checksum status indeterminate: remaining=0, please run checkindex for more details (resource=BufferedChecksumIndexInput(MMapIndexInput(path="/usr/share/elasticsearch/data/nodes/0/indices/fRcersH4RjecZ8AKb3WZTQ/0/index/_47.cfe"))) .....

可能是什么问题? 在所有群集节点之间共享弹性数据目录的最佳解决方案是什么?

What could be the problem? what is the best solution to share the elastic data dir among all the swarm nodes?

谢谢

推荐答案

我在ELK论坛上写道,这是答案: 麋鹿论坛

I wrote on ELK forum and this is the answer: elk forum

基本上,ELK仅支持本地磁盘或块存储.

Basically ELK supports only local disk or a block storage.

这篇关于麋鹿在Docker Swarm和glusterFS崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆