# Stop logsstash

**URL:** <https://discuss.elastic.co/t/stop-logsstash/165279>\
**Category:** Logstash\
**Created:** [January 22, 2019, 5:50pm UTC](https://discuss.elastic.co/t/stop-logsstash/165279 "2019-01-22T17:50:11Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![gongon](https://avatars.discourse-cdn.com/v4/letter/g/ecccb3/32.png) [@gongon](https://discuss.elastic.co/u/gongon)\
**Post date:** [January 22, 2019, 5:50pm UTC](https://discuss.elastic.co/t/stop-logsstash/165279/1 "2019-01-22T17:50:11Z")

</div>

Hello, I can't stop Logstash so I can't test any config file on my mac.

Here the error : I3893-2:6.4.1 gongon$ logstash -f first-pipeline.conf  
Sending Logstash logs to /usr/local/Cellar/logstash/6.4.1/libexec/logs which is now configured via log4j2.properties  
[2019-01-22T18:43:32,589][WARN][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified  
[2019-01-22T18:43:32,647][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-01-22T18:43:32,668][ERROR][org.logstash.Logstash] java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit

This command doesn't work : '--pipeline.unsafe\_shutdown`  
Can i use it on my mac ???  
Could you help me ?

---

<div class="post-metadata">

**Author:** ![AquaX](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aquax/32/92006_2.png) [@AquaX](https://discuss.elastic.co/u/AquaX)\
**Post date:** [January 28, 2019, 2:46am UTC](https://discuss.elastic.co/t/stop-logsstash/165279/2 "2019-01-28T02:46:17Z")

</div>

You use the command line parameter like this:

./logstash -f first-pipeline.conf --path.data /path/to/writable/directory

---

<div class="post-metadata">

**Author:** ![gongon](https://avatars.discourse-cdn.com/v4/letter/g/ecccb3/32.png) [@gongon](https://discuss.elastic.co/u/gongon)\
**Post date:** [January 29, 2019, 3:03pm UTC](https://discuss.elastic.co/t/stop-logsstash/165279/3 "2019-01-29T15:03:45Z")

</div>

😀 thank you very much for your answer .Here the error:  
I3893-2:6.4.1 gongon$ logstash -f first-pipeline.conf --path.data /path/to/writable/directory  
[FATAL] 2019-01-29 16:00:12.641 [main] runner - An unexpected error occurred! {:error=\>#\<ArgumentError: Path "/path/to/writable/directory" does not exist, and I failed trying to create it: Errno::EACCES - Permission denied - /path\>, :backtrace=\>["/usr/local/Cellar/logstash/6.4.1/libexec/logstash-core/lib/logstash/settings.rb:475:in `block in value'", "org/jruby/RubyKernel.java:1741:in`tap'", "/usr/local/Cellar/logstash/6.4.1/libexec/logstash-core/lib/logstash/settings.rb:467:in `value'", "/usr/local/Cellar/logstash/6.4.1/libexec/logstash-core/lib/logstash/settings.rb:64:in`get\_value'", "/usr/local/Cellar/logstash/6.4.1/libexec/logstash-core/lib/logstash/environment.rb:92:in `block in LogStash'", "/usr/local/Cellar/logstash/6.4.1/libexec/logstash-core/lib/logstash/settings.rb:125:in`block in post\_process'", "org/jruby/RubyArray.java:1734:in `each'", "/usr/local/Cellar/logstash/6.4.1/libexec/logstash-core/lib/logstash/settings.rb:124:in`post\_process'", "/usr/local/Cellar/logstash/6.4.1/libexec/logstash-core/lib/logstash/util/settings\_helper.rb:26:in `post_process'", "/usr/local/Cellar/logstash/6.4.1/libexec/logstash-core/lib/logstash/runner.rb:241:in`execute'", "/usr/local/Cellar/logstash/6.4.1/libexec/vendor/bundle/jruby/2.3.0/gems/clamp-0.6.5/lib/clamp/command.rb:67:in `run'", "/usr/local/Cellar/logstash/6.4.1/libexec/logstash-core/lib/logstash/runner.rb:237:in`run'", "/usr/local/Cellar/logstash/6.4.1/libexec/vendor/bundle/jruby/2.3.0/gems/clamp-0.6.5/lib/clamp/command.rb:132:in `run'", "/usr/local/Cellar/logstash/6.4.1/libexec/lib/bootstrap/environment.rb:73:in`'"]}  
[ERROR] 2019-01-29 16:00:12.709 [main] Logstash - java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit  
I3893-2:6.4.1 gongon$

---

<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:** [January 29, 2019, 3:15pm UTC](https://discuss.elastic.co/t/stop-logsstash/165279/4 "2019-01-29T15:15:51Z")

</div>

> [@gongon](#):
>
> An unexpected error occurred! {:error=\>#\<ArgumentError: Path "/path/to/writable/directory" does not exist, and I failed trying to create it: Errno::EACCES - Permission denied - /path\>

Andreas did not mean for you to take that path literally. Create a new directory called something like "logstash-data" somewhere that you can write to, for example, under /tmp or in your home directory. So if your home directory is /home/gongon you would create /home/gongon/logstash-data. Then run logstash using

```
--path.data /home/gongon/logstash-data

```

or, perhaps better

```
--path.data /home/gongon/logstash-data/$$

```

---

<div class="post-metadata">

**Author:** ![gongon](https://avatars.discourse-cdn.com/v4/letter/g/ecccb3/32.png) [@gongon](https://discuss.elastic.co/u/gongon)\
**Post date:** [January 29, 2019, 3:30pm UTC](https://discuss.elastic.co/t/stop-logsstash/165279/5 "2019-01-29T15:30:55Z")

</div>

I am very sorry 🙂 of course.  
Thank very much it works  
But DO you Know how I can really stop the instance of logstash which are running, it was a test.

---

<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:** [January 29, 2019, 3:33pm UTC](https://discuss.elastic.co/t/stop-logsstash/165279/6 "2019-01-29T15:33:37Z")

</div>

If logstash is consuming a stdin input it will exit when it receives end-of-file. Otherwise it will run forever unless something external kills it.

---

<div class="post-metadata">

**Author:** ![gongon](https://avatars.discourse-cdn.com/v4/letter/g/ecccb3/32.png) [@gongon](https://discuss.elastic.co/u/gongon)\
**Post date:** [January 29, 2019, 3:40pm UTC](https://discuss.elastic.co/t/stop-logsstash/165279/7 "2019-01-29T15:40:37Z")

</div>

Is it a good idea to remove logstash and set up again ??

---

<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:** [January 29, 2019, 3:42pm UTC](https://discuss.elastic.co/t/stop-logsstash/165279/8 "2019-01-29T15:42:50Z")

</div>

What problem are you hoping that would fix?

---

<div class="post-metadata">

**Author:** ![gongon](https://avatars.discourse-cdn.com/v4/letter/g/ecccb3/32.png) [@gongon](https://discuss.elastic.co/u/gongon)\
**Post date:** [January 29, 2019, 3:50pm UTC](https://discuss.elastic.co/t/stop-logsstash/165279/9 "2019-01-29T15:50:18Z")

</div>

Stop the instance of logstash that is running and i can't use.Because of the input like this:input {  
file {  
path =\> "/tmp/access\_log"

}

---

<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:** [January 29, 2019, 4:09pm UTC](https://discuss.elastic.co/t/stop-logsstash/165279/10 "2019-01-29T16:09:15Z")

</div>

I do not have a Mac to test on, but something like 'ps aux | grep logstash' should show you which process is running logstash. Then doing 'kill' on the process id of that process should stop it.

---

<div class="post-metadata">

**Author:** ![gongon](https://avatars.discourse-cdn.com/v4/letter/g/ecccb3/32.png) [@gongon](https://discuss.elastic.co/u/gongon)\
**Post date:** [January 29, 2019, 4:18pm UTC](https://discuss.elastic.co/t/stop-logsstash/165279/11 "2019-01-29T16:18:53Z")

</div>

OK:pensive:  
I3893-2:6.4.1 gongon$ ps aux | grep logstash  
gongon 1516 0,0 0,0 2444056 800 s000 S+ 5:12 0:00.01 grep logstash

Which one is the ID ?

---

<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:** [January 29, 2019, 4:23pm UTC](https://discuss.elastic.co/t/stop-logsstash/165279/12 "2019-01-29T16:23:06Z")

</div>

That does not show an instance of logstash running. Do you still get 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.

---

<div class="post-metadata">

**Author:** ![gongon](https://avatars.discourse-cdn.com/v4/letter/g/ecccb3/32.png) [@gongon](https://discuss.elastic.co/u/gongon)\
**Post date:** [January 29, 2019, 4:31pm UTC](https://discuss.elastic.co/t/stop-logsstash/165279/13 "2019-01-29T16:31:24Z")

</div>

😄 I don't.Thank very much.  
Why it has stopped ?

---

<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:** [January 29, 2019, 4:51pm UTC](https://discuss.elastic.co/t/stop-logsstash/165279/14 "2019-01-29T16:51:47Z")

</div>

The logstash process that was running exited for some reason. I do not know why.

---

<div class="post-metadata">

**Author:** ![gongon](https://avatars.discourse-cdn.com/v4/letter/g/ecccb3/32.png) [@gongon](https://discuss.elastic.co/u/gongon)\
**Post date:** [January 29, 2019, 5:30pm UTC](https://discuss.elastic.co/t/stop-logsstash/165279/15 "2019-01-29T17:30:31Z")

</div>

😀 thank you very much for al l: your time your good answers ...

---

<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:** [February 26, 2019, 5:30pm UTC](https://discuss.elastic.co/t/stop-logsstash/165279/16 "2019-02-26T17:30:31Z")

</div>

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