Bug in 5.2.0: --logstash.data command line option ignored

logstash isn't parsing the --path.data option on the command line. Bug?

-bash-4.1$ /opt/logstash-LATEST/bin/logstash --path.data /opt/logstash-data/data/ 
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
ArgumentError: Path "/opt/logstash-LATEST/data" does not exist, and I failed trying to create it: Errno::EACCES - Permission denied - /opt/logstash-LATEST/data
      value at /opt/logstash-LATEST/logstash-core/lib/logstash/settings.rb:448
        tap at org/jruby/RubyKernel.java:1858
      value at /opt/logstash-LATEST/logstash-core/lib/logstash/settings.rb:440
  get_value at /opt/logstash-LATEST/logstash-core/lib/logstash/settings.rb:56
   LogStash at /opt/logstash-LATEST/logstash-core/lib/logstash/environment.rb:57
     (root) at /opt/logstash-LATEST/logstash-core/lib/logstash/environment.rb:9
    require at org/jruby/RubyKernel.java:1040
     (root) at /opt/logstash-LATEST/logstash-core/lib/logstash/runner.rb:1
    require at org/jruby/RubyKernel.java:1040
     (root) at /opt/logstash-LATEST/lib/bootstrap/environment.rb:70

You really should define path.data in the logstash.yml file, which—in your case—seems like it should be in /opt/logstash-LATEST/config.

I did, but that didn't work either!

Here is what I have in logstash.yml:

path.data: /opt/logstash-data/data
path.logs: /opt/logstash-logs/

My setup is a clean binary extracted from the tar.gz file:


Then a data dir and a log dir:


For now I am using a symlink on data :frowning:

I am using the --path.settings option to logstash.

What OS are you using? I will try to replicate this.

1 Like

openjdk 1.8 on centos 7 iirc.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.