fluent / fluent-plugin-mongo

MongoDB input and output plugin for Fluentd
https://docs.fluentd.org/output/mongo
173 stars 61 forks source link

no such file to load -- fluent/plugin/mongo_util (LoadError) #17

Closed loveshell closed 11 years ago

loveshell commented 12 years ago

root@linux:/var/lib/gems/1.9.2/gems/fluentd-0.10.28/lib/fluent/plugin# fluentd -v 2012-11-04 00:55:41 +0800: fluent/supervisor.rb:153:supervise: starting fluentd-0.10.28 2012-11-04 00:55:41 +0800: fluent/supervisor.rb:235:read_config: reading config file path="/etc/fluent/fluent.conf" 2012-11-04 00:55:41 +0800: fluent/engine.rb:65:block in configure: adding source type="forward" 2012-11-04 00:55:41 +0800: fluent/engine.rb:81:block in configure: adding match pattern="ff.file" type="mongo" /var/lib/gems/1.9.2/gems/fluent-plugin-mongo-0.6.10/lib/fluent/plugin/out_mongo.rb:7:in require': no such file to load -- fluent/plugin/mongo_util (LoadError) from /var/lib/gems/1.9.2/gems/fluent-plugin-mongo-0.6.10/lib/fluent/plugin/out_mongo.rb:7:inclass:MongoOutput' from /var/lib/gems/1.9.2/gems/fluent-plugin-mongo-0.6.10/lib/fluent/plugin/out_mongo.rb:4:in <module:Fluent>' from /var/lib/gems/1.9.2/gems/fluent-plugin-mongo-0.6.10/lib/fluent/plugin/out_mongo.rb:1:in<top (required)>' from /var/lib/gems/1.9.2/gems/fluentd-0.10.28/lib/fluent/plugin.rb:152:in require' from /var/lib/gems/1.9.2/gems/fluentd-0.10.28/lib/fluent/plugin.rb:152:inblock in try_load_plugin' from /var/lib/gems/1.9.2/gems/fluentd-0.10.28/lib/fluent/plugin.rb:149:in reverse_each' from /var/lib/gems/1.9.2/gems/fluentd-0.10.28/lib/fluent/plugin.rb:149:intry_load_plugin' from /var/lib/gems/1.9.2/gems/fluentd-0.10.28/lib/fluent/plugin.rb:97:in new_impl' from /var/lib/gems/1.9.2/gems/fluentd-0.10.28/lib/fluent/plugin.rb:45:innew_output' from /var/lib/gems/1.9.2/gems/fluentd-0.10.28/lib/fluent/engine.rb:83:in block in configure' from /var/lib/gems/1.9.2/gems/fluentd-0.10.28/lib/fluent/engine.rb:73:ineach' from /var/lib/gems/1.9.2/gems/fluentd-0.10.28/lib/fluent/engine.rb:73:in configure' from /var/lib/gems/1.9.2/gems/fluentd-0.10.28/lib/fluent/engine.rb:51:inparse_config' from /var/lib/gems/1.9.2/gems/fluentd-0.10.28/lib/fluent/supervisor.rb:247:in run_configure' from /var/lib/gems/1.9.2/gems/fluentd-0.10.28/lib/fluent/supervisor.rb:88:inblock in start' from /var/lib/gems/1.9.2/gems/fluentd-0.10.28/lib/fluent/supervisor.rb:180:in call' from /var/lib/gems/1.9.2/gems/fluentd-0.10.28/lib/fluent/supervisor.rb:180:inmain_process' from /var/lib/gems/1.9.2/gems/fluentd-0.10.28/lib/fluent/supervisor.rb:155:in block in supervise' from /var/lib/gems/1.9.2/gems/fluentd-0.10.28/lib/fluent/supervisor.rb:154:infork' from /var/lib/gems/1.9.2/gems/fluentd-0.10.28/lib/fluent/supervisor.rb:154:in supervise' from /var/lib/gems/1.9.2/gems/fluentd-0.10.28/lib/fluent/supervisor.rb:83:instart' from /var/lib/gems/1.9.2/gems/fluentd-0.10.28/lib/fluent/command/fluentd.rb:129:in <top (required)>' from /var/lib/gems/1.9.2/gems/fluentd-0.10.28/bin/fluentd:6:inrequire' from /var/lib/gems/1.9.2/gems/fluentd-0.10.28/bin/fluentd:6:in <top (required)>' from /etc/alternatives/gem-bin/fluentd:19:inload'

repeatedly commented 12 years ago

This issue seems to be environment-dependent. This error didn't occur on my Mac.

Hmm... I'm not familier with 'alternatives'. Does this error occur without 'alternatives'?

repeatedly commented 11 years ago

Other uses don't hit this problem and no feedback. Probably this issue is not fluent-plugin-mongo problem.

ghost commented 11 years ago

It seems that this library need to be confiugred LOAD_PATH including ' fluent-plugin-mongo/lib'. If you are using rbenv, install rbenv-vars plugin and set RUBYLIB path to ' fluent-plugin-mongo/lib'.