Logstash agent throws exception when starting on Windows

Description

Affected version: 1.1.12 (had to set to "1.1.10" because jira can't find "1.1.12")
OS: Windows 7 (x64)
JDK version: 1.70_21 (x86)

Command line:

java -jar logstash-1.1.12-flatjar.jar agent -f logstash.conf

The incriminated logstash.conf is attached.

NOTE: This does not happen when using the "simple" configuration file in the tutorial so it might be related to some input/output/filter plugins

Here below is the logstash log.

Note the "No such directory: file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!C:/backports/1.8.7/stdlib" message.
The jar does contain a "backports/1.8.7/stdlib" folder, but for some reason it cannot find it.

{:expand_path=>["jar:file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/logstash/../../locales/en.yml", "jar:file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/locales/en.yml"]}
{:expand_path=>["file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/META-INF/jruby.home/lib/ruby/gems/shared/gems/rake-10.0.3", "file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/META-INF/jruby.home/lib/ruby/gems/shared/gems/rake-10.0.3"]}
{:expand_path=>["file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/addressable/idna/../../../data/unicode.data", "file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/data/unicode.data"]}
Exception in thread "LogStash::Runner" org.jruby.exceptions.RaiseException: (ENOENT) No such file or directory - No such directory: file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!C:/backports/1.8.7/stdlib
at org.jruby.RubyDir.entries(org/jruby/RubyDir.java:366)
at RUBY.extend_relative(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/backports/tools.rb:68)
at RUBY.(root)(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/backports/1.8.7/stdlib.rb:1)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1027)
at Kernel.require(jar:file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/custom_require.rb:36)
at Kernel.require(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/logstash/JRUBY-6970.rb:13)
at Kernel.require_with_backports(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/backports/tools.rb:328)
at RUBY.(root)(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/backports/tools.rb:1)
at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1613)
at RUBY.require_relative_dir(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/backports/tools.rb:22)
at RUBY.require_relative_dir(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/backports/tools.rb:17)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1027)
at Kernel.require(jar:file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/custom_require.rb:36)
at Kernel.require(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/logstash/JRUBY-6970.rb:13)
at RUBY.(root)(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/backports/1.8.7.rb:3)
at RUBY.(root)(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/backports/tools.rb:1)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1027)
at Kernel.require(jar:file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/custom_require.rb:36)
at Kernel.require(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/logstash/JRUBY-6970.rb:13)
at RUBY.require_with_backports(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/backports/tools.rb:328)
at RUBY.(root)(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/backports/1.8.rb:2)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1027)
at Kernel.require(jar:file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/custom_require.rb:36)
at Kernel.require(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/logstash/JRUBY-6970.rb:13)
at RUBY.(root)(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/backports/tools.rb:1)
at RUBY.require_with_backports(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/backports/tools.rb:328)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1027)
at Kernel.require(jar:file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/custom_require.rb:36)
at Kernel.require(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/logstash/JRUBY-6970.rb:13)
at RUBY.(root)(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/backports/1.9.1.rb:2)
at RUBY.(root)(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/backports/tools.rb:1)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1027)
at Kernel.require(jar:file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/custom_require.rb:36)
at Kernel.require(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/logstash/JRUBY-6970.rb:13)
at RUBY.require_with_backports(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/backports/tools.rb:328)
at RUBY.(root)(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/backports/1.9.2.rb:2)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1027)
at Kernel.require(jar:file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/custom_require.rb:36)
at Kernel.require(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/logstash/JRUBY-6970.rb:13)
at RUBY.(root)(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/backports/tools.rb:1)
at RUBY.require_with_backports(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/backports/tools.rb:328)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1027)
at Kernel.require(jar:file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/custom_require.rb:36)
at Kernel.require(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/logstash/JRUBY-6970.rb:13)
at RUBY.(root)(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/backports/1.9.3.rb:2)
at RUBY.(root)(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/backports/tools.rb:1)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1027)
at Kernel.require(jar:file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/custom_require.rb:36)
at Kernel.require(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/logstash/JRUBY-6970.rb:13)
at RUBY.require_with_backports(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/backports/tools.rb:328)
at RUBY.(root)(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/backports/1.9.rb:2)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1027)
at Kernel.require(jar:file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/custom_require.rb:36)
at Kernel.require(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/logstash/JRUBY-6970.rb:13)
at RUBY.(root)(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/backports/tools.rb:1)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1027)
at Kernel.require(jar:file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/custom_require.rb:36)
at Kernel.require(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/logstash/JRUBY-6970.rb:13)
at RUBY.require_with_backports(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/backports/tools.rb:328)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1027)
at Kernel.require(jar:file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/custom_require.rb:36)
at Kernel.require(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/logstash/JRUBY-6970.rb:13)
at RUBY.(root)(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/backports/2.0.0.rb:2)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1027)
at Kernel.require(jar:file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/custom_require.rb:36)
at Kernel.require(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/logstash/JRUBY-6970.rb:13)
at RUBY.(root)(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/backports/tools.rb:1)
at RUBY.require_with_backports(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/backports/tools.rb:328)
at org.jruby.ext.thread.Mutex.synchronize(org/jruby/ext/thread/Mutex.java:149)
at RUBY.(root)(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/backports/2.0.rb:2)
at RUBY.(root)(file:/C:/devel/local/logstash/logstash-1.1.12-flatjar.jar!/backports/tools.rb:1)

