elasticsearch啟動常見錯誤


elasticsearch啟動常見錯誤

Elasticsearch訪問 IP:9200 問題

  報錯詳情

[2020-03-15T21:17:37,703][INFO ][o.e.b.BootstrapChecks    ] [2wYIoJn] bound or publishing to a non-loopback address, enforcing bootstrap checks
ERROR: [3] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
[2]: max of threads [3818] for user [ucode] is too low, increase to at least [4096]
[3]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[2020-03-15T21:17:37,800][INFO ][o.e.n.Node               ] [2wYIoJn] stopping ...
[2020-03-15T21:17:37,829][INFO ][o.e.n.Node               ] [2wYIoJn] stopped
[2020-03-15T21:17:37,830][INFO ][o.e.n.Node               ] [2wYIoJn] closing ...
[2020-03-15T21:17:37,847][INFO ][o.e.n.Node               ] [2wYIoJn] closed
[2020-03-15T21:17:37,852][INFO ][o.e.x.m.j.p.NativeController] Native controller process has stopped - no new native processes can be started
^C
[1]+  Exit 78
nohup /home/ucode/program/software/elk/elasticsearch-6.3.1/bin/elasticsearch > elasticsearch.out 2>&1

 

問題出現環境,OS版本:CentOS-7-x86_64-Minimal-1708;ES版本:elasticsearch-6.2.2。

1、max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]

  每個進程最大同時打開文件數太小,可通過下面2個命令查看當前數量

ulimit -Hn
ulimit -Sn

  修改/etc/security/limits.conf文件,增加配置,用戶退出后重新登錄生效

*               soft    nofile          65536
*               hard    nofile          65536

 

2、max number of threads [3818] for user [es] is too low, increase to at least [4096]

  問題同上,最大線程個數太低。修改配置文件/etc/security/limits.conf(和問題1是一個文件),增加配置

*               soft    nproc           4096
*               hard    nproc           4096

  可通過命令查看

ulimit -Hu
ulimit -Su

修改后的文件:

 

 

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

  修改/etc/sysctl.conf文件,增加配置vm.max_map_count=262144

vi /etc/sysctl.conf
sysctl -p

  執行命令sysctl -p生效

 4、Exception in thread "main" java.nio.file.AccessDeniedException: /usr/local/elasticsearch/elasticsearch-6.2.2-1/config/jvm.options

  elasticsearch用戶沒有該文件夾的權限,執行命令

chown -R es:es /usr/local/elasticsearch/


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM