[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


(bus) #1

Hello;

I try to run two pipelines together but When I launch my pipelines with the command :

bin/logstash --path.settings /etc/logstash

I've got this error :

[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.

Do you know why i've got this issue ?

My /etc/logstash/pipelines.yml file :

- pipeline.id: pre_traitement
  path.config: "/etc/logstash/conf.d/pre_traitrement_vega.conf"

- pipeline.id: post_traitement_ironport
  path.config: "/etc/logstash/conf.d/fusion_vega_ironport.conf"

My /etc/logstash/conf.d/pre_traitrement_vega.conf file :

input
{
  file
  {
    path => "/data/IFR/ELK/work/FLD_PROD_UEM/*.log"
    type => "GDAlogATrier"
    codec => multiline {
      pattern => "anepastrouver"
      negate => true
      what => "previous"
      auto_flush_interval => 1
      max_lines => 50000
      charset => "Windows-1252"
    }
    exclude => [ "efluid_*.log", "exploit*.log" ]
    #ignore_older => 120
    close_older => 60
  }
}

filter
{
 if [message] =~ "CODE RETOUR : 0"
 {
   drop { }
 }
 if [message] =~ "CODE RETOUR : -4"
 {
   if [message] !~ "MNOR" and [message] !~ "TECH" and [message] !~ "FTAL"
   {
     drop { }
   }
 }
 fingerprint
 {
    source => ["message"]
    target => "fingerprint_id"
    method => "MURMUR3"
 }
}

output
{
  file
  {
    codec => line
    {
      format => "%{[message]}"
    }
    path => "/data/IFR/ELK/work/FLD_PROD_UEM_TRIE/trie-%{[fingerprint_id]}.log"
  }
  stdout { codec => rubydebug }
}

My etc/logstash/conf.d/fusion_vega_ironport.conf file :

input
{
  beats
  {
    port => 5044
  }
}

filter
{
  #huge filter
}

output
{
  if [filetype] == "ironport"
  {
    elasticsearch
    {
      user => logstash
      password => logstash
      ssl => true
      #cacert => '/data/IFR/certificats/pelkifr1.cer'
      cacert => '/etc/elasticsearch/root-ca.pem'
      #hosts => "https://localhost:9200"
      index => "ironport"
    }
    stdout { codec => rubydebug }
  }
  else if [filetype] == "VegaProdUEM"
  {
    elasticsearch
    {
      user => logstash
      password => logstash
      ssl => true
      #cacert => '/data/IFR/certificats/pelkifr1.cer'
      cacert => '/etc/elasticsearch/root-ca.pem'
      #hosts => "https://localhost:9200"
      index => "vegaproduem"
    }
    stdout { codec => rubydebug }
  }
}

But when I restart my logstash service and I launch quickly my pipeline, it works...

Thx for help


#2

Are you saying you are running it as a service and also running it using the command line?


(system) #3

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