title: Elasticsearch failed to start on macos
body: <p>I've installed Elasticsearch using brew on macos Monterey</p>
  <pre><code>brew install elasticsearch
  </code></pre>
  <p>But I can't start the service</p>
  <pre><code>brew services start elasticsearch
  </code></pre>
  <p><a href="https://i.stack.imgur.com/92Io6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/92Io6.png" alt="enter image description here" /></a></p>
  <pre><code>brew info elasticsearch
  </code></pre>
  <p><a href="https://i.stack.imgur.com/qe8ZW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qe8ZW.png" alt="enter image description here" /></a></p>
  <p>This are the log</p>
  <pre><code>warning: no-jdk distributions that do not bundle a JDK are deprecated and will be removed in a future release
  warning: no-jdk distributions that do not bundle a JDK are deprecated and will be removed in a future release
  Exception in thread &quot;main&quot; java.lang.UnsupportedOperationException: The Security Manager is deprecated and will be removed in a future release
  at java.base/java.lang.System.setSecurityManager(System.java:416)
  at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:82)
  </code></pre>