Reputation: 662
When I run elasticsearch
from the console I get the following output:
Exception in thread "main" java.lang.RuntimeException: starting java failed with [1]
output:
[0.003s][error][logging] Error opening log file 'logs/gc.log': No such file or directory
[0.003s][error][logging] Initialization of output 'file=logs/gc.log' using options 'filecount=32,filesize=64m' failed.
error:
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Invalid -Xlog option '-Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m', see error log for details.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
at org.elasticsearch.tools.launchers.JvmErgonomics.flagsFinal(JvmErgonomics.java:111)
at org.elasticsearch.tools.launchers.JvmErgonomics.finalJvmOptions(JvmErgonomics.java:79)
at org.elasticsearch.tools.launchers.JvmErgonomics.choose(JvmErgonomics.java:57)
at org.elasticsearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:89)
Notes: - Just reinstalled Elasticsearch with homebrew - Elastic search v 7.4
What could be the problem?
Upvotes: 5
Views: 8904
Reputation: 1302
The issue here looks to be logs/gc.logs
not resolving to a full path. Try specifying a full log path like /usr/local/var/log/elasticsearch/gc.log
or /var/log/elasticsearch/gc.log
in jvm.options
Have a look at this thread.
Upvotes: 4