1. 程式人生 > >elasticsearch常見錯誤及解決方案

elasticsearch常見錯誤及解決方案

1.OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N

解決方案:

 

2.java.lang.RuntimeException: don't run elasticsearch as root

 

解決方案:  增加一個專用使用者

  1). adduser es

  2). passwd es

  3).chown -R es:es [es目錄]

  通過es賬戶啟動

 

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,重啟或重新載入配置

 

 

4.max file descriptors [65535] for elasticsearchprocess is too low, increase to at least [65536]

 

解決方案: 

    修改/etc/security/limits.conf檔案,把所有的65535改到65536

 

 

5.外網訪問

解決方案: 修改elasticsearch.yml檔案  增加 network.host :0.0.0.0   ,外加防火牆開啟9200埠