Logstash.yml configuration error

Keywords: ELK - Virtual Machines - Technical issue - Other
Description:
Hello,
I added these lines

input {
    beats {
        port => "5044"
    }
}

to the configuration file in /home/bitnami/stack/logstash/conf

and I have such info in log file:

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 org.jruby.ext.openssl.SecurityHelper (file:/tmp/jruby-4519/jruby10809529560565048951jopenssl.jar) to field java.security.MessageDigest.provider
WARNING: Please consider reporting this to the maintainers of org.jruby.ext.openssl.SecurityHelper
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
Sending Logstash logs to /opt/bitnami/logstash/logs which is now configured via log4j2.properties
2020-09-21 09:05:17,677 main ERROR Unable to create file /opt/bitnami/logstash/logs/logstash-plain.log java.io.IOException: Permission denied
        at java.base/java.io.UnixFileSystem.createFileExclusively(Native Method)
        at java.base/java.io.File.createNewFile(File.java:1026)
        at org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory.createManager(RollingFileManager.java:658)
        at org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory.createManager(RollingFileManager.java:641)
        at org.apache.logging.log4j.core.appender.AbstractManager.getManager(AbstractManager.java:113)
        at org.apache.logging.log4j.core.appender.OutputStreamManager.getManager(OutputStreamManager.java:100)
        at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.getFileManager(RollingFileManager.java:205)        at org.apache.logging.log4j.core.appender.RollingFileAppender$Builder.build(RollingFileAppender.java:146)
        at org.apache.logging.log4j.core.appender.RollingFileAppender$Builder.build(RollingFileAppender.java:62)
        at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:122)

What is going on and how to fix it?

Hi @zen.xen3,

It seems that the Logstash application can’t create that log file due to a permissions issue. Let’s modify the permissions configuration of the log folder and retry

sudo chown logstash:root /opt/bitnami/logstash/logs
sudo chmod 775 /opt/bitnami/logstash/logs

Do you still get the error?

Hi @jota,
now it works fine, thanks for help

Hello @jota,
maybe one more time you will help me.
I have added these lines, these fields are from my own .log files:

input {
    beats {
        port => "5044"
    }
}

filter {
  grok {
    match => { "message" => "(%{TIMESTAMP_ISO8601:m01-date-time})?,(%{IPORHOST:m02-client-ip})?,(%{IPORHOST:m03-client-hostname})?"}
}

output
{
    elasticsearch
    { 
        hosts => ["192.168.11.91:9200"]
    index => "%{[@metadata][beat]}-%{[@metadata][version]}-%{+YYYY.MM.dd}"
    }
}

In logstash.log I have these

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 org.jruby.ext.openssl.SecurityHelper (file:/tmp/jruby-311/jruby10764829353075267651jopenssl.jar) to field java.security.MessageDigest.provider
WARNING: Please consider reporting this to the maintainers of org.jruby.ext.openssl.SecurityHelper
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
Sending Logstash logs to /opt/bitnami/logstash/logs which is now configured via log4j2.properties
[2020-09-22T10:49:45,247][INFO ][logstash.runner          ] Starting Logstash {"logstash.version"=>"7.9.1", "jruby.version"=>"jruby 9.2.13.0 (2.5.7) 2020-08-03 9a89c94bcc OpenJDK 64-Bit Server VM 11.0.8+10-LTS on 11.0.8+10-LTS +indy +jit [linux-x86_64]"}
[2020-09-22T10:49:45,653][FATAL][logstash.runner          ] An unexpected error occurred! {:error=>#<ArgumentError: Setting "" hasn't been registered>, :backtrace=>["/opt/bitnami/logstash/logstash-core/lib/logstash/settings.rb:86:in `get_setting'", "/opt/bitnami/logstash/logstash-core/lib/logstash/settings.rb:119:in `set_value'", "/opt/bitnami/logstash/logstash-core/lib/logstash/settings.rb:138:in `block in merge'", "org/jruby/RubyHash.java:1415:in `each'", "/opt/bitnami/logstash/logstash-core/lib/logstash/settings.rb:138:in `merge'", "/opt/bitnami/logstash/logstash-core/lib/logstash/settings.rb:196:in `validate_all'", "/opt/bitnami/logstash/logstash-core/lib/logstash/runner.rb:312:in `execute'", "/opt/bitnami/logstash/vendor/bundle/jruby/2.5.0/gems/clamp-0.6.5/lib/clamp/command.rb:67:in `run'", "/opt/bitnami/logstash/logstash-core/lib/logstash/runner.rb:268:in `run'", "/opt/bitnami/logstash/vendor/bundle/jruby/2.5.0/gems/clamp-0.6.5/lib/clamp/command.rb:132:in `run'", "/opt/bitnami/logstash/lib/bootstrap/environment.rb:88:in `<main>'"]}
[2020-09-22T10:49:45,674][ERROR][org.logstash.Logstash    ] java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit

What is wrong and where?

Hi @zen.xen3,

It seems there is something wrong in the configuration. As this is a specific question about it, I suggest you take a look at the official documentation to investigate what’s happening or ask in the official support forums to get help from the developers directly.

https://discuss.elastic.co/

Do not hesitate to write us back if you have any other questions.

Thanks

Hi @jota,
I found the same information in the net

I thought that you would know what it means. Anyway, I try at elastic.co

thanks

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