-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Closed
Labels
Description
If installing logstash as a package, but then using the logstash command directly, for example to check a config or to check for a version, it can not find the config file.
see
vagrant@packer-virtualbox-iso-1452039329:~$ sudo /usr/share/logstash/bin/logstash --version
--- jar coordinate com.fasterxml.jackson.core:jackson-annotations already loaded with version 2.7.1 - omit version 2.7.0
--- jar coordinate com.fasterxml.jackson.core:jackson-databind already loaded with version 2.7.1 - omit version 2.7.1-1
Errno::ENOENT: No such file or directory - /usr/share/logstash/config/logstash.yml
read at org/jruby/RubyIO.java:3804
read at org/jruby/RubyIO.java:3987
read_yaml at /usr/share/logstash/vendor/local_gems/47abefa3/logstash-core-5.0.0.dev-java/lib/logstash/settings.rb:100
from_yaml at /usr/share/logstash/vendor/local_gems/47abefa3/logstash-core-5.0.0.dev-java/lib/logstash/settings.rb:94
run at /usr/share/logstash/vendor/local_gems/47abefa3/logstash-core-5.0.0.dev-java/lib/logstash/runner.rb:141
run at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:132
(root) at /usr/share/logstash/lib/bootstrap/environment.rb:66
vagrant@packer-virtualbox-iso-1452039329:~$ logstash expect to have the file in the LS_HOME location, /usr/share/logstash however it also has one in /etc/logstash and not sure if users will also think that when running as a command it will pick up a config file in the $HOME directory.
I guess is resonable to think about having only 1 reference to the config file and this could be the one inside /etc/logstash.
This has been tested with the deb package, but will also have the same behaviour with the rpm I guess.
//cc @jsvd this is the bug I told you. @untergeek might be also of your interest.