# Logstash error using logstash -f

**URL:** <https://discuss.elastic.co/t/logstash-error-using-logstash-f/187801>\
**Category:** Logstash\
**Created:** [June 27, 2019, 10:01am UTC](https://discuss.elastic.co/t/logstash-error-using-logstash-f/187801 "2019-06-27T10:01:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![kumar4](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kumar4/32/48326_2.png) [@kumar4](https://discuss.elastic.co/u/kumar4)\
**Post date:** [June 27, 2019, 10:01am UTC](https://discuss.elastic.co/t/logstash-error-using-logstash-f/187801/1 "2019-06-27T10:01:08Z")

</div>

i am using this tutorial

> **[logstash-plugins/logstash-input-twitter](https://github.com/logstash-plugins/logstash-input-twitter)**
>
> Contribute to logstash-plugins/logstash-input-twitter development by creating an account on GitHub.

  
all things work fine , but when i created a new index and launch logstash by creating a conf file in /etc/logstash/conf.d the i restarted logstash, so i try to collect data unig "logstash -f" i have the following error:  
usr/share/logstash/bin/logstash -f twitter\_logstash.conf  
WARNING: Could not find logstash.yml which is typically located in $LS\_HOME/config or /etc/logstash. You can specify the path using --path.settings. Continuing using the defaults  
Could not find log4j2 configuration at path /usr/share/logstash/config/log4j2.properties. Using default config which logs errors to the console  
[WARN] 2019-06-27 11:51:47.697 [LogStash::Runner] multilocal - Ignoring the 'pipelines.yml' file because modules or command line options are specified  
[FATAL] 2019-06-27 11:51:47.722 [LogStash::Runner] 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.  
[ERROR] 2019-06-27 11:51:47.734 [LogStash::Runner] Logstash - java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit

---

<div class="post-metadata">

**Author:** ![vasek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vasek/32/136636_2.png) [@vasek](https://discuss.elastic.co/u/vasek)\
**Post date:** [June 27, 2019, 10:13am UTC](https://discuss.elastic.co/t/logstash-error-using-logstash-f/187801/2 "2019-06-27T10:13:21Z")

</div>

Problem is described in your log:

```
[FATAL] 2019-06-27 11:51:47.722 [LogStash::Runner] runner - Logstash could not be started because there is already another instance using the configured data directory. If you wish trun multiple instances, you must change the "path.data" setting.`

```

Logstash probably is already running on your server. Two instances of Logstash trying to access to path.data.

See: [https://www.elastic.co/guide/en/logstash/current/logstash-settings-file.html](https://www.elastic.co/guide/en/logstash/current/logstash-settings-file.html)

---

<div class="post-metadata">

**Author:** ![kumar4](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kumar4/32/48326_2.png) [@kumar4](https://discuss.elastic.co/u/kumar4)\
**Post date:** [June 27, 2019, 10:14am UTC](https://discuss.elastic.co/t/logstash-error-using-logstash-f/187801/3 "2019-06-27T10:14:33Z")

</div>

> [@vasek](#):
>
> alrea

so what shoud i do, yes i know that i have an other instance of losgtash started but what shoud i do to lanunch "logstash -f example.conf"

---

<div class="post-metadata">

**Author:** ![vasek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vasek/32/136636_2.png) [@vasek](https://discuss.elastic.co/u/vasek)\
**Post date:** [June 27, 2019, 10:15am UTC](https://discuss.elastic.co/t/logstash-error-using-logstash-f/187801/4 "2019-06-27T10:15:32Z")

</div>

See: [https://www.elastic.co/guide/en/logstash/current/running-logstash-command-line.html](https://www.elastic.co/guide/en/logstash/current/running-logstash-command-line.html)  
**--path.data** parameter

---

<div class="post-metadata">

**Author:** ![kumar4](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kumar4/32/48326_2.png) [@kumar4](https://discuss.elastic.co/u/kumar4)\
**Post date:** [June 27, 2019, 10:25am UTC](https://discuss.elastic.co/t/logstash-error-using-logstash-f/187801/5 "2019-06-27T10:25:45Z")

</div>

> [@vasek](#):
>
> path.data

I'm sorry for the inconvenience, my commande will be "logstash -f example.conf --path.data "  
can i choose any directory for the path data

---

<div class="post-metadata">

**Author:** ![vasek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vasek/32/136636_2.png) [@vasek](https://discuss.elastic.co/u/vasek)\
**Post date:** [June 27, 2019, 10:50am UTC](https://discuss.elastic.co/t/logstash-error-using-logstash-f/187801/6 "2019-06-27T10:50:24Z")

</div>

No problem. Yes of course. E.g.:

```
--path.data /my/rw/directory/for/logstash/

```

Logstash has to have r/w access to this directory.

---

<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:** [July 25, 2019, 10:50am UTC](https://discuss.elastic.co/t/logstash-error-using-logstash-f/187801/7 "2019-07-25T10:50:24Z")

</div>

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