I am trying to to run Logstash as a service in Windows. It works fine when given a path that has no space, but when I give a path that does have a space in it I am unable to run Logstash successfully.
In my batch file I've used "",'',""" """,\" \"
to handle spaces.
Here is the code:
set USER_INSTALL=D:\test logstash
echo Going to start logstash.
cd "%USER_INSTALL%\logstash-5.5.2\bin"
nssm install mySERVICE "%USER_INSTALL%\logstash-5.5.2\bin\logstash.bat" -f %CONFIG_FILE_NAME%
nssm set mySERVICE AppDirectory "%USER_INSTALL%\logstash-5.5.2\bin"
nssm mySERVICE Start
I've also tried to run Logstash directly from command line:
C:\Users\Admin\Desktop\dryrun9-7-2017\test agent\agent\bin> .\logstash.bat -f shipper.conf
This gives an error that the system cannot find the path specified.