Logstash, windows paths with spaces break plugin installation

as the title suggest installing a plugin is not possible (tested with logstash 5.5.0) if the path contains any spaces.
tested with logstash-filter-aggregate-2.5.2.gem in a standard "C:\Program Files" path.

i jury rigged logstash to work by commenting out:

LOGSTASH-HOME\lib\pluginmanager\install.rb
# # This is a special flow for PACK related plugins,
# # if we dont detect an pack we will just use the normal Bundle install Strategy`
# # this could be refactored into his own strategy
# begin
# if strategy = LogStash::PluginManager::InstallStrategyFactory.create(plugins_arg)
# LogStash::PluginManager.ui.debug("Installing with strategy: #{strategy.class}")
# strategy.execute
# return
# end
# rescue LogStash::PluginManager::InstallError => e
# report_exception("An error occured when installing the: #{plugins_args_human}, to have more information about the error add a DEBUG=1 before running the command.", e.original_exception)
# return
# rescue LogStash::PluginManager::FileNotFoundError => e
# report_exception("File not found for: #{plugins_args_human}", e)
# return
# rescue LogStash::PluginManager::InvalidPackError => e
# report_exception("Invalid pack for: #{plugins_args_human}, reason: #{e.message}", e)
# return
# rescue => e
# report_exception("Something went wrong when installing #{plugins_args_human}", e)
# return
# end

and by adding
LOGSTASH-HOME/vendor/jruby/lib/ruby/1.9/uri/common.rb
.
.
when @regexp[:PATH_URI]
path = $~[1..-1][0]
if !path
raise InvalidURIError,
"bad URI(invalid path): #{uri}"
end
.
.
ret[:PATH_URI] = Regexp.new('file://(.*)', Regexp::EXTENDED)

but i wouldnt recommend using it as a real fix

is this a stupid or invalid question? Surely i cant be the only one running into this problem.

I ran into the same issue and wound up installing the stack in a directory tree w/no spaces. Being this was on windows, that meant not using the usual "Program Files" directory.

I found a comment to the effect that this was a known issue - whether it'll be dealt with in the future is another question.

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