elasticsearch常見問題總結

1、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的版本過低
解決方案:
重新安裝新版本的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)
保存、退出、重新登錄纔可生效

3、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

4、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

5、ElasticSearch啓動找不到主機或路由

原因:ElasticSearch 單播配置有問題
解決方案:檢查ElasticSearch中的配置文件
vi  config/elasticsearch.yml
注意此配置格式
discovery.zen.ping.unicast.hosts:["192.168.**.**:9300","192.168.**.**:9300"]

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

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

7、Unsupported major.minor version 52.0

原因:jdk版本太低
解決方案:elasticsearch5.0.0支持jdk1.8.0

8、bin/elasticsearch-plugin install license        ERROR: Unknown plugin license

原因:ElasticSearch5.0.0以後插件命令已經改變
解決方案:bin/elasticsearch-plugin install x-pack

9、啓動異常: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.2.1默認bootstrap.system_call_filter爲true進行檢測,所以導致檢測失敗,失敗後直接導致ES不能啓動。詳見 :https://github.com/elastic/elasticsearch/issues/22899
解決方案:在elasticsearch.yml中配置bootstrap.system_call_filter爲false,注意要在Memory下面
bootstrap.memory_lock: false
bootstrap.system_call_filter: false

10、格式問題:Exception in thread "main" 2017-11-10 06:29:49,106 main ERROR No log4j2 configuration file found. Using default configuration: logging only errors to the console. Set system property 'log4j2.debug' to show Log4j2 internal initialization logging.ElasticsearchParseException[malformed, expected settings to start with 'object', instead was [VALUE_STRING]]

原因:elasticsearch.yml中的配置項的格式有問題
解決方案:請儘量保持冒號前面沒空格,後面一個空格,不要用tab鍵
bootstrap.memory_lock: false

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章