-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows: logstash.bat doesn't work if the directory contains spaces #6426
Comments
are you trying to use logstash from a packaged release (.zip) or git repo for development? |
Packaged. |
@cawoodm you don't have to download jruby at all, logstash already comes packaged with it. you only need to have JAVA_HOME defined, and the run |
@cawoodm are you still seeing problems? if not feel free to close the issue |
I'll give it a whirl tomorrow again but as I originally posted - running logstash resulted in "Unable to find JRuby." before I had done anything (JAVA_HOME was set, without trailing slash to JDK 1.8). IMO the batch was looking for a unix-like executable "jruby" (without extension), |
I deleted and re-installed 5.1.1 and now it works. It could well be that I extracted logstash-5.1.1.zip using Windows' own unzip function (which has some issues) and ended up with an incomplete install. |
So, I ran into the same issue last night. And I tried this morning again, it worked. Hope it helps :) |
Ran into this just now, only with logstash-plugin and setup.bat first worked |
plz tell me the solution i m going through the same problem ... |
Hey @saigal06, could you share where are you placing your config file? I'd be able to help you as I was also facing the same issue and figured it out. |
Modify setup.bat if not exist "%JRUBY_BIN%" ( --> if not exist %JRUBY_BIN% ( |
i had same pb after installation. |
Yeah 5.6.3 zip installer has issues with dir structure for jruby which breaks the batch files. Rolling back to 5.6.2 worked for me. |
Just an update - this is still broken. Removing the quotes from the JRUBY_BIN check does get past that error. However it will still fail when attempting to use the working directory with the spaces. |
That did the trick for me @pirelaurent, thanks!!! I also had to set JRUBY_HOME before doing anything as well. |
Setting JRUBY_home is not supported and while it may work around it is not
intended for use. Please don’t recommend this fix. I am glad for those who
can use this work around, but this is a bug and not feature.
…On Mon, Oct 30, 2017 at 2:11 PM Rufus Knight ***@***.***> wrote:
That did the trick for me @pirelaurent <https://github.com/pirelaurent>,
thanks!!! I also had to set JRUBY_HOME before doing anything as well.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#6426 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAIC6vof_RYaPWtF-7-Jvuyz0B504GM0ks5sxjuTgaJpZM4LO80J>
.
|
@pirelaurent's the trick is working, Thanks a lot. |
Solution found! When calling the logstash.bat file full path of the bat file must be used and in short format. For example in my case I have logstash stored in C:\Program Files\Logstash, then there are subfolders for each Logstash version. So in the root folder I have logstash.bat that contains this.
When I run logstash.bat from the C:\Program Files\Logstash folder it will convert the current path location to a short name version. C:\Program Files\Logstash\logstash-5.6.4\bin\logstash.bat becomes C:\Progra~1\Logstash\logstash-5.6.4\bin\logstash.bat Found the solution at this link http://www.robvanderwoude.com/shorts.php |
I have updated the issue's description to hopefully accurately represent the bug. |
Have unzipped the logstash version 6.1.1 but when i run the logstash.bat file i m getting the following error Saw all the previous discussion and worked on those solutions since my problem is not solved but i checked the vendor directory jruby file was there. Should i modify the setup.batch file set JRUBY_BIN="%LS_HOME%\vendor\jruby\bin\jruby" instead of '%LS_HOME%' should i give C:\Program Files\logstash-6.1.1 tried that also but not working. |
I have the same problem with logstash 6.3.0 on windows. the path of jruby bin is: vendor\bundle\jruby\2.3.0\bin but, jruby executor is not located on the bin or other directory |
Thanks a lot!!! |
Faced the same issue. The issue was also improper extraction from Windows Explorer "Extract here" option. Using 7zip to extract did create the folders "\vendor\jruby\bin\jruby" and resolve the issue. |
Just installed LogStash (after much trouble in getting JRuby to work in Win7...). However running
bin\logstash.bat
results in:The reason is complex but TL DR: Maybe you could just use
%JRUBY_HOME%
which is set when JRuby is installed.The long version...
It seems setup is expecting a "vendor" version of JRuby inside LogStash:
However no such file is found. The closest thing we have is
C:\Prg\monitoring\logstash\vendor\bundle\jruby\1.9\bin
but there is nojruby
file in there. Indeed, under Windows there should presumably be ajruby.exe
in there.The text was updated successfully, but these errors were encountered: