logdna / fluent-plugin-logdna

MIT License
2 stars 21 forks source link

Error: Unable to activate http-2.2.2, because http_parser.rb-0.8.0 conflicts with http_parser.rb (~> 0.6.0) #39

Open yangjiel opened 1 year ago

yangjiel commented 1 year ago

Hi,

My environment is: td-agent 4.4.1 fluentd 1.15.2 (c32842297ed2c306f1b841a8f6e55bdd0f1cb27f) My fluentd config is:

<match **>
  @type logdna
  api_key xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  hostname test
  tags web,dev
</match>

After I started the fluentd, fluentd crashed immediately.

Here is the fluentd log:

2023-02-02 19:10:23 -0800 [info]: #0 starting fluentd worker pid=140851 ppid=140846 worker=0
2023-02-02 19:10:23 -0800 [error]: #0 unexpected error error_class=Gem::ConflictError error="Unable to activate http-2.2.2, because http_parser.rb-0.8.0 conflicts with http_parser.rb (~> 0.6.0)"
  2023-02-02 19:10:23 -0800 [error]: #0 /opt/td-agent/lib/ruby/2.7.0/rubygems/specification.rb:2247:in `raise_if_conflicts'
  2023-02-02 19:10:23 -0800 [error]: #0 /opt/td-agent/lib/ruby/2.7.0/rubygems/specification.rb:1369:in `activate'
  2023-02-02 19:10:23 -0800 [error]: #0 /opt/td-agent/lib/ruby/2.7.0/rubygems.rb:217:in `rescue in try_activate'
  2023-02-02 19:10:23 -0800 [error]: #0 /opt/td-agent/lib/ruby/2.7.0/rubygems.rb:210:in `try_activate'
  2023-02-02 19:10:23 -0800 [error]: #0 /opt/td-agent/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:151:in `rescue in require'
  2023-02-02 19:10:23 -0800 [error]: #0 /opt/td-agent/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:147:in `require'
  2023-02-02 19:10:23 -0800 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/fluent-plugin-logdna-0.4.0/lib/fluent/plugin/out_logdna.rb:46:in `start'
  2023-02-02 19:10:23 -0800 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.15.2/lib/fluent/compat/call_super_mixin.rb:42:in `start'
  2023-02-02 19:10:23 -0800 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.15.2/lib/fluent/root_agent.rb:203:in `block in start'
  2023-02-02 19:10:23 -0800 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.15.2/lib/fluent/root_agent.rb:192:in `block (2 levels) in lifecycle'
  2023-02-02 19:10:23 -0800 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.15.2/lib/fluent/root_agent.rb:191:in `each'
  2023-02-02 19:10:23 -0800 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.15.2/lib/fluent/root_agent.rb:191:in `block in lifecycle'
  2023-02-02 19:10:23 -0800 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.15.2/lib/fluent/root_agent.rb:178:in `each'
  2023-02-02 19:10:23 -0800 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.15.2/lib/fluent/root_agent.rb:178:in `lifecycle'
  2023-02-02 19:10:23 -0800 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.15.2/lib/fluent/root_agent.rb:202:in `start'
  2023-02-02 19:10:23 -0800 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.15.2/lib/fluent/engine.rb:248:in `start'
  2023-02-02 19:10:23 -0800 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.15.2/lib/fluent/engine.rb:147:in `run'
  2023-02-02 19:10:23 -0800 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.15.2/lib/fluent/supervisor.rb:764:in `block in run_worker'
  2023-02-02 19:10:23 -0800 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.15.2/lib/fluent/supervisor.rb:1037:in `main_process'
  2023-02-02 19:10:23 -0800 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.15.2/lib/fluent/supervisor.rb:755:in `run_worker'
  2023-02-02 19:10:23 -0800 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.15.2/lib/fluent/command/fluentd.rb:381:in `<top (required)>'
  2023-02-02 19:10:23 -0800 [error]: #0 /opt/td-agent/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in `require'
  2023-02-02 19:10:23 -0800 [error]: #0 /opt/td-agent/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in `require'
  2023-02-02 19:10:23 -0800 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.15.2/bin/fluentd:15:in `<top (required)>'
  2023-02-02 19:10:23 -0800 [error]: #0 /opt/td-agent/bin/fluentd:23:in `load'
  2023-02-02 19:10:23 -0800 [error]: #0 /opt/td-agent/bin/fluentd:23:in `<top (required)>'
  2023-02-02 19:10:23 -0800 [error]: #0 /usr/sbin/td-agent:15:in `load'
  2023-02-02 19:10:23 -0800 [error]: #0 /usr/sbin/td-agent:15:in `<main>'
2023-02-02 19:10:23 -0800 [error]: #0 Unable to activate http-2.2.2, because http_parser.rb-0.8.0 conflicts with http_parser.rb (~> 0.6.0) path=nil error_class=Gem::ConflictError error="Unable to activate http-2.2.2, because http_parser.rb-0.8.0 conflicts with http_parser.rb (~> 0.6.0)"
  2023-02-02 19:10:23 -0800 [error]: #0 suppressed same stacktrace
