我的brew installed elasticsearch-full
开始失败并出现错误:
Unrecognized VM option 'UseConcMarkSweepGC'
Error: Could not create the Java Virtual Machine.
macOS 10.15.7
答案 0 :(得分:2)
我的配置最终有了一些旧设置,因此我不得不注释掉GC configuration
下的行:
# /usr/local/etc/elasticsearch/jvm.options
## GC configuration
#-XX:+UseConcMarkSweepGC
#-XX:CMSInitiatingOccupancyFraction=75
#-XX:+UseCMSInitiatingOccupancyOnly
答案 1 :(得分:1)
/usr/local/etc/elasticsearch
中应该有默认配置文件。
我建议备份您当前的配置文件,将其替换为默认值(也应为up2date),并在需要时应用您的特殊配置。
cd /usr/local/etc/elasticsearch
cp elasticsearch.yml elasticsearch.yml.bck
cp elasticsearch.yml.default elasticsearch.yml
cp jvm.options jvm.options.bck
cp jvm.options.default jvm.options
cp log4j2.properties log4j2.properties.bck
cp log4j2.properties.default log4j2.properties
eddie[elasticsearch]$ ls -la
total 112
drwxr-xr-x 12 eddie admin 384 Dec 7 12:18 .
drwxrwxr-x 39 eddie admin 1248 Dec 6 15:22 ..
-rw-rw---- 1 eddie admin 199 Oct 27 14:16 elasticsearch.keystore
-rw-r----- 1 eddie admin 2872 Dec 7 12:18 elasticsearch.yml
-rw-r----- 1 eddie admin 2872 Dec 6 15:22 elasticsearch.yml.default
-rw-r----- 1 eddie admin 3058 Dec 7 12:18 elasticsearch.yml.bck
-rw-r----- 1 eddie admin 2357 Dec 7 12:17 jvm.options
-rw-r----- 1 eddie admin 2357 Dec 6 15:22 jvm.options.default
-rw-r----- 1 eddie admin 2892 Dec 7 12:17 jvm.options.bck
-rw-r----- 1 eddie admin 11021 Dec 7 12:18 log4j2.properties
-rw-r----- 1 eddie admin 11021 Dec 6 15:22 log4j2.properties.default
-rw-r----- 1 eddie admin 3992 Dec 7 12:18 log4j2.properties.bck