Homebrew/legacy-homebrew

elasticsearch 1.2.1 doesn't start

PavelPolyakov opened this issue · 7 comments

After upgrading the elasticsearch with the help of brew - I can't have it working.

image

Because it doesn't start.
Previously I had 1.1.1 and it worked fine.

My operation system OS X 10.9.3 , brew version 0.9.5.

If I run it from the command line, I see the next exception:

Exception in thread "main" java.lang.UnsupportedClassVersionError: org/elasticsearch/bootstrap/Elasticsearch : Unsupported major.minor version 51.0

My Java:
image

Any thoughts?

Thanks!

You may need to set JAVA_HOME to version 1.7; see 4ed8298 (for Kafka)

@adamv

Thanks.

How I solved it:

  1. Install JDK 7 once more from this place http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
  2. Run export JAVA_HOME=$(/usr/libexec/java_home -v 1.7) .
    Then I've updated my .profile to have that line there.

Now it works.

I'll add some information to the formula.

elastic search requires Java 7. make sure you have correct java version. so check Java_HOME and PATH.

This works beautifully.

OhadR commented

"How to Set JAVA_HOME / PATH variables Under Linux ": http://www.cyberciti.biz/faq/linux-unix-set-java_home-path-variable/

@PavelPolyakov Thanks for your advice : )