# Error when running logstash.bat -f ..\\logstash.conf

**URL:** https://discuss.elastic.co/t/error-when-running-logstash-bat-f-logstash-conf/131533
**Category:** Logstash
**Created:** [May 11, 2018, 8:13pm UTC](https://discuss.elastic.co/t/error-when-running-logstash-bat-f-logstash-conf/131533 "2018-05-11T20:13:12Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![phil.zac](https://avatars.discourse-cdn.com/v4/letter/p/e8c25b/32.png) [@phil.zac](https://discuss.elastic.co/u/phil.zac)
#### Post date: [May 11, 2018, 8:13pm UTC](https://discuss.elastic.co/t/error-when-running-logstash-bat-f-logstash-conf/131533/1 "2018-05-11T20:13:12Z")

</div>

Hi,

This might be a simple error but I cant find the solution for it.

When I run - logstash.bat -f ..\logstash.conf in command prompt, I get the following.

```
'-Xms1g' is not recognized as an internal or external command,
operable program or batch file.

```

Not sure where I can fix this.

I have installed jdk1.8.0\_141.

I am using 6.2.2 for ELK.

Any advice.

Thanks.

Phil

---

<div class="post-metadata">

### Author: ![yaauie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yaauie/32/23363_2.png) [@yaauie](https://discuss.elastic.co/u/yaauie)
#### Post date: [May 11, 2018, 9:50pm UTC](https://discuss.elastic.co/t/error-when-running-logstash-bat-f-logstash-conf/131533/2 "2018-05-11T21:50:43Z")

</div>

That looks like a memory usage directive for Java, which Logstash builds from your environment variables.

at the command line, if you type `SET` and hit enter, it should output your environment variables; woulds you mind sharing the values you have for the following (if set)?

- `LS_JVM_OPTIONS_CONFIG`
- `LS_JAVA_OPTS`

---

<div class="post-metadata">

### Author: ![phil.zac](https://avatars.discourse-cdn.com/v4/letter/p/e8c25b/32.png) [@phil.zac](https://discuss.elastic.co/u/phil.zac)
#### Post date: [May 14, 2018, 2:14pm UTC](https://discuss.elastic.co/t/error-when-running-logstash-bat-f-logstash-conf/131533/3 "2018-05-14T14:14:09Z")

</div>

Thank you for the reply.

When I click on Set in the command line, there is no  
LS\_JVM\_OPTIONS\_CONFIG  
LS\_JAVA\_OPTS

Should I set it to values?

Thanks.

Phil

---

<div class="post-metadata">

### Author: ![phil.zac](https://avatars.discourse-cdn.com/v4/letter/p/e8c25b/32.png) [@phil.zac](https://discuss.elastic.co/u/phil.zac)
#### Post date: [May 22, 2018, 2:43pm UTC](https://discuss.elastic.co/t/error-when-running-logstash-bat-f-logstash-conf/131533/4 "2018-05-22T14:43:20Z")

</div>

Finally found an error in the modified setup.bat. Fixed it and works well now.  
Issue is that LS\_JAVA is not set properly.

Once again thanks for helping me out.

Phil

---

<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: [June 19, 2018, 2:52pm UTC](https://discuss.elastic.co/t/error-when-running-logstash-bat-f-logstash-conf/131533/5 "2018-06-19T14:52:32Z")

</div>

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