title: Elasticsearch fails to start or run on OSX
body: <p>I am posting to hopefully help others if they run into this issue on Mac. I recently updated ES to 2.2.x branch using Homebrew:</p>
  
  <pre><code>brew uninstall --force elasticsearch
  brew update
  brew install elasticsearch
  </code></pre>
  
  <p>I repeatedly got connection errors trying both localhost and 127.0.0.1 on port 9200.</p>
  
  <pre><code>curl http://localhost:9200
  curl: (7) Failed to connect to localhost port 9200: Connection refused
  </code></pre>
  
  <p>I tried an unload and load.</p>
  
  <pre><code>launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.elasticsearch.plist
  launchctl load ~/Library/LaunchAgents/homebrew.mxcl.elasticsearch.plist
  </code></pre>
  
  <p>Then tried starting manually.</p>
  
  <pre><code>elasticsearch
  </code></pre>
  
  <p>The following errors appeared indicating that the Java version 1.7.x was an error and why it would not start.</p>
  
  <pre><code>Exception in thread "main" java.lang.RuntimeException: Java version: Oracle Corporation 1.7.0_45 [Java HotSpot(TM) 64-Bit Server VM 24.45-b08] suffers from critical bug https://bugs.openjdk.java.net/browse/JDK-8024830 which can cause data corruption.
  Please upgrade the JVM, see http://www.elastic.co/guide/en/elasticsearch/reference/current/_installation.html for current recommendations.
  If you absolutely cannot upgrade, please add -XX:-UseSuperWord to the JAVA_OPTS environment variable.
  Upgrading is preferred, this workaround will result in degraded performance.
      at org.elasticsearch.bootstrap.JVMCheck.check(JVMCheck.java:123)
      at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:283)
      at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)
  Refer to the log for complete error details.
  </code></pre>
  
  <p>After getting past this error, there were errors as well for previously-installed plugins on the 1.7.x branch.</p>
  
  <pre><code>Exception in thread "main" java.lang.IllegalStateException: Could not load plugin descriptor for existing plugin [bigdesk]. Was the plugin built before 2.0?
  Likely root cause: java.nio.file.NoSuchFileException: /usr/local/var/lib/elasticsearch/plugins/bigdesk/plugin-descriptor.properties
      at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
      at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
      at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
      at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
      at java.nio.file.Files.newByteChannel(Files.java:315)
      at java.nio.file.Files.newByteChannel(Files.java:361)
      at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:380)
      at java.nio.file.Files.newInputStream(Files.java:106)
      at org.elasticsearch.plugins.PluginInfo.readFromProperties(PluginInfo.java:87)
      at org.elasticsearch.plugins.PluginsService.getPluginBundles(PluginsService.java:378)
      at org.elasticsearch.plugins.PluginsService.&lt;init&gt;(PluginsService.java:128)
      at org.elasticsearch.node.Node.&lt;init&gt;(Node.java:146)
      at org.elasticsearch.node.Node.&lt;init&gt;(Node.java:128)
      at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:145)
      at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:178)
      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.
  </code></pre>