问题描述
我正在按照此处的步骤安装并启动 elasticsearch.
首先,你应该启用 journalctl
以便我们可以深入了解正在发生的事情.
由于这似乎是一个内存问题(您的 VPS 上有 1GB,而 ES 预先配置了 1GB 堆),您有两个选择:
- 减少
config/jvm.options
中的堆 - 或增加您的 VPS 内存
I am following the steps here to install and get elasticsearch to work.
I have a ubuntu 17 and i am logged in as non root user with sudo rights.
I did the following steps
sudo apt-get update
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.1.1.deb
sudo dpkg -i elasticsearch-6.1.1.deb
sudo systemctl enable elasticsearch.service
sudo systemctl start elasticsearch
Finally when i test using
curl -X GET 'http://localhost:9200'
I get the following error
curl: (7) Failed to connect to localhost port 9200: Connection refused
Also when i do
service --status-all
i donot see elasticsearch service listed in the services list.
Please note that i have ufw installed and i have the following ports open
To Action From
-- ------ ----
22/tcp ALLOW Anywhere
443/tcp ALLOW Anywhere
80/tcp ALLOW Anywhere
22/tcp (v6) ALLOW Anywhere (v6)
443/tcp (v6) ALLOW Anywhere (v6)
80/tcp (v6) ALLOW Anywhere (v6)
could this be preventing the 9200 port but that doesnt seem likely since internal communications should be allowed.
UPDATE:
Here is the output i am getting with sudo journalctl -f
-- Logs begin at Fri 2017-12-29 10:27:23 +0545. --
Dec 30 13:31:40 elasticsearch[29595]: #
Dec 30 13:31:40 elasticsearch[29595]: # There is insufficient memory for the Java Runtime Environment to continue.
Dec 30 13:31:40 elasticsearch[29595]: # Native memory allocation (mmap) failed to map 986513408 bytes for committing reserved memory.
Dec 30 13:31:40 elasticsearch[29595]: # An error report file with more information is saved as:
I checked the free memory using free -m command
First, you should enable journalctl
so we can gain some insights about what is going on.
Since it seems to be a memory issue (you have 1GB on your VPS and ES is pre-configured with 1GB heap), you have two options:
- decrease the heap in
config/jvm.options
- or increase your VPS RAM
这篇关于无法让 elasticsearch 服务在 ubuntu 17 中运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!