Attachments

1

Gliffy Diagrams

Activity

Show:

Zz Chen August 17, 2013 at 1:19 PM

Hi James,
It works now! Thank you for this! It was a BIG help to me!

James Scott August 13, 2013 at 9:14 PM

Chen- I somehow managed to commit the wrong version of a debug puts statement - that's fixed now. I submitted another pull request at https://github.com/logstash/logstash/pull/575. If you're in the code, you can just comment out the puts on line 68, it's a debug statement that I carried over from the previous revision but didn't rename properly.

Zz Chen August 13, 2013 at 4:47 PM

Hi James,
Thanks for your information!

The reason I encounter this bug is i am using "rabbitmq" plugin. As I see your patch, i am starting trying that!
I follow your suggestion and unzip the official 1.1.13 jar and replace the JRUBY-6970.rb with yours from (https://github.com/logstash/logstash/blob/d839abc1dc480bcf9e4dcc5f70ff6226875350e4/lib/logstash/JRUBY-6970.rb)
It seems not works for me. (The error is the same as i post befored, "wrong number of arge")

I attached my logstash config below:

input {
stdin {
type => "stdin-type"
format => "json"
}
}

output {
#stdout { debug => true debug_format => "json"}

rabbitmq {
exchange => "logstash-exchange"
exchange_type => "direct"
key => "logstash-routingKey"

host => "themq.server.ip"
port => 5672

user => "guest"
password => "guest"

  1. debug => true
    }
    }

Thanks!

James Scott August 13, 2013 at 11:12 AM

Chen-

If you could provide your config file, that might be helpful. I'm not able to reproduce that failure with a trivial logstash.conf (or with the conf attached to this issue, for that matter).

For what it's worth, I'm running that patch on the 1.1.13 jar and it's working OK for me. I just unzipped the jar, edited lib/logstash/JRUBY-6970.rb, zipped it back up and ran it.

Zz Chen August 13, 2013 at 10:10 AM

Hi @James,

Thanks for your patch! I get the same issue (cannot load module) on my Windows Server 2008.

Now, I pull the latest master and built it to test this issue but I stock on start the logstash agent.
The error message is,

Exception in thread "main" org.jruby.exceptions.RaiseException: (ArgumentError) wrong number of arguments calling `path` (0 for 1)
at RUBY.fix_jar_path(file:/C:/logstash/logstash-1.2.0.dev-flatjar.jar!/logstash/JRUBY-6970.rb:68)
at RUBY.expand_path(file:/C:/logstash/logstash-1.2.0.dev-flatjar.jar!/logstash/JRUBY-6970.rb:44)
at logstash.runner.(root)(logstash/runner.rb:47)

Should I provide more information about my environment?

Thanks!

Fixed

Details

Assignee

Reporter

Affects versions

Created May 8, 2013 at 1:45 PM
Updated September 9, 2013 at 8:49 AM
Resolved September 9, 2013 at 8:49 AM