tagomoris / fluent-plugin-secure-forward

Other
140 stars 30 forks source link

Nil conversion on connection_hard_timeout (v 0.4.0) #35

Closed freedomofkeima closed 8 years ago

freedomofkeima commented 8 years ago

The newest version caused fluentd to crash.

2016-03-30 14:54:00 +0000 [error]: unexpected error error_class=TypeError error=#<TypeError: can't convert nil into an exact number>
2016-03-30 14:54:00 +0000 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluent-plugin-secure-forward-0.4.0/lib/fluent/plugin/output_node.rb:333:in `+'
...
2016-03-30 14:54:00 +0000 [warn]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluent-plugin-secure-forward-0.4.0/lib/fluent/plugin/output_node.rb:331:in `connect'
2016-03-30 14:54:00 +0000 [info]: process finished code=0
2016-03-30 14:54:00 +0000 [warn]: process died within 1 second. exit.

It seems the default value of connection_hard_timeout is set to nil here while this line and this line try to compare its value.

tagomoris commented 8 years ago

@freedomofkeima It's actually a bug. Thank you for report! I'd fixed it and released v0.4.1. Could you try it?

freedomofkeima commented 8 years ago

Thanks, it's starting properly now :smile: