Hi everyone,
I don't know why cannot run logstash as a service. If i run logstash in command line works well but when i run as a service appears the next error in status service:
Apr 09 14:03:02 kafka02 logstash[60398]: 2012 down?: false
Apr 09 14:03:02 kafka02 logstash[60398]: 2012 threads: 2
Apr 09 14:03:02 kafka02 logstash[60398]: 2012 thread: #Thread:0x209fe7
Apr 09 14:03:02 kafka02 logstash[60398]: 2012 thread_key: rufus_scheduler_2010
Apr 09 14:03:02 kafka02 logstash[60398]: 2012 work_threads: 1
Apr 09 14:03:02 kafka02 logstash[60398]: 2012 active: 1
Apr 09 14:03:02 kafka02 logstash[60398]: 2012 vacant: 0
Apr 09 14:03:02 kafka02 logstash[60398]: 2012 max_work_threads: 1
Apr 09 14:03:02 kafka02 logstash[60398]: 2012 mutexes: {}
Apr 09 14:03:02 kafka02 logstash[60398]: 2012 jobs: 1
Meanwhile in logs file:
[2020-04-09T14:02:25,448][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2020-04-09T14:02:25,540][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"7.1.1"}
[2020-04-09T14:02:45,474][INFO ][logstash.outputs.elasticsearch] Elasticsearch pool URLs updated {:changes=>{:removed=>, :added=>[http://ip:9200/]}}
[2020-04-09T14:02:46,294][WARN ][logstash.outputs.elasticsearch] Restored connection to ES instance {:url=>"http://ip:9200/"}
[2020-04-09T14:02:46,532][INFO ][logstash.outputs.elasticsearch] ES Output version determined {:es_version=>7}
[2020-04-09T14:02:46,547][WARN ][logstash.outputs.elasticsearch] Detected a 6.x and above cluster: the type
event field won't be used to determine the document _type {:es_version=>7}
[2020-04-09T14:02:46,711][INFO ][logstash.outputs.elasticsearch] New Elasticsearch output {:class=>"LogStash::Outputs::ElasticSearch", :hosts=>["http://ip:9200"]}
[2020-04-09T14:02:46,763][INFO ][logstash.outputs.elasticsearch] Using default mapping template
[2020-04-09T14:02:46,866][INFO ][logstash.javapipeline ] Starting pipeline {:pipeline_id=>"main", "pipeline.workers"=>2, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>50, "pipeline.max_inflight"=>250, :thread=>"#<Thread:0x54e5324e run>"}
[2020-04-09T14:02:47,635][INFO ][logstash.outputs.elasticsearch] Attempting to install template {:manage_template=>{"index_patterns"=>"logstash-", "version"=>60001, "settings"=>{"index.refresh_interval"=>"5s", "number_of_shards"=>1}, "mappings"=>{"dynamic_templates"=>[{"message_field"=>{"path_match"=>"message", "match_mapping_type"=>"string", "mapping"=>{"type"=>"text", "norms"=>false}}}, {"string_fields"=>{"match"=>"", "match_mapping_type"=>"string", "mapping"=>{"type"=>"text", "norms"=>false, "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}}}}], "properties"=>{"@timestamp"=>{"type"=>"date"}, "@version"=>{"type"=>"keyword"}, "geoip"=>{"dynamic"=>true, "properties"=>{"ip"=>{"type"=>"ip"}, "location"=>{"type"=>"geo_point"}, "latitude"=>{"type"=>"half_float"}, "longitude"=>{"type"=>"half_float"}}}}}}}
[2020-04-09T14:02:48,340][INFO ][logstash.javapipeline ] Pipeline started {"pipeline.id"=>"main"}
[2020-04-09T14:02:49,483][INFO ][logstash.agent ] Pipelines running {:count=>1, :running_pipelines=>[:main], :non_running_pipelines=>}
[2020-04-09T14:02:52,620][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
I don't understand the error. Could someone help me?
Thanks