Search code examples
cygwinlogstash

Can't run logstash on windows


I'm currently trying to install and run Logstash on Windows 7 using the guidelines of the Logstash website.

My first try was with the version 1.4.2, but I got the error:

Error: Unable to access jarfile /cygdrive/c/Users/hschoonjans/My Documents/logstash-1.4.2/vendor/jar/jruby-complete-1.7.11.jar

Then I tried with a more recent version (1.5.0.rc2), but had a different error message:

LoadError: no such file to load -- logstash/environment require at org/jruby/RubyKernel.java:1071 require at C:/Users/hschoonjans/My Documents/Elasticsearch cluster/logstash-1.5.0.rc2/vendor/jruby/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:135 (root) at C:\Users\hschoonjans\My Documents\Elasticsearch cluster\logstash-1.5.0.rc2\lib\logstash\runner.rb:7

For both versions, I only tried the same command in my Cygwin in the logstash directory:

bin/logstash -e 'input { stdin { } } output { stdout {} }'

This is confusing, in the tutorials there is no allusion to the need of making more configuration.

EDIT: it seems that the problem may occur mainly when using Cygwin. It may be related with this issue.


Solution

  • To solve the problem, I:

    1. Changed the working directory to the bin directory
    2. Used the configurations from a .conf file

    The command I used:

    logstash agent -f myconf.conf