Hi everyone !
I'm running Logstash 2.1.2 inside a docker container. My configuration specifies to read data into a file and indexes data into an ES cluster.
I developped a custom filter plugin that queries a LDAP server for informations, but whenever it tries to call the library 'net/ldap', it fails with this error message :
"{:timestamp=>"2016-02-15T10:34:55.656000+0000", :message=>"Exception in filterworker, the pipeline stopped processing new events, please check your filter configuration and restart Logstash.", "exception"=>#<LoadError: no such file to load -- net/ldap>, "backtrace"=>["org/jruby/RubyKernel.java:1040:in require'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/polyglot-0.3.5/lib/polyglot.rb:65:in
require'", "/opt/logstash/vendor/local_gems/ab5428d7/logstash-filter-caparmor-0.0.1/lib/logstash/filters/caparmor.rb:872:in addUserInformations'", "/opt/logstash/vendor/local_gems/ab5428d7/logstash-filter-caparmor-0.0.1/lib/logstash/filters/caparmor.rb:223:in
parse_message'", "/opt/logstash/vendor/local_gems/ab5428d7/logstash-filter-caparmor-0.0.1/lib/logstash/filters/caparmor.rb:41:in filter'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.1.2-java/lib/logstash/filters/base.rb:151:in
multi_filter'", "org/jruby/RubyArray.java:1613:in each'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.1.2-java/lib/logstash/filters/base.rb:148:in
multi_filter'", "(eval):1052:in cond_func_33'", "org/jruby/RubyArray.java:1613:in
each'", "(eval):1049:in cond_func_33'", "(eval):496:in
filter_func'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.1.2-java/lib/logstash/pipeline.rb:244:in filterworker'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.1.2-java/lib/logstash/pipeline.rb:178:in
start_filters'"], :level=>:error}
LoadError: no such file to load -- net/ldap
require at org/jruby/RubyKernel.java:1040
require at /opt/logstash/vendor/bundle/jruby/1.9/gems/polyglot-0.3.5/lib/polyglot.rb:65
addUserInformations at /opt/logstash/vendor/local_gems/ab5428d7/logstash-filter-caparmor-0.0.1/lib/logstash/filters/caparmor.rb:872
parse_message at /opt/logstash/vendor/local_gems/ab5428d7/logstash-filter-caparmor-0.0.1/lib/logstash/filters/caparmor.rb:223
filter at /opt/logstash/vendor/local_gems/ab5428d7/logstash-filter-caparmor-0.0.1/lib/logstash/filters/caparmor.rb:41
multi_filter at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.1.2-java/lib/logstash/filters/base.rb:151
each at org/jruby/RubyArray.java:1613
multi_filter at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.1.2-java/lib/logstash/filters/base.rb:148
cond_func_33 at (eval):1052
each at org/jruby/RubyArray.java:1613
cond_func_33 at (eval):1049
filter_func at (eval):496
filterworker at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.1.2-java/lib/logstash/pipeline.rb:244
start_filters at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.1.2-java/lib/logstash/pipeline.rb:178
"
I did not forget to install net-ldap library with "gem install net-ldap".
My plugin also uses elasticsearch client library and it works well, so I don't really understand what's happening here.
This failure also happens if I try to use this plugin outside a docker container (with the latest version of LS).
When searching for this kind of problem, I met a topic that told to specify env variable GEM_HOME, but it did not help.
I'm pretty lost with this stuff, so I hope someone will be able to help