Elastic Search 7.x 叢集配置
2、配置elasticsearch.yml。
a節點(192.168.137.200)
#叢集名稱
cluster.name : elasticsearch
#節點名稱
node.name : node-a
#是不是有資格競選主節點
node.master : true
#是否儲存資料
node.data : true
#最大叢集節點數
node.max_local_storage_nodes : 3
#閘道器地址
network.host : 192.168.137.200
#埠
http.port : 9200
#內部節點之間溝通埠
transport.tcp.port : 9300
#es7.x 之後新增的配置,寫入候選主節點的裝置地址,在開啟服務後可以被選為主節點
discovery.seed_hosts : [ "192.168.137.200:9300" , "192.168.137.201:9300" , "192.168.137.202:9300" ]
#es7.x 之後新增的配置,初始化一個新的叢集時需要此配置來選舉master
cluster.initial_master_nodes : [ "192.168.137.200" , "192.168.137.201" , "192.168.137.202" ]
# ping超時時長,預設3S,適當修改,防止腦裂
discovery.zen.ping_timeout: 120s
client.transport.ping_timeout: 60s
#資料儲存路徑(這裡不配,預設就好)
##path.data: /home/es/software/es/data
#日誌儲存路徑
#path.logs: /home/es/software/es/logs
bootstrap.system_call_filter: false
http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-methods: OPTIONS, HEAD, GET, POST, PUT, DELETE
http.cors.allow-headers: "X-Requested-With, Content-Type, Content-Length, X-User"
b節點(192.168.137.201)
#叢集名稱 cluster.name: elasticsearch #節點名稱 node.name: node-b #是不是有資格競選主節點 node.master: true #是否儲存資料 node.data: true #最大叢集節點數 node.max_local_storage_nodes: 3 #閘道器地址 network.host: 192.168.137.201 #埠 http.port: 9200 #內部節點之間溝通埠 transport.tcp.port: 9300 #es7.x 之後新增的配置,寫入候選主節點的裝置地址,在開啟服務後可以被選為主節點 discovery.seed_hosts: ["192.168.137.200:9300","192.168.137.201:9300","192.168.137.202:9300"] #es7.x 之後新增的配置,初始化一個新的叢集時需要此配置來選舉master cluster.initial_master_nodes: ["192.168.137.200", "192.168.137.201","192.168.137.202"] # ping超時時長,預設3S,適當修改,防止腦裂 discovery.zen.ping_timeout: 120s client.transport.ping_timeout: 60s #資料儲存路徑(這裡不配,預設就好) ##path.data: /home/es/software/es/data #日誌儲存路徑 #path.logs: /home/es/software/es/logs bootstrap.system_call_filter: false http.cors.enabled: true http.cors.allow-origin: "*" http.cors.allow-methods: OPTIONS, HEAD, GET, POST, PUT, DELETE http.cors.allow-headers: "X-Requested-With, Content-Type, Content-Length, X-User"
c節點(192.168.137.202)
#叢集名稱 cluster.name: elasticsearch #節點名稱 node.name: node-c #是不是有資格競選主節點 node.master: true #是否儲存資料 node.data: true #最大叢集節點數 node.max_local_storage_nodes: 3 #閘道器地址 network.host: 192.168.137.202 #埠 http.port: 9200 #內部節點之間溝通埠 transport.tcp.port: 9300 #es7.x 之後新增的配置,寫入候選主節點的裝置地址,在開啟服務後可以被選為主節點 discovery.seed_hosts: ["192.168.137.200:9300","192.168.137.201:9300","192.168.137.202:9300"] #es7.x 之後新增的配置,初始化一個新的叢集時需要此配置來選舉master cluster.initial_master_nodes: ["192.168.137.200", "192.168.137.201","192.168.137.202"] # ping超時時長,預設3S,適當修改,防止腦裂 discovery.zen.ping_timeout: 120s client.transport.ping_timeout: 60s #資料儲存路徑(這裡不配,預設就好) ##path.data: /home/es/software/es/data #日誌儲存路徑 #path.logs: /home/es/software/es/logs bootstrap.system_call_filter: false http.cors.enabled: true http.cors.allow-origin: "*" http.cors.allow-methods: OPTIONS, HEAD, GET, POST, PUT, DELETE http.cors.allow-headers: "X-Requested-With, Content-Type, Content-Length, X-User"
Elasticsearch啟動失敗,檢查沒有透過,報錯
ERROR: [2] bootstrap checks failed [ 1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[1]: max file descriptors [65535] for elasticsearch process is too low, increase to at least [65536]
編輯 /etc/security/limits.conf,追加以下內容;
-
soft nofile 65536
-
hard nofile 65536
[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
編輯 /etc/sysctl.conf,追加以下內容: vm.max_map_count=655360 儲存後,執行: sysctl -p
錯誤提示:ERROR: [1] bootstrap checks failed [ 1]: max number of threads [1024] for user [elasticsearch] is too low, increase to at least [2048] vi /etc/security/limits.d/90-nproc.conf,把1024改為4096
-
* soft nproc 4096
-
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31537832/viewspace-2692556/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Elastic Search Java ApiASTJavaAPI
- elastic search服務搭建AST
- Elastic認證叢集環境準備AST
- Elastic Search 索引 API 介紹AST索引API
- Elasticsearch 7.x 之節點、叢集、分片及副本Elasticsearch
- search(4)- elastic4s-ElasticDslAST
- redis偽叢集配置Cluster叢集模式Redis模式
- docker安裝elastic search和kibanaDockerAST
- Kafka叢集配置Kafka
- mongo 叢集配置Go
- MySQL叢集配置MySql
- search(5)- elastic4s-構建索引AST索引
- search(11)- elastic4s-模糊查詢AST
- Elastic App Search 快速構建 ES 應用ASTAPP
- Docker Elasticsearch 叢集配置DockerElasticsearch
- MySQL叢集配置(轉)MySql
- HA叢集heartbeat配置--NginxNginx
- FastDFS 叢集 安裝 配置AST
- xCAT叢集管理配置工具
- 【Mongodb】Sharding 叢集配置MongoDB
- 39_配置redis叢集Redis
- search(13)- elastic4s-histograms:聚合直方圖ASTHistogram直方圖
- linux 怎麼配置叢集Linux
- spark叢集的配置檔案Spark
- docker 配置 Mysql主從叢集DockerMySql
- Vert.x 叢集配置 TCPTCP
- redis sentinel 叢集監控 配置Redis
- weblogic8.1叢集配置Web
- Weblogic10 叢集配置Web
- search(9)- elastic4s logback-appenderASTAPP
- search(16)- elastic4s-內嵌檔案:nested and joinAST
- Spring Boot 2.x(十七):快速入門Elastic SearchSpring BootAST
- 如何在 RHEL8 /CentOS8 上建立多節點 Elastic stack 叢集CentOSAST
- redis原理及叢集主從配置Redis
- Hadoop完全分散式叢集配置Hadoop分散式
- 大資料Spark叢集模式配置大資料Spark模式
- Elasticsearch分散式搜尋叢集配置Elasticsearch分散式
- Quartz叢集原理及配置應用quartz