gpt4 book ai didi

elasticsearch - 使用 Homebrew 软件升级Elasticsearch 7.3

转载 作者:行者123 更新时间:2023-12-04 01:35:38 25 4
gpt4 key购买 nike

我正在通过 Homebrew 软件使用Elasticsearch 6.8,并且试图升级到7.3。以前,在6.8上,我已经收到有关不存在的日志文件的警告,但是服务器仍然可以运行-因此我什么也没做。
现在使用7.3时,出现错误,服务器将无法运行:

Exception in thread "main" java.lang.RuntimeException: starting java failed with [1]
output:
[0.002s][error][logging] Error opening log file 'logs/gc.log': No such file or directory
[0.002s][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)
我尝试创建安装了Elasticsearch的目录/文件,但是对我来说不起作用(或者我做错了什么)。

最佳答案

引用:https://onecompiler.com/questions/3uwszcf3x/homebrew-installed-elasticsearch-failing-to-start

我已经通过将相对的logs/gc.log路径更改为绝对路径来解决此问题。请按照以下步骤解决问题

  • 打开位于/usr/local/etc/elasticsearch/jvm.options的jvm.options文件
  • 将相对路径更改为绝对路径
    来自以下
  • # JDK 9+ GC logging
    9-:-Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m


    # JDK 9+ GC logging
    9-:-Xlog:gc*,gc+age=trace,safepoint:file=/usr/local/var/log/elasticsearch/gc.log:utctime,pid,tags:filecount=32,filesize=64m
  • 重新启动elasticsearch $ brew services restart elasticsearch-full或仅在没有守护程序的情况下启动它-$ elasticsearch
  • 关于elasticsearch - 使用 Homebrew 软件升级Elasticsearch 7.3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57479986/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com