# Exception in thread "main" java.lang.RuntimeException: don't run elasticsearch as root

**URL:** <https://discuss.elastic.co/t/exception-in-thread-main-java-lang-runtimeexception-dont-run-elasticsearch-as-root/39754>\
**Category:** Elasticsearch\
**Created:** [January 21, 2016, 10:35am UTC](https://discuss.elastic.co/t/exception-in-thread-main-java-lang-runtimeexception-dont-run-elasticsearch-as-root/39754 "2016-01-21T10:35:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ganesh2303](https://avatars.discourse-cdn.com/v4/letter/g/57b2e6/32.png) [@Ganesh2303](https://discuss.elastic.co/u/Ganesh2303)\
**Post date:** [January 21, 2016, 10:35am UTC](https://discuss.elastic.co/t/exception-in-thread-main-java-lang-runtimeexception-dont-run-elasticsearch-as-root/39754/1 "2016-01-21T10:35:42Z")

</div>

Hi,  
I'm using elasticsearch-2.1.1 in my linux red hat server(64 bit). When i'm trying to start my elasticsearch its thorough some error like this,

Exception in thread "main" java.lang.RuntimeException: don't run elasticsearch as root.  
at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:93)  
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:144)  
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:285)  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)  
Refer to the log for complete error details.

Can anyone help to resolve it. I'm using server as root user

---

<div class="post-metadata">

**Author:** ![rajkamalkool6](https://avatars.discourse-cdn.com/v4/letter/r/e9c0ed/32.png) [@rajkamalkool6](https://discuss.elastic.co/u/rajkamalkool6)\
**Post date:** [January 21, 2016, 10:39am UTC](https://discuss.elastic.co/t/exception-in-thread-main-java-lang-runtimeexception-dont-run-elasticsearch-as-root/39754/2 "2016-01-21T10:39:44Z")

</div>

Hi,

I am also facing the same issue.

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [January 21, 2016, 12:31pm UTC](https://discuss.elastic.co/t/exception-in-thread-main-java-lang-runtimeexception-dont-run-elasticsearch-as-root/39754/3 "2016-01-21T12:31:48Z")

</div>

The error message says:

```plaintext
Exception in thread "main" java.lang.RuntimeException: don't run elasticsearch as root.

```

> [@Ganesh2303](#):
>
> Can anyone help to resolve it. I'm using server as root user

Don't run Elasticsearch as root, and then you'll be 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, 11:20pm UTC](https://discuss.elastic.co/t/exception-in-thread-main-java-lang-runtimeexception-dont-run-elasticsearch-as-root/39754/6 "2017-07-05T23:20:12Z")

</div>


