Elasticsearch同步出现timed out when collecting data的解决办法
Posted minseo
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Elasticsearch同步出现timed out when collecting data的解决办法相关的知识,希望对你有一定的参考价值。
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的解决办法的主要内容,如果未能解决你的问题,请参考以下文章
Fatal NI connect error 12170,TNS-12535: TNS:operation timed out,WARNING: inbound connection timed ou
[elasticsearch怎么和数据库同步]elasticsearch和mysql的数据同步采用哪种方案合适。