elasticsearch安装 及 启动异常解决
虛擬機使用net連接模式
1
Download and unzip the latest Elasticsearch distribution
2
Run bin/elasticsearch on Unix or bin\elasticsearch.bat on Windows
3
Run curl -X GET http://localhost:9200/
官網 :www.elastic.co
包含 安裝介質 和 權威指南
1下載
elasticsearch 下載地址: https://www.elastic.co/cn/downloads/elasticsearch
linux 對應版本 elasticsearch-7.0.0-rc2-linux-x86_64.tar.gz 大小330 MB
2建用戶
useradd es
passwd es
123456
es/123456
3上傳到虛擬機
put elasticsearch-7.0.0-rc2-linux-x86_64.tar.gz
4解壓
tar -zxvf elasticsearch-7.0.0-rc2-linux-x86_64.tar.gz
啟動
cd elasticsearch-7.0.0-rc2/bin
./elasticsearch
5警告跳過
unable to install syscall filter:
java.lang.UnsupportedOperationException: seccomp unavailable: requires kernel 3.5+ with CONFIG_SECCOMP and CONFIG_SECCOMP_FILTER compiled in
6檢驗
http://localhost:9200/
{
“name” : “localhost.localdomain”,
“cluster_name” : “elasticsearch”,
“cluster_uuid” : “WuVD9aKLTYyt_XbWbxZxAg”,
“version” : {
“number” : “7.0.0-rc2”,
“build_flavor” : “default”,
“build_type” : “tar”,
“build_hash” : “f076a79”,
“build_date” : “2019-04-02T17:20:40.380908Z”,
“build_snapshot” : false,
“lucene_version” : “8.0.0”,
“minimum_wire_compatibility_version” : “6.7.0”,
“minimum_index_compatibility_version” : “6.0.0-beta1”
},
“tagline” : “You Know, for Search”
}
遇到得問題
7 http://ip:9200/ 無法訪問
vim config/elasticsearch.yml
增加
network.host: 0.0.0.0
8重啟 es 異常
ERROR: [5] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
[2]: max number of threads [1024] for user [es] is too low, increase to at least [4096]
[3]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[4]: failed to install; check the logs and fix your configuration or disable system call filters at your own risk
[5]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured
[2019-04-09T09:51:29,228][INFO ][o.e.n.Node ] [localhost.localdomain] stopping …
[2019-04-09T09:51:29,264][INFO ][o.e.n.Node ] [localhost.localdomain] stopped
[2019-04-09T09:51:29,265][INFO ][o.e.n.Node ] [localhost.localdomain] closing …
[2019-04-09T09:51:29,320][INFO ][o.e.n.Node ] [localhost.localdomain] closed
[2019-04-09T09:51:29,323][INFO ][o.e.x.m.p.NativeController] [localhost.localdomain] Native controller process has stopped - no new native processes can be started
切換root用戶
vi /etc/security/limits.conf
在倒數第二行
- soft nofile 65536
- hard nofile 65536
End of file
vi /etc/sysctl.conf
添加
vm.max_map_count=655360
保存后執行
sysctl -p
重啟es 異常
ERROR: [3] bootstrap checks failed
[1]: max number of threads [1024] for user [es] is too low, increase to at least [4096]
[2]: system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk
[3]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured
vi /etc/security/limits.d/90-nproc.conf
修改
- soft nproc 1024
為
- soft nproc 4096
重啟es 異常
ERROR: [2] bootstrap checks failed
[1]: system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk
[2]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured
在 elasticsearch.yml中添加配置項:bootstrap.system_call_filter為false:
bootstrap.memory_lock: false
bootstrap.system_call_filter: false
重啟es 異常
ERROR: [1] bootstrap checks failed
[1]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured
修改
elasticsearch.yml
取消注釋保留一個節點
cluster.initial_master_nodes: [“node-1”]
這個的話,這里的node-1是上面一個默認的記得打開就可以了
重啟 正常
總結
以上是生活随笔為你收集整理的elasticsearch安装 及 启动异常解决的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Cadence 原理图操作记录
- 下一篇: Java开发常用的在线工具