ElasticSearch Error

Hi All,

I was able to start Elasticsearch on my local machine at port 9200 till 2 days back. Now when I am going to the path and executing ./Elasticsearch - It gives me an error:

PP-C02Z66G1LVCG:bin mudit.tripathi$ ./Elasticsearch
warning: usage of JAVA_HOME is deprecated, use ES_JAVA_HOME
/usr/local/Cellar/Elasticsearch-full/7.15.1/libexec/bin/Elasticsearch-env: line 95: cd: /path/to/my/config: No such file or directory
warning: usage of JAVA_HOME is deprecated, use ES_JAVA_HOME
Exception in thread "main" java.nio.file.NoSuchFileException: /usr/local/Cellar/Elasticsearch-full/7.15.1/bin/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:219)
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.readJvmOptionsFiles(JvmOptionsParser.java:168)
at org.Elasticsearch.tools.launchers.JvmOptionsParser.jvmOptions(JvmOptionsParser.java:124)
at org.Elasticsearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:86)
PP-C02Z66G1LVCG:bin mudit.tripathi$

I have seen Elasticsearch-env also, but there is only one line.

PP-C02Z66G1LVCG:bin mudit.tripathi$ cat Elasticsearch-env
#!/bin/bash
exec "/usr/local/Cellar/Elasticsearch-full/7.15.1/libexec/bin/Elasticsearch-env" "$@"

Can any one please help?

How did you install?
What OS?
You did not format your code / output with the </> so that is very hard to read.

The first thing I notice is that executable should be started as

./bin/elasticsearch

Not in the bin directory and not with a Capital E not ./Elasticsearch

I am not sure how you got capital Es

I installed with homebrew on macos. Yes, it was in bin. I used ./bin/Elasticsearch (not E typo mistake). It was running fine till 2 days back. I don't know what happened it stopped running and gave the error I posted.

(i think small e is getting converted to big in comments)

I am exhausted trying to fix it, not able to. I am mentioning everything what I did from start.

1 - installed homebrew package installer
2 - brew tap elastic/tap
3 - brew install elastic/tap/elasticsearch-full

so, elastic search installed and the script present in this path:
/usr/local/Cellar/elasticsearch-full/7.15.1/bin



and my .bash_profile looks like this:

PATH="/Library/Frameworks/Python.framework/Versions/3.9/bin:${PATH}"
export PATH

export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home
export ES_HOME=/usr/local/var/homebrew/linked/elasticsearch-full
export ES_PATH_CONF=/usr/local/etc/elasticsearch


Still I am getting the same error

PP-C02Z66G1LVCG:bin mudit.tripathi$ ./elasticsearch
warning: usage of JAVA_HOME is deprecated, use ES_JAVA_HOME
/usr/local/Cellar/elasticsearch-full/7.15.1/libexec/bin/elasticsearch-env: line 95: cd: /path/to/my/config: No such file or directory
warning: usage of JAVA_HOME is deprecated, use ES_JAVA_HOME
Exception in thread "main" java.nio.file.NoSuchFileException: /usr/local/Cellar/elasticsearch-full/7.15.1/bin/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:219)
	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.readJvmOptionsFiles(JvmOptionsParser.java:168)
	at org.elasticsearch.tools.launchers.JvmOptionsParser.jvmOptions(JvmOptionsParser.java:124)
	at org.elasticsearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:86)

restarted the laptop and now it is working. thanks Stephen.

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