在Centos6.5中安裝elasticsearch5.5.2出現的錯誤
啟動異常: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
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 [1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
修改/etc/security/limits.conf檔案,新增或修改如下行: (請切換到root使用者 然後強制修改檔案)
* hard nofile 65536
* soft nofile 65536
問題2 [2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
$ sudo sysctl -w vm.max_map_count=2621441
或者修改 /etc/sysctl.conf 檔案,新增 “vm.max_map_count”設定 永久改變(sudo sysctl -p /etc/sysctl.conf生效)。
設定後,重啟伺服器,可以使用