1

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.

3 Answers 3

4

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
Sign up to request clarification or add additional context in comments.

Comments

1

Two things come to mind:

Try specifying the full path with -Dlog4j.configurationFile=c:\_work\issues\log4j_socketappender\logstash-5.0.1\log4j2.properties

Also, is the properties file using the new Log4j2 properties syntax? An old log4j 1.2-style properties file will not work. (Although I would expect a different error message in that case.)

1 Comment

That is what I tried, full path. Let me edit my question to avoid confusion. And the file was a log4j2 file.
0

as you can see here

create an Environment Variable in Windows LS_SETTINGS_DIR and set it to:

        /c:/logstash-5.0.1/config

(notice - leading forward slash and all slashes are unix style not Windows style backslashes)

or to invoke logstash with

      --path.settings=/c:/logstash-5.0.1/config/

(again note position and direction of slashes)

I hope that this helps someone avoid the Googling and testing I have just done!

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.