# Unable to start logstash service Windows server 2012 64 bit

**URL:** <https://discuss.elastic.co/t/unable-to-start-logstash-service-windows-server-2012-64-bit/151967>\
**Category:** Logstash\
**Created:** [October 11, 2018, 5:02am UTC](https://discuss.elastic.co/t/unable-to-start-logstash-service-windows-server-2012-64-bit/151967 "2018-10-11T05:02:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![hardikbhatia](https://avatars.discourse-cdn.com/v4/letter/h/3be4f8/32.png) [@hardikbhatia](https://discuss.elastic.co/u/hardikbhatia)\
**Post date:** [October 11, 2018, 5:02am UTC](https://discuss.elastic.co/t/unable-to-start-logstash-service-windows-server-2012-64-bit/151967/1 "2018-10-11T05:02:45Z")

</div>

Hi,

I have downloaded and unzipped logstash and tried to install it as service using nssm. Logstash gets successfully installed but when i try to start the service it immediately goes to paused state:

![image](https://us1.discourse-cdn.com/elastic/original/3X/e/c/eca9ede8306572543d6f75babdd2aec7ebcdd697.png)

I have installed java and JAVA\_HOME variable pointing to path where JDK is:

![image](https://us1.discourse-cdn.com/elastic/original/3X/b/c/bc289450896634ba51502615ee4c755e54df4864.png)

Following paths are used in nssm:  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/0/d0cee3d29fff9c7c2ee95c84084c7d77b048782c.png)

code in logstash.json is as follows:

```
> input {
> beats {
> port => 5044
> type => "log"
> }
> }
> 
> output {
> elasticsearch {
> hosts => "localhost:9200"
> manage_template => false
> index => "%{[@metadata][beat]}-%{+YYYY.MM.dd}"
> document_type => "%{[@metadata][type]}"
> }
> }

```

When i try to start Logstash directly using command prompt I get:  
**"Error: Could not find or load main class Files"**

![image](https://us1.discourse-cdn.com/elastic/original/3X/d/0/d0a69efc67067b0fb9856993567c259729526c59.png)

Logstash version: 6.4.2 Downloaded from ([https://www.elastic.co/downloads/logstash](https://www.elastic.co/downloads/logstash))

I already have ElasticSearch and Kibana installed and running perfectly fine when I am adding logs using filebeat directly.

Any help will be highly appreciated.

---

<div class="post-metadata">

**Author:** ![hardikbhatia](https://avatars.discourse-cdn.com/v4/letter/h/3be4f8/32.png) [@hardikbhatia](https://discuss.elastic.co/u/hardikbhatia)\
**Post date:** [October 11, 2018, 12:11pm UTC](https://discuss.elastic.co/t/unable-to-start-logstash-service-windows-server-2012-64-bit/151967/2 "2018-10-11T12:11:23Z")

</div>

Spaces in the path causes this. Unzip logstash to a folder which does not have spaces. For me it was located at C:\Program Files (x86)\ELK\Logstash

I had to move it to C:\Logstash and it worked. Wasted such a long time figuring this out 😖

---

<div class="post-metadata">

**Author:** ![gopisa](https://avatars.discourse-cdn.com/v4/letter/g/7993a0/32.png) [@gopisa](https://discuss.elastic.co/u/gopisa)\
**Post date:** [October 12, 2018, 1:57pm UTC](https://discuss.elastic.co/t/unable-to-start-logstash-service-windows-server-2012-64-bit/151967/3 "2018-10-12T13:57:06Z")

</div>

> [@hardikbhatia](#):
>
> Wasted such a long time figuring this out 😖

Hello Hardikbhatia,

i am facing same issue . while starting the logstash getting same error msg.  
i have moved logstash to out of the program files but no luck, i am also wasting lot of time hear.

Thanks in advance

Regards  
gopi

---

<div class="post-metadata">

**Author:** ![hardikbhatia](https://avatars.discourse-cdn.com/v4/letter/h/3be4f8/32.png) [@hardikbhatia](https://discuss.elastic.co/u/hardikbhatia)\
**Post date:** [October 15, 2018, 9:14am UTC](https://discuss.elastic.co/t/unable-to-start-logstash-service-windows-server-2012-64-bit/151967/4 "2018-10-15T09:14:29Z")

</div>

> [@hardikbhatia](#):
>
> When i try to start Logstash directly using command prompt I get:

Have you tried starting directly using command prompt. See if error is any different.

---

<div class="post-metadata">

**Author:** ![gopisa](https://avatars.discourse-cdn.com/v4/letter/g/7993a0/32.png) [@gopisa](https://discuss.elastic.co/u/gopisa)\
**Post date:** [October 15, 2018, 9:27am UTC](https://discuss.elastic.co/t/unable-to-start-logstash-service-windows-server-2012-64-bit/151967/5 "2018-10-15T09:27:45Z")

</div>

Thank you for quick response..

I tried to start with the command prompt same error I am getting .

Thanks

Gopisa

---

<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:** [November 12, 2018, 9:27am UTC](https://discuss.elastic.co/t/unable-to-start-logstash-service-windows-server-2012-64-bit/151967/6 "2018-11-12T09:27:45Z")

</div>

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