1. 程式人生 > >轉載:elastic5.x部署常見問題總結

轉載:elastic5.x部署常見問題總結

BE .com security 主機 cep script linu geek lse

原博文名稱:ElasticSearch 5.0.0 安裝部署常見錯誤或問題

原博文地址為:http://www.dajiangtai.com/community/18136.do?origin=csdn-geek&dt=1214

============================================================================

以下除了問題八,在部署elastic時都遇到過,問題比較常見。

問題一:

[2016-11-06T16:27:21,712][WARN ][o.e.b.JNANatives ] unable to install syscall filter:
Java.lang.UnsupportedOperationException: seccomp unavailable: requires kernel 3.5+ with CONFIG_SECCOMPandCONFIG_SECCOMP_FILTERcompiledinatorg.elasticsearch.bootstrap.Seccomp.linuxImpl(Seccomp.java:349) ~[elasticsearch-5.0.0.jar:5.0.0]
at org.elasticsearch.bootstrap.Seccomp.init(Seccomp.java:630) ~[elasticsearch-5.0.0.jar:5.0.0]
原因:報了一大串錯誤,大家不必驚慌,其實只是一個警告,主要是因為你Linux版本過低造成的。 解決方案: 1、重新安裝新版本的Linux系統 2、警告不影響使用,可以忽略 問題二:
ERROR: bootstrap checks failed
max file descriptors [4096] for elasticsearch process likely too low, increase to at least [65536]

原因:無法創建本地文件問題,用戶最大可創建文件數太小

解決方案:

切換到root用戶,編輯limits.conf配置文件, 添加類似如下內容:
vi /etc/security/limits.conf
#添加如下內容:
*  soft nofile 65536
* hard nofile 131072
* soft nproc 2048
* hard nproc 4096
備註:* 代表Linux所有用戶名稱(比如 hadoop) 保存、退出、重新登錄才可生效 問題三:
max number of threads [1024] for user [es] likely too low, increase to at least [2048]

原因:無法創建本地線程問題,用戶最大可創建線程數太小

解決方案:切換到root用戶,進入limits.d目錄下,修改90-nproc.conf 配置文件。
vi /etc/security/limits.d/90-nproc.conf
#找到如下內容:
#* soft nproc 1024
#修改為
* soft nproc 2048

問題四:

max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144]

原因:最大虛擬內存太小

解決方案:切換到root用戶下,修改配置文件sysctl.conf
vi /etc/sysctl.conf
#添加下面配置:
vm.max_map_count=655360
#並執行命令:
sysctl -p

然後重新啟動elasticsearch,即可啟動成功。

問題五: ElasticSearch啟動找不到主機或路由 原因:ElasticSearch 單播配置有問題 解決方案: 檢查ElasticSearch中的配置文件
vi  config/elasticsearch.yml
#找到如下配置:
discovery.zen.ping.unicast.hosts:["192.168.**.**:9300","192.168.**.**:9300"]
#一般情況下,是這裏配置有問題,註意書寫格式

問題六:

org.elasticsearch.transport.RemoteTransportException: Failed to deserialize exception response from stream

原因:ElasticSearch節點之間的jdk版本不一致

解決方案:ElasticSearch集群統一jdk環境 問題七:
Unsupported major.minor version 52.0

原因:jdk版本問題太低

解決方案:更換jdk版本,ElasticSearch5.0.0支持jdk1.8.0 問題八:
bin/elasticsearch-plugin install license
ERROR: Unknown plugin license

原因:ElasticSearch5.0.0以後插件命令已經改變

解決方案:使用最新命令安裝所有插件
bin/elasticsearch-plugin install x-pack

問題九:
ERROR: bootstrap checks failed
system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk

原因:

這是在因為Centos6不支持SecComp,而ES5.6.4默認bootstrap.system_call_filter為true進行檢測,所以導致檢測失敗,失敗後直接導致ES不能啟動。
解決:
vi elasticsearch.yml
#在elasticsearch.yml中配置bootstrap.system_call_filter為false,註意要在Memory下面:
bootstrap.memory_lock: false
bootstrap.system_call_filter: false

轉載:elastic5.x部署常見問題總結