fluent-plugin-gcloud-pubsub icon indicating copy to clipboard operation
fluent-plugin-gcloud-pubsub copied to clipboard

"unexpected error" occurs in fluentd v0.14.0

Open mia-0032 opened this issue 8 years ago • 0 comments

Mentioned in https://github.com/mdoi/fluent-plugin-gcloud-pubsub/pull/8, out_gcloud_pubsub don't work properly in fluentd v0.14.0.

The error's stacktrace is below:

2016-06-14 11:06:54 +0900 [error]: unexpected error error="\"\\xE8\" from ASCII-8BIT to UTF-8"
  2016-06-14 11:06:54 +0900 [error]: /path/to/fluent-plugin-gcloud-pubsub/lib/fluent/plugin/out_gcloud_pubsub.rb:49:in `encode'
  2016-06-14 11:06:54 +0900 [error]: /path/to/fluent-plugin-gcloud-pubsub/lib/fluent/plugin/out_gcloud_pubsub.rb:49:in `to_json'
  2016-06-14 11:06:54 +0900 [error]: /path/to/fluent-plugin-gcloud-pubsub/lib/fluent/plugin/out_gcloud_pubsub.rb:49:in `block in write'
  2016-06-14 11:06:54 +0900 [error]: /path/to/fluent-plugin-gcloud-pubsub/vendor/bundle/ruby/2.2.0/gems/fluentd-0.14.0/lib/fluent/event.rb:194:in `each'
  2016-06-14 11:06:54 +0900 [error]: /path/to/fluent-plugin-gcloud-pubsub/vendor/bundle/ruby/2.2.0/gems/fluentd-0.14.0/lib/fluent/event.rb:194:in `block in each'
  2016-06-14 11:06:54 +0900 [error]: /path/to/fluent-plugin-gcloud-pubsub/vendor/bundle/ruby/2.2.0/gems/fluentd-0.14.0/lib/fluent/plugin/buffer/memory_chunk.rb:90:in `open'
  2016-06-14 11:06:54 +0900 [error]: /path/to/fluent-plugin-gcloud-pubsub/vendor/bundle/ruby/2.2.0/gems/fluentd-0.14.0/lib/fluent/plugin/buffer/memory_chunk.rb:90:in `open'
  2016-06-14 11:06:54 +0900 [error]: /path/to/fluent-plugin-gcloud-pubsub/vendor/bundle/ruby/2.2.0/gems/fluentd-0.14.0/lib/fluent/event.rb:193:in `each'
  2016-06-14 11:06:54 +0900 [error]: /path/to/fluent-plugin-gcloud-pubsub/lib/fluent/plugin/out_gcloud_pubsub.rb:48:in `write'
  2016-06-14 11:06:54 +0900 [error]: /path/to/fluent-plugin-gcloud-pubsub/vendor/bundle/ruby/2.2.0/gems/fluentd-0.14.0/lib/fluent/compat/output.rb:118:in `write'
  2016-06-14 11:06:54 +0900 [error]: /path/to/fluent-plugin-gcloud-pubsub/vendor/bundle/ruby/2.2.0/gems/fluentd-0.14.0/lib/fluent/plugin/output.rb:778:in `try_flush'
  2016-06-14 11:06:54 +0900 [error]: /path/to/fluent-plugin-gcloud-pubsub/vendor/bundle/ruby/2.2.0/gems/fluentd-0.14.0/lib/fluent/plugin/output.rb:953:in `flush_thread_run'
  2016-06-14 11:06:54 +0900 [error]: /path/to/fluent-plugin-gcloud-pubsub/vendor/bundle/ruby/2.2.0/gems/fluentd-0.14.0/lib/fluent/plugin/output.rb:360:in `block (2 levels) in start'
  2016-06-14 11:06:54 +0900 [error]: /path/to/fluent-plugin-gcloud-pubsub/vendor/bundle/ruby/2.2.0/gems/fluentd-0.14.0/lib/fluent/plugin_helper/thread.rb:66:in `block in thread_create'

My fluent.conf is below:

<source>
  @type tail
  path /path/to/dummy.log
  pos_file /path/to/dummy.log.pos
  tag test.testlog
  format ltsv
</source>

<match test.**>
  @type gcloud_pubsub
  @id out_pubsub
  project my-project
  topic my-topic
  autocreate_topic true
  key /path/to/keyfile.json
</match>

Sample log:

id:0363 time:[2016-06-13 18:14:42]  level:DEBUG method:PUT  uri:/api/v1/people  reqtime:3.6950025457668514  foobar:UNpTAPOS text:あ

mia-0032 avatar Jun 14 '16 02:06 mia-0032