:error => can't convert nil into String


(Ashvita) #1

Hi,

I am getting this error when I am running 2nd config file in same folder of logstash
An unexpected error occurred! :error => can't convert nil into String, :backtrace => ["org/jruby/RubyFileTest.java:95:in directory?'", "org/jruby/RubyFileTest.java:87:indirectory?'", "/home/elk/logstash-5.5.1/logstash-core/lib/logstash/settings.rb:460:in value'", "org/jruby/RubyKernel.java:1858:intap'", "/home/elk/logstash-5.5.1/logstash-core/lib/logstash/settings.rb:459:in value'", "/home/elk/logstash-5.5.1/logstash-core/lib/logstash/settings.rb:59:inget_value'", "/home/elk/logstash-5.5.1/logstash-core/lib/logstash/environment.rb:75:in LogStash'", "org/jruby/RubyProc.java:281:incall'", "/home/elk/logstash-5.5.1/logstash-core/lib/logstash/settings.rb:123:in post_process'", "org/jruby/RubyArray.java:1613:ineach'", "/home/elk/logstash-5.5.1/logstash-core/lib/logstash/settings.rb:122:in post_process'", "/home/elk/logstash-5.5.1/logstash-core/lib/logstash/runner.rb:216:inexecute'", "/home/elk/logstash-5.5.1/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67:in run'", "/home/elk/logstash-5.5.1/logstash-core/lib/logstash/runner.rb:209:inrun'", "/home/elk/logstash-5.5.1/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:132:in run'", "/home/elk/logstash-5.5.1/lib/bootstrap/environment.rb:71:in(root)'"]

Below is my config file-
input{
kafka{
bootstrap_servers => "10.100.208.97:9092"
topics => ['AnomalyStreamer']
}
}

output{
elasticsearch{
hosts => ['localhost:9200']
index => "anamoly"
user => logstash_internal
password => changeme
}

    stdout{ codec => rubydebug}

}
This is the command using which I run the 2nd config file-
bin/logstash -f anamoly.conf --path.data


(Magnus Bäck) #2

Does your command really end with --path.data? No directory path at the very end?


(Ashvita) #3

It has a directory which I am sorry I didn't mention here.
bin/logstash -f cpu.conf --path.data /home/elk/logstash-5.5.1
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
Sending Logstash's logs to /home/elk/logstash-5.5.1/logs which is now configured via log4j2.properties
[2017-08-10T10:44:14,216][FATAL][logstash.runner ] Logstash could not be started because there is already another instance using the configured data directory. If you wish to run multiple instances, you must change the "path.data" setting.

Now I am getting this error.


(Ashvita) #4

Oh I got my error! Thank ypu!


(system) #5

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