2023-02-02 19:10:23 -0800 [error]: Worker 0 finished unexpectedly with status 2
2023-02-02 19:10:23 -0800 [info]: Received graceful stop

Am I the only one who got this error? I'm using a couple other plugins, is it a conflict? Thanks.

kumaramit01 commented 1 year ago

Yes I have the identical issue on jammy -were you able to figure out a solution?

td-agent --version td-agent 4.4.2 fluentd 1.15.3 (e89092ce1132a933c12bb23fe8c9323c07ca81f5)

2023-03-22 14:13:20 +0000 [error]: #0 unexpected error error_class=Gem::ConflictError error="Unable to activate http-2.2.2, because http_parser.rb-0.8.0 conflicts with http_parser.rb (~> 0.6.0)"
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/lib/ruby/3.1.0/rubygems/specification.rb:2236:in `raise_if_conflicts'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/lib/ruby/3.1.0/rubygems/specification.rb:1367:in `activate'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/lib/ruby/3.1.0/rubygems.rb:211:in `rescue in try_activate'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/lib/ruby/3.1.0/rubygems.rb:204:in `try_activate'
  2023-03-22 14:13:20 +0000 [error]: #0 <internal:/opt/td-agent/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:153:in `rescue in require'
  2023-03-22 14:13:20 +0000 [error]: #0 <internal:/opt/td-agent/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:149:in `require'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/lib/ruby/gems/3.1.0/gems/fluent-plugin-logdna-0.4.0/lib/fluent/plugin/out_logdna.rb:46:in `start'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/lib/ruby/gems/3.1.0/gems/fluentd-1.15.3/lib/fluent/compat/call_super_mixin.rb:42:in `start'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/lib/ruby/gems/3.1.0/gems/fluentd-1.15.3/lib/fluent/root_agent.rb:203:in `block in start'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/lib/ruby/gems/3.1.0/gems/fluentd-1.15.3/lib/fluent/root_agent.rb:192:in `block (2 levels) in lifecycle'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/lib/ruby/gems/3.1.0/gems/fluentd-1.15.3/lib/fluent/root_agent.rb:191:in `each'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/lib/ruby/gems/3.1.0/gems/fluentd-1.15.3/lib/fluent/root_agent.rb:191:in `block in lifecycle'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/lib/ruby/gems/3.1.0/gems/fluentd-1.15.3/lib/fluent/root_agent.rb:178:in `each'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/lib/ruby/gems/3.1.0/gems/fluentd-1.15.3/lib/fluent/root_agent.rb:178:in `lifecycle'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/lib/ruby/gems/3.1.0/gems/fluentd-1.15.3/lib/fluent/root_agent.rb:202:in `start'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/lib/ruby/gems/3.1.0/gems/fluentd-1.15.3/lib/fluent/engine.rb:248:in `start'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/lib/ruby/gems/3.1.0/gems/fluentd-1.15.3/lib/fluent/engine.rb:147:in `run'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/lib/ruby/gems/3.1.0/gems/fluentd-1.15.3/lib/fluent/supervisor.rb:783:in `block in run_worker'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/lib/ruby/gems/3.1.0/gems/fluentd-1.15.3/lib/fluent/supervisor.rb:1056:in `main_process'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/lib/ruby/gems/3.1.0/gems/fluentd-1.15.3/lib/fluent/supervisor.rb:774:in `run_worker'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/lib/ruby/gems/3.1.0/gems/fluentd-1.15.3/lib/fluent/command/fluentd.rb:370:in `<top (required)>'
  2023-03-22 14:13:20 +0000 [error]: #0 <internal:/opt/td-agent/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
  2023-03-22 14:13:20 +0000 [error]: #0 <internal:/opt/td-agent/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/lib/ruby/gems/3.1.0/gems/fluentd-1.15.3/bin/fluentd:15:in `<top (required)>'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/bin/fluentd:25:in `load'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/bin/fluentd:25:in `<top (required)>'
  2023-03-22 14:13:20 +0000 [error]: #0 /usr/sbin/td-agent:15:in `load'
  2023-03-22 14:13:20 +0000 [error]: #0 /usr/sbin/td-agent:15:in `<main>'
2023-03-22 14:13:20 +0000 [error]: #0 Unable to activate http-2.2.2, because http_parser.rb-0.8.0 conflicts with http_parser.rb (~> 0.6.0) path=nil error_class=Gem::ConflictError error="Unable to activate http-2.2.2, because http_parser.rb-0.8.0 conflicts with http_parser.rb (~> 0.6.0)"
  2023-03-22 14:13:20 +0000 [error]: #0 suppressed same stacktrace
