Can not get run Elasticsearch 6 on my MAC

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

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

and

➜  ~ curl localhost:9200

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

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)

Any idea how to fix it?

Blockquote

It would help if you shared the logs. If you are using an M1 based Mac you should note that the support matrix indicates support for aarch64 was only added in Elasticsearch 7.12.

i updated question with logs

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

What Mac are you using?

macbook pro - macos monterey 12.3.1 (21E258)

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

Is it a M1 Macbook Pro?

no, it's not M1

2,6 GHz 6-Core Intel Core i7

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)

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 ?

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.

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.

1 Like

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

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

solution:

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

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

#!/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

#!/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"  "$@"

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