# Can not get run Elasticsearch 6 on my MAC

**URL:** <https://discuss.elastic.co/t/can-not-get-run-elasticsearch-6-on-my-mac/301707>\
**Category:** Elasticsearch\
**Created:** [April 6, 2022, 6:51am UTC](https://discuss.elastic.co/t/can-not-get-run-elasticsearch-6-on-my-mac/301707 "2022-04-06T06:51:39Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sajjad\_Murtaza](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sajjad_murtaza/32/104020_2.png) [@Sajjad\_Murtaza](https://discuss.elastic.co/u/Sajjad_Murtaza)\
**Post date:** [April 6, 2022, 6:51am UTC](https://discuss.elastic.co/t/can-not-get-run-elasticsearch-6-on-my-mac/301707/1 "2022-04-06T06:51:39Z")

</div>

Hi all,  
I can not get run Elasticsearch 6 on my MAC

```auto
➜ ~ brew services list                                                         
Name Status User File
dbus none                     
elasticsearch@6 error 256 user ~/Library/LaunchAgents/homebrew.mxcl.elasticsearch@6.plist

```

and

```auto
➜ ~ curl localhost:9200

curl: (7) Failed to connect to localhost port 9200 after 5 ms: Connection refused

```

logs:

```auto
Exception in thread "main" 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:83)

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 "main" 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)

/usr/local/Cellar/Elasticsearch@6/6.8.23/libexec/bin/Elasticsearch-env: line 79: cd: /usr/local/etc/Elasticsearch: No such file or directory

Exception in thread "main" java.nio.file.NoSuchFileException: /usr/local/var/jvm.options

at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)

at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)

at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)

at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:218)

at java.base/java.nio.file.Files.newByteChannel(Files.java:380)

at java.base/java.nio.file.Files.newByteChannel(Files.java:432)

at java.base/java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:422)

at java.base/java.nio.file.Files.newInputStream(Files.java:160)

at org.Elasticsearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:60)

Exception in thread "main" 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:83)

Exception in thread "main" 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:83)

Exception in thread "main" 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:83)

Exception in thread "main" 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:83)

Exception in thread "main" 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:83)

Exception in thread "main" 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:83)

Exception in thread "main" 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:83)

Exception in thread "main" 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:83)

```

Any idea how to fix it?

Blockquote

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [April 6, 2022, 7:23am UTC](https://discuss.elastic.co/t/can-not-get-run-elasticsearch-6-on-my-mac/301707/2 "2022-04-06T07:23:27Z")

</div>

It would help if you shared the logs. If you are using an M1 based Mac you should note that the [support matrix](https://www.elastic.co/support/matrix#matrix_os) indicates support for aarch64 was only added in Elasticsearch 7.12.

---

<div class="post-metadata">

**Author:** ![Sajjad\_Murtaza](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sajjad_murtaza/32/104020_2.png) [@Sajjad\_Murtaza](https://discuss.elastic.co/u/Sajjad_Murtaza)\
**Post date:** [April 6, 2022, 7:24am UTC](https://discuss.elastic.co/t/can-not-get-run-elasticsearch-6-on-my-mac/301707/3 "2022-04-06T07:24:48Z")

</div>

i updated question with logs

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [April 6, 2022, 7:25am UTC](https://discuss.elastic.co/t/can-not-get-run-elasticsearch-6-on-my-mac/301707/4 "2022-04-06T07:25:44Z")

</div>

That is not the Elasticsearch logs. It seem to be logger configuration.

What Mac are you using?

---

<div class="post-metadata">

**Author:** ![Sajjad\_Murtaza](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sajjad_murtaza/32/104020_2.png) [@Sajjad\_Murtaza](https://discuss.elastic.co/u/Sajjad_Murtaza)\
**Post date:** [April 6, 2022, 7:27am UTC](https://discuss.elastic.co/t/can-not-get-run-elasticsearch-6-on-my-mac/301707/5 "2022-04-06T07:27:28Z")

</div>

macbook pro - macos monterey 12.3.1 (21E258)

---

<div class="post-metadata">

**Author:** ![Sajjad\_Murtaza](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sajjad_murtaza/32/104020_2.png) [@Sajjad\_Murtaza](https://discuss.elastic.co/u/Sajjad_Murtaza)\
**Post date:** [April 6, 2022, 7:29am UTC](https://discuss.elastic.co/t/can-not-get-run-elasticsearch-6-on-my-mac/301707/6 "2022-04-06T07:29:38Z")

</div>

i am just installing Elasticsearch and i am not able to find logs under  
/var/log/Elasticsearch and /var/lib/Elasticsearch

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [April 6, 2022, 7:53am UTC](https://discuss.elastic.co/t/can-not-get-run-elasticsearch-6-on-my-mac/301707/7 "2022-04-06T07:53:20Z")

</div>

> [@Sajjad\_Murtaza](#):
>
> macbook pro - macos monterey 12.3.1 (21E258)

Is it a M1 Macbook Pro?

---

<div class="post-metadata">

**Author:** ![Sajjad\_Murtaza](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sajjad_murtaza/32/104020_2.png) [@Sajjad\_Murtaza](https://discuss.elastic.co/u/Sajjad_Murtaza)\
**Post date:** [April 6, 2022, 8:27am UTC](https://discuss.elastic.co/t/can-not-get-run-elasticsearch-6-on-my-mac/301707/8 "2022-04-06T08:27:58Z")

</div>

no, it's not M1

2,6 GHz 6-Core Intel Core i7

---

<div class="post-metadata">

**Author:** ![Sajjad\_Murtaza](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sajjad_murtaza/32/104020_2.png) [@Sajjad\_Murtaza](https://discuss.elastic.co/u/Sajjad_Murtaza)\
**Post date:** [April 6, 2022, 8:58am UTC](https://discuss.elastic.co/t/can-not-get-run-elasticsearch-6-on-my-mac/301707/9 "2022-04-06T08:58:59Z")

</div>

Here are the logs:

> Exception in thread "main" 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:83)
> 
> 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 "main" 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)
> 
> /usr/local/Cellar/elasticsearch@6/6.8.23/libexec/bin/elasticsearch-env: line 79: cd: /usr/local/etc/elasticsearch: No such file or directory
> 
> Exception in thread "main" java.nio.file.NoSuchFileException: /usr/local/var/jvm.options
> 
> at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
> 
> at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
> 
> at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
> 
> at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:218)
> 
> at java.base/java.nio.file.Files.newByteChannel(Files.java:380)
> 
> at java.base/java.nio.file.Files.newByteChannel(Files.java:432)
> 
> at java.base/java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:422)
> 
> at java.base/java.nio.file.Files.newInputStream(Files.java:160)
> 
> at org.elasticsearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:60)
> 
> Exception in thread "main" 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:83)
> 
> Exception in thread "main" 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:83)
> 
> Exception in thread "main" 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:83)
> 
> Exception in thread "main" 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:83)
> 
> Exception in thread "main" 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:83)
> 
> Exception in thread "main" 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:83)
> 
> Exception in thread "main" 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:83)
> 
> Exception in thread "main" 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:83)

---

<div class="post-metadata">

**Author:** ![zx8086](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zx8086/32/94917_2.png) [@zx8086](https://discuss.elastic.co/u/zx8086)\
**Post date:** [April 6, 2022, 11:06am UTC](https://discuss.elastic.co/t/can-not-get-run-elasticsearch-6-on-my-mac/301707/10 "2022-04-06T11:06:23Z")

</div>

Why are you running via Homebrew and not docker containers ? Ran an ELK via homebrew on a mac Mini and although it worked for many years through various versions, homebrew installations of ELK come with added complexities.

Is the correct Java installation working ?

---

<div class="post-metadata">

**Author:** ![h15171670914](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/h15171670914/32/104337_2.png) [@h15171670914](https://discuss.elastic.co/u/h15171670914)\
**Post date:** [April 13, 2022, 8:58am UTC](https://discuss.elastic.co/t/can-not-get-run-elasticsearch-6-on-my-mac/301707/11 "2022-04-13T08:58:00Z")

</div>

oh,I have the same trouble with you .Have you solved it? My operate system is windows server 2012. and my Elasticsearch version is 7.8.1.

 ![`YC7TX%)053SS}S9~}E~$L](https://us1.discourse-cdn.com/elastic/original/3X/f/4/f42da9f3ae8138bdee8a97698c65246773d6b4b2.png)

---

<div class="post-metadata">

**Author:** ![h15171670914](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/h15171670914/32/104337_2.png) [@h15171670914](https://discuss.elastic.co/u/h15171670914)\
**Post date:** [April 14, 2022, 1:02am UTC](https://discuss.elastic.co/t/can-not-get-run-elasticsearch-6-on-my-mac/301707/12 "2022-04-14T01:02:24Z")

</div>

hi，today i got the reason.because my java version is 18, and it is incapable with elastic search7.8.1.I changed my java to java1.8,then it worked out.

---

<div class="post-metadata">

**Author:** ![Sajjad\_Murtaza](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sajjad_murtaza/32/104020_2.png) [@Sajjad\_Murtaza](https://discuss.elastic.co/u/Sajjad_Murtaza)\
**Post date:** [April 14, 2022, 8:52am UTC](https://discuss.elastic.co/t/can-not-get-run-elasticsearch-6-on-my-mac/301707/13 "2022-04-14T08:52:25Z")

</div>

so you have changed the java version from 18 to 1.8?(one point eight)? can you please confirm this?

---

<div class="post-metadata">

**Author:** ![almokhtar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/almokhtar/32/105325_2.png) [@almokhtar](https://discuss.elastic.co/u/almokhtar)\
**Post date:** [May 6, 2022, 6:06pm UTC](https://discuss.elastic.co/t/can-not-get-run-elasticsearch-6-on-my-mac/301707/14 "2022-05-06T18:06:03Z")

</div>

same issue, but for real @h15171670914 from 18 to 1.8 how is that even possible ?

---

<div class="post-metadata">

**Author:** ![Sajjad\_Murtaza](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sajjad_murtaza/32/104020_2.png) [@Sajjad\_Murtaza](https://discuss.elastic.co/u/Sajjad_Murtaza)\
**Post date:** [May 9, 2022, 3:33am UTC](https://discuss.elastic.co/t/can-not-get-run-elasticsearch-6-on-my-mac/301707/15 "2022-05-09T03:33:39Z")

</div>

solution:

> <https://stackoverflow.com/questions/71922488/cannot-load-such-file-mysql2-mysql2/71998692#71998692>

---

<div class="post-metadata">

**Author:** ![pbasilio\_lamudi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pbasilio_lamudi/32/105527_2.png) [@pbasilio\_lamudi](https://discuss.elastic.co/u/pbasilio_lamudi)\
**Post date:** [May 11, 2022, 6:59am UTC](https://discuss.elastic.co/t/can-not-get-run-elasticsearch-6-on-my-mac/301707/16 "2022-05-11T06:59:19Z")

</div>

Have the same issue but with Elasticsearch 7 on my Intel Mac Monterey

---

<div class="post-metadata">

**Author:** ![hadees](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hadees/32/106457_2.png) [@hadees](https://discuss.elastic.co/u/hadees)\
**Post date:** [June 1, 2022, 3:50pm UTC](https://discuss.elastic.co/t/can-not-get-run-elasticsearch-6-on-my-mac/301707/17 "2022-06-01T15:50:55Z")

</div>

I've found the solution at least on OSX to run `elasticsearch@6` with homebrew.

You need to install `openjdk@8` and then make sure the `elasticsearch` binary is actually using it.

I had to edit `/usr/local/bin/elasticsearch` and change it to point to the `openjdk@8`

From

```auto
#!/bin/bash
JAVA_HOME="${JAVA_HOME:-/usr/local/opt/openjdk/libexec/openjdk.jdk/Contents/Home}" exec "/usr/local/Cellar/elasticsearch@6/6.8.23/libexec/bin/elasticsearch" "$@"

```

to

```auto
#!/bin/bash
JAVA_HOME="${JAVA_HOME:-/usr/local/opt/openjdk@8/libexec/openjdk.jdk/Contents/Home}" exec "/usr/local/Cellar/elasticsearch@6/6.8.23/libexec/bin/elasticsearch" "$@"

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 29, 2022, 3:51pm UTC](https://discuss.elastic.co/t/can-not-get-run-elasticsearch-6-on-my-mac/301707/18 "2022-06-29T15:51:05Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
