Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File jvm.options in root is unmanaged/may be missing #1197

Closed
bmagistro opened this issue Jul 11, 2023 · 0 comments · Fixed by #1202
Closed

File jvm.options in root is unmanaged/may be missing #1197

bmagistro opened this issue Jul 11, 2023 · 0 comments · Fixed by #1202

Comments

@bmagistro
Copy link

This effectively re-opens #928 and relates to #1041.

When migrating from the multi instance to single instance of elasticsearch, the jvm.options file may not exist and is not created by the module. This results in elasticsearch being unable to start. As pointed out in #928 the file may be empty but does need to exist. The manual work around is to touch /etc/elasticsearch/jvm.options so the file does exist and allows the service to start. I am willing to guess the file is indeed present in the default install and that is why this doesn't trigger an issue more often.

from /var/log/messages

Jul  9 12:22:44 es-0001 systemd: Starting Elasticsearch...
Jul  9 12:22:45 es-0001 systemd-entrypoint: Exception in thread "main" java.nio.file.NoSuchFileException: /etc/elasticsearch/jvm.options
Jul  9 12:22:45 es-0001 systemd-entrypoint: at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
Jul  9 12:22:45 es-0001 systemd-entrypoint: at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
Jul  9 12:22:45 es-0001 systemd-entrypoint: at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
Jul  9 12:22:45 es-0001 systemd-entrypoint: at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:218)
Jul  9 12:22:45 es-0001 systemd-entrypoint: at java.base/java.nio.file.Files.newByteChannel(Files.java:380)
Jul  9 12:22:45 es-0001 systemd-entrypoint: at java.base/java.nio.file.Files.newByteChannel(Files.java:432)
Jul  9 12:22:45 es-0001 systemd-entrypoint: at java.base/java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:422)
Jul  9 12:22:45 es-0001 systemd-entrypoint: at java.base/java.nio.file.Files.newInputStream(Files.java:160)
Jul  9 12:22:45 es-0001 systemd-entrypoint: at org.elasticsearch.tools.launchers.JvmOptionsParser.readJvmOptionsFiles(JvmOptionsParser.java:168)
Jul  9 12:22:45 es-0001 systemd-entrypoint: at org.elasticsearch.tools.launchers.JvmOptionsParser.jvmOptions(JvmOptionsParser.java:124)
Jul  9 12:22:45 es-0001 systemd-entrypoint: at org.elasticsearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:86)
Jul  9 12:22:46 es-0001 systemd: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
Jul  9 12:22:46 es-0001 systemd: Failed to start Elasticsearch.
Jul  9 12:22:46 es-0001 systemd: Unit elasticsearch.service entered failed state.
Jul  9 12:22:46 es-0001 systemd: elasticsearch.service failed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant