elasticsearch5.0啓動出現的錯誤

elasticsearch5.0啓動失敗,出現如下提示:

1、Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x0000000085330000, 2060255232, 0) failed; error='Cannot allocate memory' (errno=12)

由於elasticsearch5.0默認分配jvm空間大小爲2g,修改jvm空間分配


  1. # vim config/jvm.options  

  2. -Xms2g  

  3. -Xmx2g  

  4. 修改爲  

  5. -Xms512m  

  6. -Xmx512m  



2、max number of threads [1024] for user [elasticsearch] is too low, increase to at least [2048]

修改 /etc/security/limits.d/90-nproc.conf 

*          soft    nproc     1024

*          soft    nproc     2048


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

修改/etc/sysctl.conf配置文件,

cat /etc/sysctl.conf | grep vm.max_map_count
vm.max_map_count=262144

如果不存在則添加

echo "vm.max_map_count=262144" >>/etc/sysctl.conf


4、max file descriptors [65535] for elasticsearch process likely too low, increase to at least [65536]


ulimit -n 65536



以下是在5.5.1是踩過的坑


5、啓動異常: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,而ES默認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


6、logstash使用rpm包安裝的時候沒有配置init的啓動腳本

默認情況使用rpm包安裝完logstash之後沒有啓動腳本。官網給了一個腳本,需要根據不同的系統版本生成對應的啓動腳本,而且官網沒有給明使用方法,對於新用戶來說算是個坑,不過在終端可以查看到腳本的使用幫助# /usr/share/logstash/bin/system-install --help

生成啓動腳本,centos6使用sysv參數,centos7使用systemd

# /usr/share/logstash/bin/system-install /etc/logstash/startup.options sysv

Successfully created systemstartup script for Logstash


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