我刚刚在SLES 12 SP3上安装了Elasticsearch 5.6,它无法启动。我以前已经在Ubuntu服务器上安装了它,并且工作正常,但是我必须使用SLES。
systemctl status elasticsearch
返回此:
● elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fr 2018-10-05 10:37:10 CEST; 2min 29s ago
Docs: http://www.elastic.co
Process: 1531 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet -Edefault.path.logs=${LOG_DIR} -Edefault.path.data=${DATA_DIR} -Edefault.path.conf=${CONF_DIR} (code=exited, status=1/FAILURE)
Process: 1516 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec (code=exited, status=0/SUCCESS)
Main PID: 1531 (code=exited, status=1/FAILURE)
我已经尝试将network.host
中的/Applications/elasticsearch-2.1.1/config/elasticsearch.yml
设置为0.0.0.0
,但是没有用。
谢谢。
更新:
journalctl
显示如下:
Okt 05 11:03:34 linux-m1db systemd[1]: Starting Elasticsearch...
Okt 05 11:03:34 linux-m1db systemd[1]: Started Elasticsearch.
Okt 05 11:03:34 linux-m1db elasticsearch[2317]: OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x0000000085330000, 2060255232, 0) failed; error='Cannot allocate memo
Okt 05 11:03:34 linux-m1db elasticsearch[2317]: #
Okt 05 11:03:34 linux-m1db elasticsearch[2317]: # There is insufficient memory for the Java Runtime Environment to continue.
Okt 05 11:03:34 linux-m1db elasticsearch[2317]: # Native memory allocation (mmap) failed to map 2060255232 bytes for committing reserved memory.
Okt 05 11:03:34 linux-m1db elasticsearch[2317]: # An error report file with more information is saved as:
Okt 05 11:03:34 linux-m1db elasticsearch[2317]: # /tmp/hs_err_pid2317.log
Okt 05 11:03:34 linux-m1db systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Okt 05 11:03:34 linux-m1db systemd[1]: elasticsearch.service: Unit entered failed state.
Okt 05 11:03:34 linux-m1db systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
这似乎是Java问题。