logstash java opts,logstash找不到log4j2.properties文件

I have been trying to setup a proof of concept elasticsearch/kibana/logstash environment, but it is not working at the moment.

The LOGSTASH_HOME is:

c:\_work\issues\log4j_socketappender\logstash-5.0.1\

In the console log of logstash I found the following line:

Could not find log4j2 configuration at path /_work/issues/log4j_socketappender/logstash-5.0.1/config/log4j2.properties. Using default config which logs to console

You can see logstash is trying to look for log4j2.properties in the right location but it does not contain the "c:" part

I tried adding the path to the config\jvm.options

-Dlog4j.configurationFile=c:\_work\issues\log4j_socketappender\logstash-5.0.1\log4j2.properties

but it did not work.

解决方案

Eventually I fixed it by adding the following line into bin\setup.bat

42. SET JAVA_OPTS=%JAVA_OPTS% -Dlog4j.configurationFile=%LS_HOME%\config\log4j2.properties

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值