Logstash ver 7.4.0 in Docker :: Set AutoConfig Refresh?

Hi ELK Wise Ones…

I recently spun up Logstash 7.4.0 as a Docker container. My host machine is a Ubuntu 16.04.4, and my Docker is 17.09.0-ce, build afdb6d4.

I was following the procedure to set automatic config reloading (here), as I need a graceful way to tweak the config file. (I’m referring to the config file located in /usr/share/logstash/pipeline/logstash.conf)

The documentation says to run this command: “bin/logstash –f apache.config --config.reload.automatic”. But for me, it did not go well. (See below)

The command runs the logstash script with the -f option. But the error message suggests the -f option is not viable. That seems really weird to me... is it possible I'm doing something wrong? Is there another way to set auto config reload? Would love to know. Thanks!

bash-4.2$ pwd
/usr/share/logstash
bash-4.2$
bash-4.2$
bash-4.2$ bin/logstash –f apache.config --config.reload.automatic
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.headius.backport9.modules.Modules (file:/usr/share/logstash/logstash-core/lib/jars/jruby-complete-9.2.8.0.jar) to field java.io.FileDescriptor.fd
WARNING: Please consider reporting this to the maintainers of com.headius.backport9.modules.Modules
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Thread.exclusive is deprecated, use Thread::Mutex
ERROR: Unknown command '–f'
See: 'bin/logstash --help'
[ERROR] 2019-10-14 20:02:33.485 [main] Logstash - java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit
bash-4.2$

The character before the letter f is a unicode character for "non-breaking hyphen" U+8211, and not an ASCII hyphen ('-').

EDIT: I see that the source documentation had the wrong character there :weary: and have opened up a pull-request to fix it here doc: replace unicode non-breaking hyphen U+8211 with ASCII hyphen by yaauie · Pull Request #11217 · elastic/logstash · GitHub

Ahhhhhh awesome! Thank you, this is really helpful

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