Keep getting failed to load template error

I am trying to send information from a logfile to elasticsearch using logstash. I cant seem to find the solution to this error. Any help would be greatly appreciated.

The following is my config file:

input {
file {
path => "/omt/opp/logstash-5.6.1/processingP123.log"
type => "OldLog"
start_position => "beginning"

output {
if [type] == "OldLog" {
elasticsearch {
index => "testing"
hosts => ""

the config file works when I try to run it locally on my windows computer and the output is localhost:9200 but not when I try to do it on our linux environment. The pipeline also succeeds in starting but no information is sent.

The error I receive is:

:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAuthCache).
log4j:WARN Please initialize the log4j system properly.
[2017-10-25T15:25:09,207][WARN ][logstash.outputs.elasticsearch] Restored connection to ES instance {:url=>""}
[2017-10-25T15:25:09,211][INFO ][logstash.outputs.elasticsearch] Using mapping template from {:path=>nil}
[2017-10-25T15:25:09,273][ERROR][logstash.outputs.elasticsearch] Failed to install template. {:message=>"undefined method `[]' for nil:NilClass", :class=>"NoMethodError",

Someone please help!

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