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

undefined local variable or method `router' for Scalyr::ScalyrOut #9

Closed
wendorf opened this issue Apr 18, 2018 · 8 comments
Closed

Comments

@wendorf
Copy link

wendorf commented Apr 18, 2018

I'm using fluent-plugin-scalyr 0.8.3 with fluentd 1.1.0 and am seeing errors in the fluentd logs that I believe correspond with a lack of logs getting emitted to Scalyr:

2018-04-18 15:41:30 +0000 [info]: #0 stats - namespace_cache_size: 1, pod_cache_size: 8, namespace_cache_api_updates: 164, pod_cache_api_updates: 178, id_cache_miss: 164
2018-04-18 15:41:42 +0000 [warn]: #0 Encoding::UndefinedConversionError: "\xC2" from ASCII-8BIT to UTF-8
2018-04-18 15:41:42 +0000 [warn]: #0 failed to flush the buffer. retry_time=32 next_retry_seconds=2018-04-18 15:41:42 +0000 chunk="56a21147269f9e1714d0a661312d106f" error_class=NameError error="undefined local variable or method `router' for #<Scalyr::ScalyrOut:007fec669f62a8>"
  2018-04-18 15:41:42 +0000 [warn]: #0 suppressed same stacktrace
@anup3000
Copy link

Dan,

Which application or platform logs are you trying to upload to Scalyr? Are you trying to load Kubernetes metadata?

Regards,
Anup

@imron
Copy link
Contributor

imron commented Apr 19, 2018

This problem was caused by something missed during the upgrade from 0.12 -> 1.0, and I've just pushed a commit (debc460) that should fix the issue and bumped the version number to 0.8.4.

@wendorf
Copy link
Author

wendorf commented Apr 19, 2018

@imron Thanks! I'll check out the new version and report back.

@anup3000 Yes, I'm loading Kubernetes metadata on Kubernetes 1.9.6

@imron
Copy link
Contributor

imron commented Apr 19, 2018

You'll likely still get a warning because the issue appears to have been triggered by invalid utf-8, but the handling of that UndefinedConversionError will no longer have errors and the plugin will log the event with any invalid utf replaced with <?>

@wendorf
Copy link
Author

wendorf commented Apr 19, 2018

@imron I just tried to test, but the updated gem hasn't been published to RubyGems? Can you publish it? Thanks!

@anup3000
Copy link

@wendorf We will work on publishing the gem and let you know when it is available. - Thanks

@wendorf
Copy link
Author

wendorf commented Apr 19, 2018

Looks great! I'm now getting the more-expected:

2018-04-19 22:35:05 +0000 [warn]: #0 Encoding::UndefinedConversionError: "\xC2" from ASCII-8BIT to UTF-8
2018-04-19 22:35:05 +0000 [warn]: #0 dump an error event: error_class=Encoding::UndefinedConversionError error="\"\\xC2\" from ASCII-8BIT to UTF-8" location="/opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluent-plugin-scalyr-0.8.4/lib/fluent/plugin/out_scalyr.rb:321:in `encode'" tag="kube-apiserver" time=#<Fluent::EventTime:0x007f27e277c048 @sec=1524177292, @nsec=443552000> record={"severity"=>"I", "time"=>"0419 22:34:52.443552", "pid"=>"1", "source"=>"wrap.go:42", "message"=>"GET /api/v1/namespaces/kube-system/endpoints/kube-scheduler: (795.938\xC2\xB5s) 200 [[kube-scheduler/v1.9.6 (linux/amd64) kubernetes/9f8ebd1/leader-election] 127.0.0.1:58672]", "logfile"=>"/fluentd/kube-apiserver"}

Thanks for the rapid response on this!

@wendorf wendorf closed this as completed Apr 19, 2018
@anup3000
Copy link

Hi Dan,

We have uploaded new gem. Please let us know how it goes.

Regards,
Anup

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

3 participants