# ElasticSearch: service elasticsearch start, throws Exception in thread "main"

**URL:** <https://discuss.elastic.co/t/elasticsearch-service-elasticsearch-start-throws-exception-in-thread-main/15417>\
**Category:** Elasticsearch\
**Created:** [January 25, 2014, 4:03pm UTC](https://discuss.elastic.co/t/elasticsearch-service-elasticsearch-start-throws-exception-in-thread-main/15417 "2014-01-25T16:03:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gabriel\_Blankenship](https://avatars.discourse-cdn.com/v4/letter/g/53a042/32.png) [@Gabriel\_Blankenship](https://discuss.elastic.co/u/Gabriel_Blankenship)\
**Post date:** [January 25, 2014, 4:03pm UTC](https://discuss.elastic.co/t/elasticsearch-service-elasticsearch-start-throws-exception-in-thread-main/15417/1 "2014-01-25T16:03:31Z")

</div>

Hi all,

New to Logstash and Elasticsearch so pardon any silliness on my end with  
this configuration issue I'm currently having. I'm receiving the following  
error when I try to startup the elasticsearch as suggested via the guide  
linked below the following error code:  
[root@server01 ~]# service elasticsearch start  
Starting elasticsearch: [OK]  
[root@server01 ~]# Exception in thread "main"  
java.lang.ExceptionInInitializerError  
at java.lang.Class.initializeClass(libgcj.so.10)  
at org.elasticsearch.bootstrap.Bootstrap.main(Bootstrap.java:155)  
at org.elasticsearch.bootstrap.ElasticSearch.main(ElasticSearch.java:32)  
Caused by: java.lang.UnsupportedOperationException: gnu::java::lang::  
management::VMMemoryMXBeanImpl::getNonHeapMemoryUsage () not implemented  
at gnu.java.lang.management.VMMemoryMXBeanImpl.getNonHeapMemoryUsage(  
libgcj.so.10)  
at gnu.java.lang.management.MemoryMXBeanImpl.getNonHeapMemoryUsage(libgcj  
.so.10)  
at org.elasticsearch.monitor.jvm.JvmInfo.(JvmInfo.java:69)  
at java.lang.Class.initializeClass(libgcj.so.10)  
...2 more

The Guide:  
[http://blog.basefarm.com/blog/how-to-install-logstash-with-kibana-interface-on-rhel/](http://blog.basefarm.com/blog/how-to-install-logstash-with-kibana-interface-on-rhel/)

I stepped through the instructions exactly and installed ElasticSearch via  
the sites RPM on CentOS 6.0

I have added the following to: /usr/lib/sysctl.d/  
elasticsearch.conf  
ES\_MIN\_MEM=512m  
ES\_MAX\_MEM=1024m

As well modified the elasticsearch.in.sh file which got it a bit further in  
the startup though I'm not certain it's actually made a true difference as  
I'm still receiving the above error:  
source /usr/lib/sysctl.d/elasticsearch.conf

if ["x$ES\_MIN\_MEM" = "x"]; then  
ES\_MIN\_MEM=512m  
fi  
if ["x$ES\_MAX\_MEM" = "x"]; then  
ES\_MAX\_MEM=1024m  
fi

I'd be happy to provide any additional information if anyone has a thought  
as to where I might have gone wrong.

Currently installed is Nginx, Logstash, and ElasticSearch. Per the guide  
once complete it should be a working instance.... 🙂

Very much appreciate any help I can get and for you all taking any time  
what-so-ever to help me in getting this online. If I do end up identifying  
my problem which I have thus far looked over, I will be sure to update this  
post as well.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/4bbc0939-53a1-46ba-af1b-bf026bf4e3eb%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4bbc0939-53a1-46ba-af1b-bf026bf4e3eb%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [January 25, 2014, 5:03pm UTC](https://discuss.elastic.co/t/elasticsearch-service-elasticsearch-start-throws-exception-in-thread-main/15417/2 "2014-01-25T17:03:28Z")

</div>

You are running the default OpenJDK/JRE 6, please use latest OpenJDK/JRE 7  
or Oracle JDK/JRE 7.

Jörg

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFTWLYVcGsd6qRSGLg3HB8wrM0AK2CRzVHR\_R-hXeOigQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFTWLYVcGsd6qRSGLg3HB8wrM0AK2CRzVHR_R-hXeOigQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Gabriel\_Blankenship](https://avatars.discourse-cdn.com/v4/letter/g/53a042/32.png) [@Gabriel\_Blankenship](https://discuss.elastic.co/u/Gabriel_Blankenship)\
**Post date:** [January 25, 2014, 10:17pm UTC](https://discuss.elastic.co/t/elasticsearch-service-elasticsearch-start-throws-exception-in-thread-main/15417/3 "2014-01-25T22:17:31Z")

</div>

That was exactly it thank you, I relied on 'yum install java' and for some  
reason it threw up 1.6 previously, ran it again today and bam 1.7. Great  
catch everything came up as soon as I threw that on the box, very much  
appreciated. 🙂

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/936959cb-902d-418d-b5b9-f38f61c14d7a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/936959cb-902d-418d-b5b9-f38f61c14d7a%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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 6, 2017, 1:54am UTC](https://discuss.elastic.co/t/elasticsearch-service-elasticsearch-start-throws-exception-in-thread-main/15417/4 "2017-07-06T01:54:48Z")

</div>


