1

I'm in the process of upgrading ElasticSearch for my company. To start this, I need the old version (1.1.2) running on my machine, which is running OSX Sierra (10.12.6). I have elasticsearch@1.1.2 downloaded from my company's repository, but it's not starting properly. I'm getting this:

$ brew services list
Name                Status  User        Plist
elasticsearch@1.1.2 started pjscopeland /Users/pjscopeland/Library/LaunchAgents/homebrew.mxcl.elasticsearch@1.1.2.plist

... but Homebrew's status "started" is yellow, where the rest of them are green, and if I run it manually, I get this:

$ elasticsearch
Java HotSpot(TM) 64-Bit Server VM warning: Option UseParNewGC was deprecated in version 9.0 and will likely be removed in a future release.
Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Exception in thread "main" java.lang.ExceptionInInitializerError
    at org.elasticsearch.bootstrap.Bootstrap.main(Bootstrap.java:190)
    at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:32)
Caused by: java.lang.UnsupportedOperationException: Boot class path mechanism is not supported
    at java.management/sun.management.RuntimeImpl.getBootClassPath(RuntimeImpl.java:99)
    at org.elasticsearch.monitor.jvm.JvmInfo.<clinit>(JvmInfo.java:77)
    ... 2 more

NB. Please bear in mind, my Java skills are at a level where I might just be able to read it, but probably not work out anything I might need to change.

PJSCopeland
  • 2,818
  • 1
  • 26
  • 40
  • Yellow is OK. On ES 2.4 yellow means you only have 1 data node. Did you try to connect to the server? BTW: If you have trouble setup a copy on a production machine (provide different ports for HTTP and binnary protocol) – bato3 Oct 09 '17 at 14:23
  • 1
    This is not ElasticSearch yellow, this is Homebrew yellow. The service hasn't started properly. I've clarified this in my post. – PJSCopeland Oct 09 '17 at 19:52

1 Answers1

6

Looks like you have Java 9 installed:

Java HotSpot(TM) 64-Bit Server VM warning: Option UseParNewGC was deprecated in version 9.0 and will likely be removed in a future release.

although ElasticSearch does not support it.

According to this matrix, Java 9 is not supported by any ES version from 2.3 to 5.6; ES 1.x is not listed most likely because it is no longer supported.

There is also an issue related to logstash (a component of ElasticSearch) with similar stack trace.

The exception that you posted

Caused by: java.lang.UnsupportedOperationException: Boot class path mechanism is not supported

suggests that there is something wrong with your JVM. The exception occurs in RuntimeImpl class.

I suggest that you check out which version of Java is installed on your production machines and install it on yours. Tips on how to manage different versions of Java on your Mac you may look up in this SO question.

Nikolay Vasiliev
  • 5,656
  • 22
  • 31
  • Perfect! A bit of a rabbit hole to go down to get everything installed properly - JEnv is less than intuitive for someone more used to RVM - but following all the links, I managed to get there. Thanks! – PJSCopeland Oct 09 '17 at 20:50
  • 1
    The tricky part is telling the _service_ to use Java 8 instead of 9. I gave up and uninstalled Java 9 completely and the service started perfectly. – PJSCopeland Oct 09 '17 at 22:02