今天启动elasticsearch发现启动不了,查看es日志发现有错误:
initial heap size [1073741824] not equal to maximum heap size [2147483648]; this can cause resize pauses and prevents mlockall from locking the entire heap。
百度搜索解决方法如下:
通过命令find /usr/ -name "jvm.options" 找到elasticsearch中的jvm.options文件,将-Xms和-Xmx设置为相等,如下:
-Xms1g
-Xmx1g