# Problem with executing path to Logstash.bat

**URL:** https://discuss.elastic.co/t/problem-with-executing-path-to-logstash-bat/259731
**Category:** Logstash
**Created:** [December 28, 2020, 12:25pm UTC](https://discuss.elastic.co/t/problem-with-executing-path-to-logstash-bat/259731 "2020-12-28T12:25:15Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![keyofstarrysky973](https://avatars.discourse-cdn.com/v4/letter/k/e5b9ba/32.png) [@keyofstarrysky973](https://discuss.elastic.co/u/keyofstarrysky973)
#### Post date: [December 28, 2020, 12:25pm UTC](https://discuss.elastic.co/t/problem-with-executing-path-to-logstash-bat/259731/1 "2020-12-28T12:25:15Z")

</div>

Hello Everyone, Pls I need some help on this problem I'm having executing Logstash on Windows 10.  
I have an ELK Stack with both Elasticsearch and Kibana working without any problems. I have a directory, named elk\_stack containing 3 sub-folders for the 3 apps (Elasticsearch, Kibana, Logstash).

Whenever I try executing logstash.bat from the main directory (elk\_stack), I receive the following error (Logstash Shut Down) :

```auto
\path\to\elk_stack>.\logstash-7.10.0\bin\logstash.bat

.....
[2020-12-28T08:09:47,203][INFO][logstash.agent] Successfully started Logstash API endpoint {:port=>9600}
[2020-12-28T08:09:48,223][INFO][logstash.javapipeline][.monitoring-logstash] Pipeline terminated {"pipeline.id"=>".monitoring-logstash"}
[2020-12-28T08:09:49,095][INFO][logstash.runner] Logstash shut down.

```

However, when executing logstash.bat from the Logstash sub-folder, I do not encounter the "Logstash shut down error" :

```auto
\path\to\elk_stack\logstash-7.10.0>.\bin\logstash.bat

.....
[2020-12-28T08:09:47,203][INFO][logstash.agent] Successfully started Logstash API endpoint {:port=>9600}

```

With this last path, Logstash actually functions properly (it waits and listens for inputs).

The reason why I need logstash.bat to execute with the former path is because I have to create a script, which would be found in the main (elk\_stack) directory, that would execute all 3 apps of the Elastic Stack.

I don't understand why it would work from the sub\_folder, but not from the main folder, considering that the other two batch files (elasticsearch.bat, kibana.bat) are being executed well from the elk\_stack directory. Thanks in advance.

---

<div class="post-metadata">

### Author: ![aaron-nimocks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron-nimocks/32/73965_2.png) [@aaron-nimocks](https://discuss.elastic.co/u/aaron-nimocks)
#### Post date: [December 29, 2020, 2:44pm UTC](https://discuss.elastic.co/t/problem-with-executing-path-to-logstash-bat/259731/2 "2020-12-29T14:44:39Z")

</div>

I don't understand why it wouldn't work from one folder up either. I know on MacOS it does but never tested on Widows.

Curious if you tried using absolute path vs relative path? That way it shouldn't be an issue.

---

<div class="post-metadata">

### Author: ![keyofstarrysky973](https://avatars.discourse-cdn.com/v4/letter/k/e5b9ba/32.png) [@keyofstarrysky973](https://discuss.elastic.co/u/keyofstarrysky973)
#### Post date: [January 3, 2021, 7:19pm UTC](https://discuss.elastic.co/t/problem-with-executing-path-to-logstash-bat/259731/3 "2021-01-03T19:19:33Z")

</div>

Thanks, with absolute path on Windows it's now working. Still weird though why it's only an issue with logstash.

---

<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: [January 31, 2021, 7:19pm UTC](https://discuss.elastic.co/t/problem-with-executing-path-to-logstash-bat/259731/4 "2021-01-31T19:19:34Z")

</div>

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