Unable to start logstash service Windows server 2012 64 bit


(Hardik Bhatia) #1

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

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

image

Following paths are used in nssm:
image

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

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.


(Hardik Bhatia) #2

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:


(gopisa) #3

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


(Hardik Bhatia) #4

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


(gopisa) #5

Thank you for quick response..

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

Thanks

Gopisa


(system) #6

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