Unable to start logstash service Windows server 2012 64 bit


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:


I have installed java and JAVA_HOME variable pointing to path where JDK is:


Following paths are used in nssm:

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"


Logstash version: 6.4.2 Downloaded from (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.

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 :confounded:

1 Like

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


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

Thank you for quick response..

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



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