1.linux下啟動es不能用root
groupadd -g 700 elasticsearch3——>新建使用者組,組名叫elasticsearch3
useradd -u 701 -g 700 elasticsearch3——->新建使用者,使用者名叫elasticsearch3
passwd elasticsearch3——->設定使用者密碼為elasticsearch3
gpasswd -a elasticsearch3 elasticsearch3—–>將使用者新增到使用者組裡面,第乙個elasticsearch3表示使用者名稱,第二個elasticsearch3表示組名
給elasticsearch付許可權
chown -r elasticsearch3:elasticsearch3 /usr/local/elasticsearch-5.4.1/
因為centos6不支援seccomp,而es5.2.0預設bootstrap.system_call_filter為true進行檢測,所以導致檢測失敗,失敗後直接導致es不能啟動。
在elasticsearch.yml中配置bootstrap.system_call_filter為false,注意要在memory下面:
bootstrap.memory_lock: false
bootstrap.system_call_filter: false
問題:max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
max number of threads [1024] for user [hadoop] is too low, increase to at least [2048]
max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
解決方案:
max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
切換到root使用者
ulimit -hn 檢視硬限制
vim /etc/security/limits.conf
新增下面設定 hadoop是使用者
hadoop soft nofile 65536
hadoop hard nofile 65536
退出使用者重新登入,使配置生效
重新 ulimit -hn 檢視硬限制 會發現數值有4096改成65535
vim /etc/security/limits.d/90-nproc.conf
找到如下內容:
soft nproc 1024
修改為soft nproc 2048
vi /etc/sysctl.conf
新增下面配置:
vm.max_map_count=655360
並執行命令:
sysctl -p
Elasticsearch 分頁問題
1.form和size的方式 2.scroll api 3.search after引數 按照一般的查詢流程來說,如果我想查詢前10條資料 1 客戶端請求發給某個節點 2 節點 給個個分片,查詢每個分片上的前10條 3 結果返回給節點,整合資料,提取前10條 4 返回給請求客戶端 該分頁方式可以通過...
elasticsearch問題集合
前提條件 環境是win10 日誌的錯誤提示 日誌檢視位置 elasticsearch 7.10.1 logs elasticsearch.log the default discovery settings are unsuitable for production use at least one...
Elasticsearch簡單問題小結
在查詢的字段只有乙個值的時候,使用term,在查詢字段包含多個的時候才使用terms。term terms 1 在query 查詢 中,查詢操作不僅僅會進行查詢,還會計算分值,用於確定相關度 在filter 過濾器 中,查詢操作僅判斷是否滿足查詢條件。2 filter 過濾器 中,查詢的結果可以被快...