Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to run ElasticSearch as a service on Ubuntu [closed]

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
like image 720
evilcelery Avatar asked May 30 '12 11:05

evilcelery


People also ask

How do I check Elasticsearch status in Ubuntu?

To perform a more thorough check of Elasticsearch execute the following command: curl -XGET 'http://localhost:9200/_nodes?pretty' In the output from the above command you can see and verify all the current settings for the node, cluster, application paths, modules, etc.

How do I completely remove Elasticsearch from Ubuntu?

1)Run the cd /usr/lib/netbrain/installer/elasticsearch command to navigate to the elasticsearch directory. 2)Run the ./uninstall.sh command under the elasticsearch directory. 3)Specify whether to remove all Elasticsearch data. To remove data, type y or yes, otherwise, type n or no.


1 Answers

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

like image 144
evilcelery Avatar answered Sep 20 '22 14:09

evilcelery