码迷,mamicode.com
首页 > 其他好文 > 详细

Elasticsearch同步出现timed out when collecting data的解决办法

时间:2020-06-17 13:06:38      阅读:310      评论:0      收藏:0      [点我收藏+]

标签:nod   mes   persist   同步   生效   policy   lse   src   ace   

  elasticsearch集群其中源es使用虚拟机CentOS搭建,新的node使用k8s搭建,同步速度慢

  elsasticsearch同步慢,出现以下提示的解决版本

[ERROR][o.e.x.m.c.n.NodeStatsCollector] [9OfhjwS] collector [node_stats] timed out when collecting data

   技术图片

 

   修改配置文件

/etc/sysctl.conf 

   增加以下两行

vm.max_map_count = 655360
vm.dirty_ratio = 10

   设置生效

# sysctl -p
net.ipv6.conf.all.disable_ipv6 = 1
vm.max_map_count = 655360
vm.dirty_ratio = 10
vm.dirty_background_ratio = 5

   增加k8s配置文件的资源配置

  完整配置文件如下

# cat es-statefulset.yaml 
apiVersion: apps/v1
kind: StatefulSet
metadata:
  labels:
    app: es-kibana
  name: es-kibana
  namespace: dev
spec:
  replicas: 1
  selector:
    matchLabels:
      app: es-kibana
  serviceName: "es-kibana"
  template:
    metadata:
      labels:
        app: es-kibana
    spec:
      imagePullSecrets:
      - name: registry-pull-secret
      containers:
      - image: 192.168.1.11/project/elasticsearch:6.6.2
        imagePullPolicy: Always
        name: elasticsearch
        resources:
          requests:
            memory: "4Gi"
            cpu: "1000m"
          limits:        
            memory: "8Gi"
            cpu: "2000m"
        volumeMounts:
        - name: es-config
          mountPath: /usr/share/elasticsearch/config/elasticsearch.yml
          subPath: elasticsearch.yml
        - name: es-persistent-storage
          mountPath: /usr/share/elasticsearch/data
      - image: 192.168.1.11/project/kibana:6.6.2
        imagePullPolicy: Always
        name: kibana
        volumeMounts:
        - name: kibana-config
          mountPath: /usr/share/kibana/config/kibana.yml
          subPath: kibana.yml
      volumes:
      - name: es-config
        configMap:
          name: es-config
      - name: kibana-config
        configMap:
          name: kibana-config
      - name: es-persistent-storage
        persistentVolumeClaim:
          claimName: es-pv-claim
      hostNetwork: true
      dnsPolicy: ClusterFirstWithHostNet
      nodeSelector:
       kubernetes.io/hostname: 172.16.30.1

   增加了资源配置

技术图片

 

   重新应用配置文件

Elasticsearch同步出现timed out when collecting data的解决办法

标签:nod   mes   persist   同步   生效   policy   lse   src   ace   

原文地址:https://www.cnblogs.com/minseo/p/13151740.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!