gpt4 book ai didi

java - 安装Logstash错误JAVA(OpenJDK 64位服务器VM警告)

转载 作者:行者123 更新时间:2023-12-03 01:14:59 32 4
gpt4 key购买 nike

我已遵循官方文档并编写了以下内容:

# Update repository
sudo apt-get update

# Install necessary things. Like SSL support and JDK
sudo apt-get install apt-transport-https default-jdk -y

# Download and install the GPG KEY. Add the repository for elasticsearch version 7. Update and install logstash
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list
sudo apt-get update && sudo apt-get install logstash -y

# configure ES daemon
sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable logstash.service
sudo systemctl start logstash.service
但是出现以下内容:
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.headius.backport9.modules.Modules to method sun.nio.ch.NativeThread.signal(long)
WARNING: Please consider reporting this to the maintainers of com.headius.backport9.modules.Modules
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/pleaserun-0.0.31/lib/pleaserun/platform/base.rb:112: warning: constant ::Fixnum is deprecated
Successfully created system startup script for Logstash
Created symlink /etc/systemd/system/multi-user.target.wants/logstash.service → /etc/systemd/system/logstash.service.
尽管在我运行以下命令进行手动测试时已安装它:
/usr/share/logstash/bin/logstash -e "input { stdin { } } output { stdout {} }"
错误重复出现,不允许执行任何操作。
luis@ubuntu18:~$ /usr/share/logstash/bin/logstash -e "input { stdin { } } output { stdout {} }"
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.headius.backport9.modules.Modules (file:/usr/share/logstash/logstash-core/lib/jars/jruby-complete-9.2.11.1.jar) to method sun.nio.ch.NativeThread.signal(long)
WARNING: Please consider reporting this to the maintainers of com.headius.backport9.modules.Modules
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
WARNING: Could not find logstash.yml which is typically located in $LS_HOME/config or /etc/logstash. You can specify the path using --path.settings. Continuing using the defaults
Could not find log4j2 configuration at path /usr/share/logstash/config/log4j2.properties. Using default config which logs errors to the console
[FATAL] 2020-07-18 21:49:19.544 [main] runner - An unexpected error occurred! {:error=>#<ArgumentError: Path "/usr/share/logstash/data" must be a writable directory. It is not writable.>, :backtrace=>["/usr/share/logstash/logstash-core/lib/logstash/settings.rb:528:in `validate'", "/usr/share/logstash/logstash-core/lib/logstash/settings.rb:288:in `validate_value'", "/usr/share/logstash/logstash-core/lib/logstash/settings.rb:199:in `block in validate_all'", "org/jruby/RubyHash.java:1415:in `each'", "/usr/share/logstash/logstash-core/lib/logstash/settings.rb:198:in `validate_all'", "/usr/share/logstash/logstash-core/lib/logstash/runner.rb:310:in `execute'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/clamp-0.6.5/lib/clamp/command.rb:67:in `run'", "/usr/share/logstash/logstash-core/lib/logstash/runner.rb:268:in `run'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/clamp-0.6.5/lib/clamp/command.rb:132:in `run'", "/usr/share/logstash/lib/bootstrap/environment.rb:88:in `<main>'"]}
[ERROR] 2020-07-18 21:49:19.633 [main] Logstash - java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit
我不知道是否是由于Java版本(openjdk 11.0.7 2020-04-14)或其他错误引起的。我从未使用过Java,所以这些错误使我有些困惑。谢谢你们。

最佳答案

查看特定于行下方的错误堆栈跟踪,这意味着运行logstash进程的用户/usr/share/logstash/data是不可写的。

error=>#<ArgumentError:Path"/usr/share/logstash/data"mustbeawritabledirectory.Itisnotwritable.>,


这不是Java问题,而是权限问题,您需要向正在运行此过程的此文件夹中的用户授予写访问权,并且有大量资源来解决此问题。

关于java - 安装Logstash错误JAVA(OpenJDK 64位服务器VM警告),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62974178/

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