欢迎光临
我们一直在努力

logstash启动报错we can not copy embedded jar to temp directory

项目logstash服务启动时报错,报错如下:

YAML extension failed to load.
Check your env for conflicting versions of SnakeYAML
See https://github.com/jruby/jruby/wiki/FAQs#why-does-the-psych-yaml-extension-fail-to-load-in-my-environment
[FATAL] 2022-12-06 15:25:52.782 [main] Logstash - Logstash stopped processing because of an error: (GemspecError) 
[!] There was an error while loading `logstash-core-plugin-api.gemspec`: load error: psych -- java.lang.RuntimeException: BUG: we can not copy embedded jar to temp directory
Does it try to require a relative path? That's been removed in Ruby 1.9. Bundler cannot continue.

经过排查是由于/tmp权限异常导致,logstash运行用户无权限对/tmp目录进行操作。

解决办法

修复权限
chmod a+rwx,o+t /tmp
更改配置文件

编辑jvm.options文件,修改或删除-Djava.io.tmpdir=${HOME}

参考文章:https://discuss.elastic.co/t/logstash-is-failing-when-running-as-a-service-due-to-logstash-core-plugin-api-gemspec-error/271385

文章来源于互联网:logstash启动报错we can not copy embedded jar to temp directory

赞(0)
未经允许不得转载:莱卡云 » logstash启动报错we can not copy embedded jar to temp directory