Custom logstash image fails with java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit

Hi, the following is my logstash.conf and logstash.yml files:

logstash.conf

input { beats { port => 5044 } }
filter {}
output { http {
    http_mehod => "post"
    url => "https://dydx.ngrok.io"
} }

logstash.yml

http.post: "0.0.0.0"
xpack.monitoring.enabled: false

I'm replacing the logstash.conf and logstash.yml in /usr/share/logstash/pipeline and config directories with the files above. The docker image used is 7.0.0.

Docker is built fine, however, upon running I get the following:

java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit

I would expect there to be additional error messages preceding that.

Here's what comes before it:

Sending Logstash logs to /usr/share/logstash/logs which is now configured via log4j2.properties
[2019-04-24T21:22:35,161][FATAL][logstash.runner          ] An unexpected error occurred! {:error=>#<ArgumentError: Setting "http.post" hasn't been registered>, :backtrace=>["/usr/share/logstash/logstash-core/lib/logstash/settings.rb:36:in `get_setting'", "/usr/share/logstash/logstash-core/lib/logstash/settings.rb:69:in `set_value'", "/usr/share/logstash/logstash-core/lib/logstash/settings.rb:88:in `block in merge'", "org/jruby/RubyHash.java:1419:in `each'", "/usr/share/logstash/logstash-core/lib/logstash/settings.rb:88:in `merge'", "/usr/share/logstash/logstash-core/lib/logstash/settings.rb:137:in `validate_all'", "/usr/share/logstash/logstash-core/lib/logstash/runner.rb:278:in `execute'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/clamp-0.6.5/lib/clamp/command.rb:67:in `run'", "/usr/share/logstash/logstash-core/lib/logstash/runner.rb:237:in `run'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/clamp-0.6.5/lib/clamp/command.rb:132:in `run'", "/usr/share/logstash/lib/bootstrap/environment.rb:73:in `<main>'"]}
[2019-04-24T21:22:35,191][ERROR][org.logstash.Logstash    ] java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit

You have an entry for http.post in your logstash.yml, but there is no code in logstash that is set up to consume that. The fix is most likely to comment out that line.

What were you trying to achieve by adding it?

It gets added by the entrypoint, and here it says the defaults are to be kept, in case the yml file is to be replaced. I would like to turn off x-pack, as it complains about http://elasticsearch:9200 not existing. If I understand correctly, that value is set by the yml file, and is populated by the entrypoint script.

It should be http.host, with an h, not http.post.

Unbelievable. Thank you for bringing that to my attention Badger.

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