无法在Ubuntu上运行ElasticSearch作为服务 [英] Unable to run ElasticSearch as a service on Ubuntu

查看:608
本文介绍了无法在Ubuntu上运行ElasticSearch作为服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正试图通过正常的设置指南



我的Macbook上的所有内容都运行正常,但我正在Ubuntu 11.04服务器上执行相同操作。 >

运行 / usr / local / elasticsearch / bin / elasticsearch -f 的作品,我从 curl http:// localhost:9200



但是,当我尝试启动ElasticSearch作为一项服务时, ve安装了服务包装):

  $ rcelasticsearch start 

启动ElasticSearch ...
等待弹性搜索.............................
警告:ElasticSearch可能无法启动。

确实够了 rcelasticsearch status ElasticSearch没有运行,localhost:9200无法访问。



任何想法可能是什么问题?



编辑:
服务日志说:

 启动JVM .. 
加载应用程序时JVM退出。
VM初始化期间发生错误
无法为对象堆保留足够的空间


解决方案

服务器实例没有足够的内存用于默认的ElasticSearch服务包装器设置。为了解决这个问题,我编辑了 /usr/local/elasticsearch/bin/service/elasticsearch.conf ,并从1024更改了 ES_HEAP_SIZE 到512


I'm trying to get ElasticSearch up and running following the normal setup guide.

Everything is running fine on my Macbook but I'm trying to do the same on an Ubuntu 11.04 server.

Running /usr/local/elasticsearch/bin/elasticsearch -f works and I get a response from curl http://localhost:9200.

However this is what I get when I try to start ElasticSearch as a service (I've installed the service wrapper):

$ rcelasticsearch start

Starting ElasticSearch...
Waiting for ElasticSearch.............................
WARNING: ElasticSearch may have failed to start.

Sure enough rcelasticsearch status says ElasticSearch is not running and localhost:9200 cannot be reached.

Any ideas what might be the problem?

Edit: The service log says:

Launching a JVM...
JVM exited while loading the application.
Error occurred during initialization of VM
Could not reserve enough space for object heap

解决方案

The server instance didn't have enough memory for the default ElasticSearch service wrapper settings. To fix this I edited /usr/local/elasticsearch/bin/service/elasticsearch.conf and changed ES_HEAP_SIZE from 1024 to 512

这篇关于无法在Ubuntu上运行ElasticSearch作为服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