Error message produced when executing the bat files:
The system cannot find the path specified.
"could not find jruby in C:\Program Files\Elastic\Logstash\6.1.1\vendor\jruby"
Within the setup.bat file the %JRUBY_BIN% validation step is leveraging double quotes around the %JRUBY_BIN% variable. This apparently works fine with the 'exist' statement but when you negate with 'not' things don't seem to work . I assume this was just a simple miss as the %JAVA% validation step is not leveraging double quotes.
Does not work:
set JRUBY_BIN="%LS_HOME%\vendor\jruby\bin\jruby"
if not exist "%JRUBY_BIN%" (
echo "could not find jruby in %LS_HOME%\vendor\jruby" 1>&2
exit /b 1
)
Works just fine:
set JRUBY_BIN="%LS_HOME%\vendor\jruby\bin\jruby"
if not exist %JRUBY_BIN% (
echo "could not find jruby in %LS_HOME%\vendor\jruby" 1>&2
exit /b 1
)
Ok, the previus error is fixed with @cjlyons81 solution,
but seem there is analog error now I have the error below; seem there is a problem with a path with space...
FINDSTR: Impossibile aprire C:\Program
FINDSTR: Impossibile aprire Files\Elastic\Logstash\config\jvm.options
So I change this line in logstash.bat
for /F "usebackq delims=" %%a in (
findstr /b \- "%LS_JVM_OPTIONS_CONFIG%") do set options=!options! %%a
with
for /F "usebackq delims=" %%a in (
findstr /b \- "%LS_JVM_OPTIONS_CONFIG%") do set options=!options! %%a
But I have another error:
"warning: no jvm.options file found"
Bundler::GemfileNotFound: C:/Program Files/Elastic/Logstash/Gemfile not found
build at C:/Program Files/Elastic/Logstash/vendor/bundle/jruby/2.3.0/gems/bundler-1.9.10/lib/bundler/definition.rb:22
definition at C:/Program Files/Elastic/Logstash/vendor/bundle/jruby/2.3.0/gems/bundler-1.9.10/lib/bundler.rb:155
setup at C:/Program Files/Elastic/Logstash/vendor/bundle/jruby/2.3.0/gems/bundler-1.9.10/lib/bundler.rb:118
setup! at C:/Program Files/Elastic/Logstash/lib/bootstrap/bundler.rb:57
<main> at C:\Program Files\Elastic\Logstash\lib\bootstrap\environment.rb:63
It cannot handle a space in the path. Just move your logstash to c:\logstash and it is fine
@andrewvc can you take/delegate this? I'm hoping it's a small fix (allowing spaces in the parent path of Logstash on Windows)
@colinsurprenant can you take a look at this issue?
I have fixed locally the startup scripts but I am hitting some more problems in the code itself - working on it.
Ok, PR in #8931
This is merged and will be fixed in 6.1.3 and up.
Most helpful comment
This is merged and will be fixed in 6.1.3 and up.