2023-03-22 14:13:20 +0000 [error]: Worker 0 finished unexpectedly with status 2
2023-03-22 14:13:20 +0000 [info]: Received graceful stop
yangjiel commented 1 year ago

Yes I have the identical issue on jammy -were you able to figure out a solution?

td-agent --version td-agent 4.4.2 fluentd 1.15.3 (e89092ce1132a933c12bb23fe8c9323c07ca81f5)

2023-03-22 14:13:20 +0000 [error]: #0 unexpected error error_class=Gem::ConflictError error="Unable to activate http-2.2.2, because http_parser.rb-0.8.0 conflicts with http_parser.rb (~> 0.6.0)"
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/lib/ruby/3.1.0/rubygems/specification.rb:2236:in `raise_if_conflicts'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/lib/ruby/3.1.0/rubygems/specification.rb:1367:in `activate'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/lib/ruby/3.1.0/rubygems.rb:211:in `rescue in try_activate'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/lib/ruby/3.1.0/rubygems.rb:204:in `try_activate'
  2023-03-22 14:13:20 +0000 [error]: #0 <internal:/opt/td-agent/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:153:in `rescue in require'
  2023-03-22 14:13:20 +0000 [error]: #0 <internal:/opt/td-agent/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:149:in `require'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/lib/ruby/gems/3.1.0/gems/fluent-plugin-logdna-0.4.0/lib/fluent/plugin/out_logdna.rb:46:in `start'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/lib/ruby/gems/3.1.0/gems/fluentd-1.15.3/lib/fluent/compat/call_super_mixin.rb:42:in `start'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/lib/ruby/gems/3.1.0/gems/fluentd-1.15.3/lib/fluent/root_agent.rb:203:in `block in start'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/lib/ruby/gems/3.1.0/gems/fluentd-1.15.3/lib/fluent/root_agent.rb:192:in `block (2 levels) in lifecycle'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/lib/ruby/gems/3.1.0/gems/fluentd-1.15.3/lib/fluent/root_agent.rb:191:in `each'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/lib/ruby/gems/3.1.0/gems/fluentd-1.15.3/lib/fluent/root_agent.rb:191:in `block in lifecycle'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/lib/ruby/gems/3.1.0/gems/fluentd-1.15.3/lib/fluent/root_agent.rb:178:in `each'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/lib/ruby/gems/3.1.0/gems/fluentd-1.15.3/lib/fluent/root_agent.rb:178:in `lifecycle'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/lib/ruby/gems/3.1.0/gems/fluentd-1.15.3/lib/fluent/root_agent.rb:202:in `start'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/lib/ruby/gems/3.1.0/gems/fluentd-1.15.3/lib/fluent/engine.rb:248:in `start'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/lib/ruby/gems/3.1.0/gems/fluentd-1.15.3/lib/fluent/engine.rb:147:in `run'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/lib/ruby/gems/3.1.0/gems/fluentd-1.15.3/lib/fluent/supervisor.rb:783:in `block in run_worker'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/lib/ruby/gems/3.1.0/gems/fluentd-1.15.3/lib/fluent/supervisor.rb:1056:in `main_process'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/lib/ruby/gems/3.1.0/gems/fluentd-1.15.3/lib/fluent/supervisor.rb:774:in `run_worker'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/lib/ruby/gems/3.1.0/gems/fluentd-1.15.3/lib/fluent/command/fluentd.rb:370:in `<top (required)>'
  2023-03-22 14:13:20 +0000 [error]: #0 <internal:/opt/td-agent/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
  2023-03-22 14:13:20 +0000 [error]: #0 <internal:/opt/td-agent/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/lib/ruby/gems/3.1.0/gems/fluentd-1.15.3/bin/fluentd:15:in `<top (required)>'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/bin/fluentd:25:in `load'
  2023-03-22 14:13:20 +0000 [error]: #0 /opt/td-agent/bin/fluentd:25:in `<top (required)>'
  2023-03-22 14:13:20 +0000 [error]: #0 /usr/sbin/td-agent:15:in `load'
  2023-03-22 14:13:20 +0000 [error]: #0 /usr/sbin/td-agent:15:in `<main>'
2023-03-22 14:13:20 +0000 [error]: #0 Unable to activate http-2.2.2, because http_parser.rb-0.8.0 conflicts with http_parser.rb (~> 0.6.0) path=nil error_class=Gem::ConflictError error="Unable to activate http-2.2.2, because http_parser.rb-0.8.0 conflicts with http_parser.rb (~> 0.6.0)"
  2023-03-22 14:13:20 +0000 [error]: #0 suppressed same stacktrace
2023-03-22 14:13:20 +0000 [error]: Worker 0 finished unexpectedly with status 2
2023-03-22 14:13:20 +0000 [info]: Received graceful stop

Seems the plugin doesn't support newer version of td-agent, you can try older release of the td-agent. Or wait for the owner to update the dependencies. Solution is not verified because I didn't use this plugin at the end.