# Logstash, windows paths with spaces break plugin installation

**URL:** https://discuss.elastic.co/t/logstash-windows-paths-with-spaces-break-plugin-installation/93586
**Category:** Logstash
**Created:** [July 18, 2017, 12:56pm UTC](https://discuss.elastic.co/t/logstash-windows-paths-with-spaces-break-plugin-installation/93586 "2017-07-18T12:56:58Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![IHateBugs](https://avatars.discourse-cdn.com/v4/letter/i/cdc98d/32.png) [@IHateBugs](https://discuss.elastic.co/u/IHateBugs)
#### Post date: [July 18, 2017, 12:56pm UTC](https://discuss.elastic.co/t/logstash-windows-paths-with-spaces-break-plugin-installation/93586/1 "2017-07-18T12:56:58Z")

</div>

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

---

<div class="post-metadata">

### Author: ![IHateBugs](https://avatars.discourse-cdn.com/v4/letter/i/cdc98d/32.png) [@IHateBugs](https://discuss.elastic.co/u/IHateBugs)
#### Post date: [July 20, 2017, 10:25am UTC](https://discuss.elastic.co/t/logstash-windows-paths-with-spaces-break-plugin-installation/93586/2 "2017-07-20T10:25:21Z")

</div>

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

---

<div class="post-metadata">

### Author: ![timk519](https://avatars.discourse-cdn.com/v4/letter/t/bcef8e/32.png) [@timk519](https://discuss.elastic.co/u/timk519)
#### Post date: [July 20, 2017, 2:44pm UTC](https://discuss.elastic.co/t/logstash-windows-paths-with-spaces-break-plugin-installation/93586/3 "2017-07-20T14:44:20Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [August 17, 2017, 2:44pm UTC](https://discuss.elastic.co/t/logstash-windows-paths-with-spaces-break-plugin-installation/93586/4 "2017-08-17T14:44:26Z")

</div>

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