# ElasticSearch Does Not Start on Clean Install

**URL:** <https://discuss.elastic.co/t/elasticsearch-does-not-start-on-clean-install/88418>\
**Category:** Elasticsearch\
**Created:** [June 6, 2017, 12:42pm UTC](https://discuss.elastic.co/t/elasticsearch-does-not-start-on-clean-install/88418 "2017-06-06T12:42:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kuthalam](https://avatars.discourse-cdn.com/v4/letter/k/a698b9/32.png) [@kuthalam](https://discuss.elastic.co/u/kuthalam)\
**Post date:** [June 6, 2017, 12:42pm UTC](https://discuss.elastic.co/t/elasticsearch-does-not-start-on-clean-install/88418/1 "2017-06-06T12:42:00Z")

</div>

Hi, I'm a complete beginner to ElasticSearch and I haven't been able to find a question like this on these forums.

I have been trying to configure Logstash to talk to ElasticSearch where each are on a different VM. I was having a lot of problems, so I tried a clean install of ElasticSearch and ElasticSearch fails on startup. Not sure what's wrong, but here's all the info I have:

```
    elasticsearch.service - Elasticsearch
   Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2017-06-06 07:19:56 CDT; 13min ago
     Docs: http://www.elastic.co
  Process: 2249 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} 
  Process: 2246 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec (code=exited, status=0/SUCCESS)
 Main PID: 2249 (code=exited, status=1/FAILURE)

Jun 06 07:18:43 mukund-VirtualBox systemd[1]: Starting Elasticsearch...
Jun 06 07:18:43 mukund-VirtualBox systemd[1]: Started Elasticsearch.
Jun 06 07:19:56 mukund-VirtualBox systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Jun 06 07:19:56 mukund-VirtualBox systemd[1]: elasticsearch.service: Unit entered failed state.
Jun 06 07:19:56 mukund-VirtualBox systemd[1]: elasticsearch.service: Failed with result 'exit-code'.

```

For the elasticsearch.yml file, I have [cluster.name](http://cluster.name), [node.name](http://node.name), node.master, node.data, path.data. path.logs, and bootstrap.memory\_lock set up. For some reason the log doesn't say anything about what went wrong.

I also ran ElasticSearch with these commands:  
sudo systemctl enable elasticsearch.service  
sudo systemctl start elasticsearch  
sudo systemctl status elasticsearch  
(The last command gives the above output)

Thank you in advance for any help!

---

<div class="post-metadata">

**Author:** ![ugosan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ugosan/32/18916_2.png) [@ugosan](https://discuss.elastic.co/u/ugosan)\
**Post date:** [June 6, 2017, 10:42pm UTC](https://discuss.elastic.co/t/elasticsearch-does-not-start-on-clean-install/88418/2 "2017-06-06T22:42:27Z")

</div>

You have to check the logs to figure it out ( they are in /var/log/elasticsearch/\*.log)

---

<div class="post-metadata">

**Author:** ![EddieTurizo](https://avatars.discourse-cdn.com/v4/letter/e/8edcca/32.png) [@EddieTurizo](https://discuss.elastic.co/u/EddieTurizo)\
**Post date:** [June 7, 2017, 12:45am UTC](https://discuss.elastic.co/t/elasticsearch-does-not-start-on-clean-install/88418/3 "2017-06-07T00:45:14Z")

</div>

Try the suggestions offered in the following thread to see if it helps with finding your root cause.

[https://discuss.elastic.co/t/elasticsearch-doesnt-start-and-there-is-no-log/88055](https://discuss.elastic.co/t/elasticsearch-doesnt-start-and-there-is-no-log/88055)

---

<div class="post-metadata">

**Author:** ![kuthalam](https://avatars.discourse-cdn.com/v4/letter/k/a698b9/32.png) [@kuthalam](https://discuss.elastic.co/u/kuthalam)\
**Post date:** [June 7, 2017, 3:03pm UTC](https://discuss.elastic.co/t/elasticsearch-does-not-start-on-clean-install/88418/4 "2017-06-07T15:03:57Z")

</div>

@EddieTurizo:

Thank you for the link! I didn't have the Java path set (which I fixed in /etc/default/elasticsearch) and also looked here (since I was also having a memory issue):

> [@Memory lock not working](https://discuss.elastic.co/t/memory-lock-not-working/70576):
>
> I'm running a Fedora 25 ec2 image with elasticsearch 5.1.1 This are my settings: /etc/elasticsearch/elasticsearch.yml bootstrap.memory\_lock: true /usr/lib/systemd/system/elasticsearch.service LimitMEMLOCK=infinity /etc/sysconfig/elasticsearch MAX\_LOCKED\_MEMORY=unlimited /etc/security/limits.conf \* soft memlock unlimited \* hard memlock unlimited even after that I'm still getting: Unable to lock JVM Memory: error=12, reason=Cannot allocate memory Increase…

Now Elasticsearch is running just fine.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 3:04pm UTC](https://discuss.elastic.co/t/elasticsearch-does-not-start-on-clean-install/88418/5 "2017-07-05T15:04:45Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
