We are getting logstash 5.4 error

[2017-06-06T06:43:36,425][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.

above error i will found in 5.4 only

So... are you running multiple Logstash instances?

Yes magnusbaeck

Then pick a unique data directory for each instance. This can e.g. be set with the --path.data command line option.

But earlier version we are not finding this error.

we are changing every time in logstash.yml file in path setting after instance is working.

But earlier version we are not finding this error.

Well, it seems like that restriction was added in 5.4 then.

we are changing every time in logstash.yml file in path setting after instance is working.

That's clearly not very sustainable (or convenient).

"bin/logstash --path.settings /etc/logstash -f logstash-simple.conf"

logstash-simple.conf: Simple file in which I am taking input from keyboard and displaying it.

It was running fine earlier but sometimes it is giving following error:

"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"

This is just a single instance then why this error is coming ?

No other Logstash instances are running on the machine when you issue the command above?

No other instances are running

Do you have a .lock file in the directory pointed to by the path.data setting? Perhaps Logstash crashed for you so that the lockfile wasn't deleted.

Yeah *".lock file" *is present there along withe "queue" directory and
"uuid" is there. What is the solution for this ?

If you have a .lock file but you've verified that no Logstash process is running you can delete the file. That should fix your problem.

Yeah I am doing that .... But it is being create again then .... May be
some other problem is there ... I will ask you if I am not being able to
rectify it .... Thanx

input {

file {

path => "/tmp/access_log"

start_position => "beginning"

}

}

filter {

if [path] =~ "access" {

mutate { replace => { "type" => "apache_access" } }

grok {

  match => { "message" => "%{COMBINEDAPACHELOG}" }

}

}

date {

match => [ "timestamp" , "dd/MMM/yyyy:HH:mm:ss Z" ]

}

}

output {

elasticsearch { hosts => ["localhost:9200"]

user => elastic

password => changeme

index => "apache-access.log"

}

stdout { codec => rubydebug }

}

This is a demo script. This is working fine on visualising it in kibana
following error is coming ... Any thoughts ?

  • Index: apache-access.log Shard: 0 Reason:
    {"type":"illegal_argument_exception","reason":"Fielddata
    is disabled on text fields by default. Set fielddata=true on [timestamp] in
    order to load fielddata in memory by uninverting the inverted index. Note
    that this can however use significant memory. Alternatively use a keyword
    field instead."}

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