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


(Gabriel Blankenship) #1

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/

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.... :slight_smile:

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.
To view this discussion on the web visit 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.


(Jörg Prante) #2

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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFTWLYVcGsd6qRSGLg3HB8wrM0AK2CRzVHR_R-hXeOigQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


(Gabriel Blankenship) #3

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. :slight_smile:

--
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.
To view this discussion on the web visit 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.


(system) #4