fangli / fluent-plugin-influxdb

A buffered output plugin for fluentd and InfluxDB
MIT License
111 stars 65 forks source link

New version of influxdb fails to import `cause` gem #51

Closed brettdh closed 8 years ago

brettdh commented 8 years ago

My temporary workaround is to

gem install influxdb --version 0.2.3

before

fluent-gem install fluent-plugin-influxdb

That may not be the exact version where the issue was introduced, but it works.

Here's a log from a start->finish run with the failure:

2016-05-18 18:59:56 +0000 [info]: reading config file path="/etc/fluentd/fluentd.conf"
2016-05-18 18:59:56 +0000 [info]: starting fluentd-0.12.23
2016-05-18 18:59:56 +0000 [info]: gem 'fluent-plugin-elasticsearch' version '1.5.0'
2016-05-18 18:59:56 +0000 [info]: gem 'fluent-plugin-exclude-filter' version '0.0.1'
2016-05-18 18:59:56 +0000 [info]: gem 'fluent-plugin-flatten-hash' version '0.2.0'
2016-05-18 18:59:56 +0000 [info]: gem 'fluent-plugin-grep' version '0.3.4'
2016-05-18 18:59:56 +0000 [info]: gem 'fluent-plugin-influxdb' version '0.2.7'
2016-05-18 18:59:56 +0000 [info]: gem 'fluentd' version '0.12.23'
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- cause (LoadError)
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /var/lib/gems/1.9.1/gems/influxdb-0.3.0/lib/influxdb/client.rb:2:in `<top (required)>'
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /var/lib/gems/1.9.1/gems/influxdb-0.3.0/lib/influxdb.rb:19:in `<top (required)>'
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
    from /var/lib/gems/1.9.1/gems/fluent-plugin-influxdb-0.2.7/lib/fluent/plugin/out_influxdb.rb:3:in `<top (required)>'
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /var/lib/gems/1.9.1/gems/fluentd-0.12.23/lib/fluent/plugin.rb:172:in `block in try_load_plugin'
    from /var/lib/gems/1.9.1/gems/fluentd-0.12.23/lib/fluent/plugin.rb:170:in `each'
    from /var/lib/gems/1.9.1/gems/fluentd-0.12.23/lib/fluent/plugin.rb:170:in `try_load_plugin'
    from /var/lib/gems/1.9.1/gems/fluentd-0.12.23/lib/fluent/plugin.rb:130:in `new_impl'
    from /var/lib/gems/1.9.1/gems/fluentd-0.12.23/lib/fluent/plugin.rb:59:in `new_output'
    from /var/lib/gems/1.9.1/gems/fluentd-0.12.23/lib/fluent/plugin/out_copy.rb:46:in `block in configure'
    from /var/lib/gems/1.9.1/gems/fluentd-0.12.23/lib/fluent/plugin/out_copy.rb:37:in `each'
    from /var/lib/gems/1.9.1/gems/fluentd-0.12.23/lib/fluent/plugin/out_copy.rb:37:in `configure'
    from /var/lib/gems/1.9.1/gems/fluentd-0.12.23/lib/fluent/agent.rb:132:in `add_match'
    from /var/lib/gems/1.9.1/gems/fluentd-0.12.23/lib/fluent/agent.rb:63:in `block in configure'
    from /var/lib/gems/1.9.1/gems/fluentd-0.12.23/lib/fluent/agent.rb:57:in `each'
    from /var/lib/gems/1.9.1/gems/fluentd-0.12.23/lib/fluent/agent.rb:57:in `configure'
    from /var/lib/gems/1.9.1/gems/fluentd-0.12.23/lib/fluent/root_agent.rb:86:in `configure'
    from /var/lib/gems/1.9.1/gems/fluentd-0.12.23/lib/fluent/engine.rb:129:in `configure'
    from /var/lib/gems/1.9.1/gems/fluentd-0.12.23/lib/fluent/engine.rb:103:in `run_configure'
    from /var/lib/gems/1.9.1/gems/fluentd-0.12.23/lib/fluent/supervisor.rb:483:in `run_configure'
    from /var/lib/gems/1.9.1/gems/fluentd-0.12.23/lib/fluent/supervisor.rb:154:in `block in start'
    from /var/lib/gems/1.9.1/gems/fluentd-0.12.23/lib/fluent/supervisor.rb:360:in `call'
    from /var/lib/gems/1.9.1/gems/fluentd-0.12.23/lib/fluent/supervisor.rb:360:in `main_process'
    from /var/lib/gems/1.9.1/gems/fluentd-0.12.23/lib/fluent/supervisor.rb:333:in `block in supervise'
    from /var/lib/gems/1.9.1/gems/fluentd-0.12.23/lib/fluent/supervisor.rb:332:in `fork'
    from /var/lib/gems/1.9.1/gems/fluentd-0.12.23/lib/fluent/supervisor.rb:332:in `supervise'
    from /var/lib/gems/1.9.1/gems/fluentd-0.12.23/lib/fluent/supervisor.rb:150:in `start'
    from /var/lib/gems/1.9.1/gems/fluentd-0.12.23/lib/fluent/command/fluentd.rb:173:in `<top (required)>'
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /var/lib/gems/1.9.1/gems/fluentd-0.12.23/bin/fluentd:5:in `<top (required)>'
    from /usr/local/bin/fluentd:23:in `load'
    from /usr/local/bin/fluentd:23:in `<main>'
2016-05-18 18:59:56 +0000 [info]: process finished code=256
2016-05-18 18:59:56 +0000 [warn]: process died within 1 second. exit.
repeatedly commented 8 years ago

This is not an issue of fluent-plugin-influxdb. influxdb gem uses cause gem in ruby 2.0 or earlier. This is why this error happens.

brettdh commented 8 years ago

It seems like an issue with the version of the influxdb gem that fluent-plugin-influxdb specifies - basically the plugin inherits the issue by the version of the gem it depends on.

Thought you might want to restrict the max version so that this issue doesn't happen, and then maybe bump the minimum version if it gets fixed later.

Or, if I'm just using an unsupported version of ruby (this is in a Dockerfile based on ubuntu 14.04), feel free to close.

SaMnCo commented 8 years ago

Well, this means to install the plugin anyone should need Ruby 2+. By default, Ubuntu 14.04 ships with 1.9, so this could be an issue for many users. Also, Precise is still supported until 2017 and is also impacted. Xenial ships with 2.3 so that's ok.

I think this would be worth having a decision documented.

repeatedly commented 8 years ago

Ruby 1.9 is EOL so it should not be used in production. Using Docker, we can easy to setup any ruby version.

BTW, I will update README for cause gem issue.

SaMnCo commented 8 years ago

I don't think everyone wants to use Docker either, even if the approach is more than valid.

I think this should have rather a documentation tag mentioning it should use Ruby 2.0 (for the sake of people not having that in the main repos, eventually with a snippet of code to deploy Ruby 2.x easily.

On Wed, May 25, 2016 at 4:19 PM, Masahiro Nakagawa <notifications@github.com

wrote:

Ruby 1.9 is EOL so it should not be used in production. Using Docker, we can easy to setup any ruby version.

BTW, I will update README for cause gem issue.

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/fangli/fluent-plugin-influxdb/issues/51#issuecomment-221591024

SaM'n'Co R'U Ready? I was BORN ready!