# Unable to properly use Logstash

**URL:** https://discuss.elastic.co/t/unable-to-properly-use-logstash/216726
**Category:** Logstash
**Created:** [January 27, 2020, 9:21pm UTC](https://discuss.elastic.co/t/unable-to-properly-use-logstash/216726 "2020-01-27T21:21:40Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![plisovyi](https://avatars.discourse-cdn.com/v4/letter/p/e480ec/32.png) [@plisovyi](https://discuss.elastic.co/u/plisovyi)
#### Post date: [January 27, 2020, 9:21pm UTC](https://discuss.elastic.co/t/unable-to-properly-use-logstash/216726/1 "2020-01-27T21:21:41Z")

</div>

Hi,

I am unable to launch Logstash. Elasticsearch and Kibana are both running  
When I execute the following command:

> bin\logstash.bat -f .\config\logstash-sample.conf

I get this:

```
> Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
> Unrecognized option: -
> Error: Could not create the Java Virtual Machine.
> Error: A fatal exception has occurred. Program will exit.

```

I have the following Java version when I run Java -version

```
> java version "11.0.6" 2020-01-14 LTS
> Java(TM) SE Runtime Environment 18.9 (build 11.0.6+8-LTS)
> Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.6+8-LTS, mixed mode)

```

I am using logstash-7.5.2 and run it on Windows 10.  
I am very new to elk and tried to search all the forums but have not been able to locate an answer...  
Thank you in advance

---

<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 27, 2020, 11:52pm UTC](https://discuss.elastic.co/t/unable-to-properly-use-logstash/216726/2 "2020-01-27T23:52:54Z")

</div>

It is possible that the - in -f is an en-dash (or another variant of dash). It has to be a hyphen. Try typing the entire command in, do not copy and paste it from a web site.

---

<div class="post-metadata">

### Author: ![plisovyi](https://avatars.discourse-cdn.com/v4/letter/p/e480ec/32.png) [@plisovyi](https://discuss.elastic.co/u/plisovyi)
#### Post date: [January 28, 2020, 6:53pm UTC](https://discuss.elastic.co/t/unable-to-properly-use-logstash/216726/3 "2020-01-28T18:53:47Z")

</div>

HI @Badger

Thank you for the feedback. I have tried to type it out and it still produces the same result.  
I have tried to create my own config file, still the same result.  
And I have also tried another Windows computer, to no alas.

> bin\logstash.bat -f .\config\logstash-sample.conf

Even when I just type

> bin\logstash.bat .\config\logstash-sample.conf

It still produces the same result. I am really not sure what could be the source of this problem... Any other ideas?

---

<div class="post-metadata">

### Author: ![benoitdupont](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/benoitdupont/32/61267_2.png) [@benoitdupont](https://discuss.elastic.co/u/benoitdupont)
#### Post date: [January 28, 2020, 7:11pm UTC](https://discuss.elastic.co/t/unable-to-properly-use-logstash/216726/4 "2020-01-28T19:11:39Z")

</div>

Can you try the following command to see if it comes from the .bat or from your configuration ?

`bin\logstash.bat -e 'input { stdin { } } output { stdout {} }'`

---

<div class="post-metadata">

### Author: ![plisovyi](https://avatars.discourse-cdn.com/v4/letter/p/e480ec/32.png) [@plisovyi](https://discuss.elastic.co/u/plisovyi)
#### Post date: [January 28, 2020, 9:02pm UTC](https://discuss.elastic.co/t/unable-to-properly-use-logstash/216726/5 "2020-01-28T21:02:37Z")

</div>

> [@benoitdupont](#):
>
> bin\logstash.bat -e 'input { stdin { } } output { stdout {} }'

Hi @benoitdupont

I ran it and it produced the same output:

> Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.  
> Unrecognized option: -  
> Error: Could not create the Java Virtual Machine.  
> Error: A fatal exception has occurred. Program will exit.

---

<div class="post-metadata">

### Author: ![benoitdupont](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/benoitdupont/32/61267_2.png) [@benoitdupont](https://discuss.elastic.co/u/benoitdupont)
#### Post date: [January 28, 2020, 9:20pm UTC](https://discuss.elastic.co/t/unable-to-properly-use-logstash/216726/6 "2020-01-28T21:20:41Z")

</div>

Hm OK, have you tried to download and extract again logstash? If it still fails, it narrows the search by excluding the bat

---

<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: [January 28, 2020, 9:23pm UTC](https://discuss.elastic.co/t/unable-to-properly-use-logstash/216726/7 "2020-01-28T21:23:22Z")

</div>

It is also possible that the flag is originating from the `jvm.options` file in the config 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: [February 25, 2020, 9:23pm UTC](https://discuss.elastic.co/t/unable-to-properly-use-logstash/216726/8 "2020-02-25T21:23:32Z")

</div>

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