Hi there. I tried to install Elastichseach 7.17.
When I try to start elastic I have this error:
sudo -i service elasticsearch start
* Starting Elasticsearch Server Exception in thread "main" java.nio.file.NoSuchFileException: /etc/elasticsearch/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.readJvmOptionsFiles(JvmOptionsParser.java:168)
at org.elasticsearch.tools.launchers.JvmOptionsParser.jvmOptions(JvmOptionsParser.java:124)
at org.elasticsearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:86)
And also with this command:
sudo service elasticsearch start
* Starting Elasticsearch Server Exception in thread "main" java.nio.file.NoSuchFileException: /etc/elasticsearch/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.readJvmOptionsFiles(JvmOptionsParser.java:168)
at org.elasticsearch.tools.launchers.JvmOptionsParser.jvmOptions(JvmOptionsParser.java:124)
at org.elasticsearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:86)
So, I tried to remove it.. but I have this output
sudo apt-get --purge autoremove elasticsearch
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
elasticsearch*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 517 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 44967 files and directories currently installed.)
Removing elasticsearch (7.17.2) ...
Stopping elasticsearch service...System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
dpkg: error processing package elasticsearch (--remove):
installed elasticsearch package pre-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
### NOT starting on installation, please execute the following statements to configure elasticsearch service to start automatically using systemd
sudo systemctl daemon-reload
sudo systemctl enable elasticsearch.service
### You can start elasticsearch service by executing
sudo systemctl start elasticsearch.service
Errors were encountered while processing:
elasticsearch
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
Please, can anyone help me? Thanks