InMotion Hosting Support Center

Elasticsearch not running by itself

Category: Tools

n/a Points
2015-03-10 8:28 am EST

Hits: 2,056
I have installed elastic search following the instructions on one of your support pages. Everything has been done successfully and the service starts well but stops by itself after a while. I've also tried the following command
chkconfig --add elasticsearch

It is essential for the elasticsearch service to run permanently on my website. What should be done to achieve this?

You must login before you can ask a follow up question.

You must login before you can submit an answer.



31,633 Points
2015-03-10 8:46 am EST

Thank you for your question about elasticsearch not running. We are happy to help, but will need some additional information. Are you using Elasticsearch with a CMS, such as WordPress?

Are you seeing any PHP errors? Often errors are being suppressed from displaying.

If you have any further questions, feel free to post them below.

Thank you,

You must login before you can post a comment about this answer.

I am not using any CMS. All my scripts have been written in php.
My php webservice is not returning anything when elasticsearch stops running. It is just blank, no error message displayed.
when I type mydomain:9200 in my address bar, it tells me page not found. When elasticsearch runs, it does give me something.
12 Points
2015-03-10 8:57 am EST
Here is what I get by checking the status. It tells me it is dead and there is a corruption. I then need to re-start it.

root@vps15042 [~]# sudo service elasticsearch status
elasticsearch dead but pid file exists
root@vps15042 [~]# sudo service elasticsearch start
error: permission denied on key 'vm.max_map_count'
Starting elasticsearch: [ OK ]
root@vps15042 [~]# log4j:WARN No appenders could be found for logger (common)
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See for morefo.
*** glibc detected *** /usr/bin/java: malloc(): memory corruption: 0x00007f6106670 ***

12 Points
2015-03-10 10:37 am EST
Hello Yashin.s,

Sorry for the continued problems with Elasticsearch issue. Per the info you supplied, it looks like you should start with the log4j issue first and then re-start the service. There is no way to have the service continually run if errors pop up which disrupt it. You will need to keep an eye on the service to minimize or address issues that it may encounter as it runs. Here's a good link about re-initializing the log4j system: How to initialize log4j properly.

If you have any further questions or comments, please let us know.

Arnel C.
42,973 Points
2015-03-10 11:19 am EST
I am sorry but it is not clear on how and where to place this log file. The discussion in Stackoverflow is more about desktop application. From what I understood, I need to place a log4j.xml file somewhere. Can you please give me an indication on how to create and place it there? I have such a document on my localhost when I installed elasticsearch via composer. The following is its contents. Can I use the same file?

<log4j:configuration xmlns:log4j="">
<appender name="console" class="org.apache.log4j.ConsoleAppender">
<param name="Target" value="System.out" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="[%d{ISO8601}][%-5p][%-25c] %m%n" />

<logger name="org.elasticsearch">
<level value="info" />

<logger name="org.elasticsearch.index.mapper">
<level value="debug" />

<priority value="info" />
<appender-ref ref="console" />

12 Points
2015-03-10 12:37 pm EST
I've created a config folder under /usr/share/elasticsearch and placed logging.yml and elasticsearch.yml but the error is still there while I restart the service. This must clearly be some installation issue with the files on the package. Is the version provided stable? Has it been installed and run without any problems by other clients? Can you please advise what can be done?
This is a very serious issue for my website.
12 Points
2015-03-10 1:22 pm EST
Hello Yashin.s,

I just tested the software and it is working just fine on my personal server. You may need to contact elastic searches developers to get further support as it may be an environmental issue that we are not aware of.

Best Regards,
TJ Edens
10,077 Points
2015-03-11 11:34 am EST
Like this Question?

Forum Login

You are NOT logged in. You can still browse our Support Center.

To participate within our Community Support Forum:

Need more Help?

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!