Elasticsearch无法识别的VM选项“UseConcMarkSweepGC”

30byixjq  于 2023-08-03  发布在  ElasticSearch
关注(0)|答案(1)|浏览(384)

运行elasticsearch.bat时出现此异常Unrecognized VM option 'UseConcMarkSweepGC'这是我的jvm. options文件

################################################################
##
## JVM configuration
##
################################################################
##
## WARNING: DO NOT EDIT THIS FILE. If you want to override the
## JVM options in this file, or set any additional options, you
## should create one or more files in the jvm.options.d
## directory containing your adjustments.
##
## See https://www.elastic.co/guide/en/elasticsearch/reference/@project.minor.version@/jvm-options.html
## for more information.
##
################################################################


################################################################
## IMPORTANT: JVM heap size
################################################################
##
## The heap size is automatically configured by Elasticsearch
## based on the available memory in your system and the roles
## each node is configured to fulfill. If specifying heap is
## required, it should be done through a file in jvm.options.d,
## which should be named with .options suffix, and the min and
## max should be set to the same value. For example, to set the
## heap to 4 GB, create a new file in the jvm.options.d
## directory containing these lines:
##
## -Xms4g
## -Xmx4g
##
## See https://www.elastic.co/guide/en/elasticsearch/reference/@project.minor.version@/heap-size.html
## for more information
##
################################################################

################################################################
## Expert settings
################################################################
##
## All settings below here are considered expert settings. Do
## not adjust them unless you understand what you are doing. Do
## not edit them in this file; instead, create a new file in the
## jvm.options.d directory containing your adjustments.
##
################################################################

-XX:+UseG1GC

## JVM temporary directory
-Djava.io.tmpdir=${ES_TMPDIR}

## heap dumps

# generate a heap dump when an allocation from the Java heap fails; heap dumps
# are created in the working directory of the JVM unless an alternative path is
# specified
-XX:+HeapDumpOnOutOfMemoryError

# exit right after heap dump on out of memory error
-XX:+ExitOnOutOfMemoryError

# specify an alternative path for heap dumps; ensure the directory exists and
# has sufficient space
@heap.dump.path@

# specify an alternative path for JVM fatal error logs
@error.file@

## GC logging
-Xlog:gc*,gc+age=trace,safepoint:file=@loggc@:utctime,level,pid,tags:filecount=32,filesize=64m

字符串
我已经安装了弹性zip文件,并将bin添加到环境变量中,并尝试运行elasticsearch.bat命令,并得到了异常。错误:无法识别的VM选项“UseConcMarkSweepGC”错误:无法创建Java虚拟机。错误:发生致命异常。程序将退出。在org. elasticsearch服务器。cli. JvmOption. flagsFinal(JvmOption.java:113)at org. elasticsearch服务器。cli. JvmOption. findFinalOptions(JvmOption.java:80)at org. elasticsearch服务器。cli. MachineDependentHeap. org上的determineHeapSettings(MachineDependentHeap.java:59)。elasticsearch服务器。cli. JvmOptionsParser. jvmOptions(JvmOptionsParser.java:140)at org. elasticsearch服务器。cli. JvmOptionsParser. org上的determineJvmOptions(JvmOptionsParser.java:92)。elasticsearch服务器。cli. ServerProcess。createProcess(ServerProcess.java:214)at org. elasticsearch服务器。cli. ServerProcess。start(ServerProcess.java:108)at org. elasticsearch服务器。cli. ServerProcess。start(ServerProcess.java:91)at org. elasticsearch服务器。cli.服务器startServer(ServerCli.java:234)at org. elasticsearch服务器。cli.服务器execute(ServerCli.java:91)at org. elasticsearch很普通cli. EnvironmentAwareCommand。在org上执行(EnvironmentAwareCommand.java:54)。elasticsearch cli.命令mainWithoutErrorHandling(Command.java:85)at org. elasticsearch cli.命令main(Command.java:50)at org. elasticsearch发射器CliToolLauncher。main(CliToolLauncher.java:64)

46scxncf

46scxncf1#

对你的问题最直接的解决方法是:将“-XX:+IgnoreUnrecognizedVMOptions”添加到JVM选项中

相关问题