Multiple instances on one config file

I was using logstash-5.2.2 but did an upgrade today to logstash-5.4.0 .
In 5.2.2 I could just do

bin/logstash -f oracle.conf
and
bin/logstash -f linux.conf

without a problem. But now on 5.4.0 when I try the second command I get
[2017-05-10T14:47:51,092][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.

So how can I run those 2 config files without maken a whole new directory.

Greatings Bert

The --path.data option can be used to set the data directory uniquely for each instance.

https://www.elastic.co/guide/en/logstash/5.4/running-logstash-command-line.html

1 Like

Is this new in 5.4? didn't have to do this in 5.2
And thnaks

I don't know. Check the release notes.

Looks like this is new issue in 5.4. I am also facing same problem

Same here :frowning:

As far as i can see nothing is mentioned about this in the release notes:

https://www.elastic.co/guide/en/logstash/current/logstash-5-4-0.html
https://www.elastic.co/guide/en/logstash/current/logstash-5-4-1.html

But i assume this has something to to with the new persistent queue feature which may require uniqe path.data. I downgraded now to 5.3.

I downgraded now to 5.3.

I don't understand. Why not just use different data directories for your different instances?

In my case i have modified the logstash initscript to start each config file in /etc/logstash/conf.d in a different instance using the same logstash service configfile (/etc/logstash/logstash.yml).
path.data is specified in logstash.yml, so to get this working again, i would have to modify the initskript to create a logstash.yml for each logstash config on the fly using differnt path.data setting for each instance,...

I don't think you need a unique logstash.yml for each instance. Passing a unique value for the --path.data command line option should be enough.

2 Likes

I will give that a try, thanks!

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