Not enough space
内存空间不足
看一下 jvm.options 文件
# Xms represents the initial size of total heap space
# Xmx represents the maximum size of total heap space
-Xms1g
-Xmx1g
可以看到 Elasticsearch 默认使用 物理内存的 50%,这里是 1G,系统就应该有 2G 。官方说明
但我的虚机只有 1G … 于是就有了如下配置
# Xms represents the initial size of total heap space
# Xmx represents the maximum size of total heap space
# -Xms1g
# -Xmx1g
# 不要使用 1G 了,512M吧
-Xms512m
-Xmx512m
启动服务试试
systemctl start elasticsearch
Start Timeout
这个时候你会发现,启动 timeout 了,于是针对 timeout 特别行动启动了
vi /usr/lib/systemd/system/elasticsearch.service
随意的找了个位置就把控制器装上了
# 服务启动超时时间
TimeoutStartSec=1200
reload生效
systemctl daemon-reload
systemctl start elasticsearch
老实说,这么弄的,连正常测试跑着都费劲,还是该升级升级吧
20分钟都没跑起来,还是升级了配置