Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin failing with error #6

Open
yasin-amadmia-mck opened this issue Oct 18, 2016 · 1 comment
Open

Plugin failing with error #6

yasin-amadmia-mck opened this issue Oct 18, 2016 · 1 comment

Comments

@yasin-amadmia-mck
Copy link

Could you please comment on this issue if you can spot anything ?

https://groups.google.com/forum/#!topic/fluentd/Uk9Xp-vJK9o

@k24d
Copy link
Owner

k24d commented Oct 19, 2016

It seems a compatibility issue. We need either one of the following patches:

--- a/fluent-plugin-splunkapi.gemspec
+++ b/fluent-plugin-splunkapi.gemspec
@@ -18,7 +18,7 @@ Gem::Specification.new do |gem|

   gem.rubyforge_project = "fluent-plugin-splunkapi"
   gem.add_development_dependency "fluentd"
-  gem.add_development_dependency "net-http-persistent"
+  gem.add_development_dependency "net-http-persistent", '< 3.0.0'
   gem.add_runtime_dependency "fluentd"
-  gem.add_runtime_dependency "net-http-persistent"
+  gem.add_runtime_dependency "net-http-persistent", '< 3.0.0'
 end

or

diff --git a/fluent-plugin-splunkapi.gemspec b/fluent-plugin-splunkapi.gemspec
index c446e0f..837e516 100644
--- a/fluent-plugin-splunkapi.gemspec
+++ b/fluent-plugin-splunkapi.gemspec
@@ -18,7 +18,7 @@ Gem::Specification.new do |gem|

   gem.rubyforge_project = "fluent-plugin-splunkapi"
   gem.add_development_dependency "fluentd"
-  gem.add_development_dependency "net-http-persistent"
+  gem.add_development_dependency "net-http-persistent", '~> 3.0'
   gem.add_runtime_dependency "fluentd"
-  gem.add_runtime_dependency "net-http-persistent"
+  gem.add_runtime_dependency "net-http-persistent", '~> 3.0'
 end
diff --git a/lib/fluent/plugin/out_splunkapi.rb b/lib/fluent/plugin/out_splunkapi.rb
index d3e6151..d1f09c2 100644
--- a/lib/fluent/plugin/out_splunkapi.rb
+++ b/lib/fluent/plugin/out_splunkapi.rb
@@ -117,7 +117,7 @@ class SplunkAPIOutput < BufferedOutput

   def start
     super
-    @http = Net::HTTP::Persistent.new 'fluentd-plugin-splunkapi'
+    @http = Net::HTTP::Persistent.new name: 'fluentd-plugin-splunkapi'
     @http.verify_mode = OpenSSL::SSL::VERIFY_NONE unless @verify
     @http.headers['Content-Type'] = 'text/plain'
     $log.debug "initialized for splunkapi"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants