# I can run multiple config file

**URL:** <https://discuss.elastic.co/t/i-can-run-multiple-config-file/175158>\
**Category:** Logstash\
**Created:** [April 3, 2019, 10:07am UTC](https://discuss.elastic.co/t/i-can-run-multiple-config-file/175158 "2019-04-03T10:07:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![keep](https://avatars.discourse-cdn.com/v4/letter/k/d6d6ee/32.png) [@keep](https://discuss.elastic.co/u/keep)\
**Post date:** [April 3, 2019, 10:07am UTC](https://discuss.elastic.co/t/i-can-run-multiple-config-file/175158/1 "2019-04-03T10:07:59Z")

</div>

logstash -f .\config1\sample\_1.conf  
and  
logstash -f .\config1\sample\_2.conf

without a problem :  
[2019-04-03T16:51:38,043][WARN][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified  
[2019-04-03T16:51:38,361][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.  
[2019-04-03T16:51:38,410][ERROR][org.logstash.Logstash] java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit

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

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [April 3, 2019, 12:58pm UTC](https://discuss.elastic.co/t/i-can-run-multiple-config-file/175158/2 "2019-04-03T12:58:51Z")

</div>

You have to use a different path.data directory for the second instance. I just create a new directory every time I run logstash

```
#!/bin/sh

TMPDIR=/tmp/logstash-data/$$
trap '/bin/rm -rf $TMPDIR' 0 1 2 3 6
/usr/share/logstash/bin/logstash --path.data $TMPDIR [...]
```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 1, 2019, 12:58pm UTC](https://discuss.elastic.co/t/i-can-run-multiple-config-file/175158/3 "2019-05-01T12:58:56Z")

</div>

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