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 原理介紹AST
- elastic search服務搭建AST
- Elastic認證叢集環境準備AST
- Elasticsearch 7.x 之節點、叢集、分片及副本Elasticsearch
- search(4)- elastic4s-ElasticDslAST
- docker安裝elastic search和kibanaDockerAST
- redis偽叢集配置Cluster叢集模式Redis模式
- Kafka叢集配置Kafka
- search(9)- elastic4s logback-appenderASTAPP
- search(11)- elastic4s-模糊查詢AST
- search(5)- elastic4s-構建索引AST索引
- Elastic App Search 快速構建 ES 應用ASTAPP
- Docker Elasticsearch 叢集配置DockerElasticsearch
- 39_配置redis叢集Redis
- dubbo&nacos叢集配置
- linux 怎麼配置叢集Linux
- es 叢集配置推薦
- vCenter6.7 叢集配置
- Etcd叢集靜態配置
- search(13)- elastic4s-histograms:聚合直方圖ASTHistogram直方圖
- Spring Boot 2.x(十七):快速入門Elastic SearchSpring BootAST
- hadoop叢集配置和啟動Hadoop
- docker 配置 Mysql主從叢集DockerMySql
- Hadoop完全分散式叢集配置Hadoop分散式
- spark叢集的配置檔案Spark
- search(16)- elastic4s-內嵌檔案:nested and joinAST
- 大資料Spark叢集模式配置大資料Spark模式
- Hadoop叢集是配置時間同步!Hadoop
- redis原理及叢集主從配置Redis
- 如何在 RHEL8 /CentOS8 上建立多節點 Elastic stack 叢集CentOSAST
- 談談對搜尋技術Elastic Search&Lucene的理解AST
- ES(Elastic Search)update操作設定無 docment時進行insertAST
- Zookeeper-3.4.10 叢集的安裝配置
- 高可用Flink on YARN叢集快速配置Yarn
- Mariadb之半同步複製叢集配置
- kubeconfig 多個叢集配置 如何切換
- Zookeeper叢集 + Kafka叢集Kafka
- Centos 7 透過 targz 檔案安裝 Elastic Search 服務教程!CentOSAST