Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Unexpected error during message publishing: "\xD0" from ASCII-8BIT to UTF-8 #60

Open
maxpain opened this issue Mar 29, 2019 · 0 comments
Labels

Comments

@maxpain
Copy link

maxpain commented Mar 29, 2019

Hi. I see those errors in fluentd logs and any logs with Russian letters (Cyrillic) doesn't process by amqp plugin.

I'm use CRI-O.

Config:

<source>
  @type tail
  path /var/log/containers/gameserver-*.log
  pos_file /var/log/fluentd-containers.log.pos
  refresh_interval 2
  rotate_wait 5
  read_from_head true
  time_format %Y-%m-%dT%H:%M:%S.%N%:z
  <parse>
    @type regexp
    expression /^(?<time>.+) (?<stream>\w+) (?<partial_flag>[FP]) (?<log>.*)$/
  </parse>
  tag kubernetes.*
  @label @CONCAT
</source>

<label @CONCAT>
  <filter kubernetes.**>
    @type concat
    key log
    partial_key partial_flag
    partial_value P
    separator ""
  </filter>
  <match kubernetes.**>
    @type relabel
    @label @OUTPUT
  </match>
</label>

<label @OUTPUT>
  <filter kubernetes.**>
    @type kubernetes_metadata
    @id filter_kube_metadata
  </filter>
  <match kubernetes.**>
    @type amqp
    @id out_amqp
    flush_interval 1s
    key "#{ENV['AMQP_KEY'] || 'fluent'}"
    exchange "#{ENV['AMQP_EXCHANGE'] || 'amq.direct'}"
    host "#{ENV['AMQP_SERVER'] || 'hostname_goes_here'}"
    port "#{ENV['AMQP_PORT'] || '5672'}"
    vhost "#{ENV['AMQP_VHOST'] || '/'}"
    user "#{ENV['AMQP_USER'] || 'guest'}"
    pass "#{ENV['AMQP_PASS'] || 'guest'}"
    passive "#{ENV['AMQP_PASSIVE'] || 'true'}"
    <header>
      name X-GameServer-ID
      source kubernetes.labels.id
    </header>
    <buffer>
      flush_at_shutdown true
      flush_mode immediate
      flush_thread_count 8
      flush_thread_interval 1
      flush_thread_burst_interval 1
      retry_forever true
      retry_type exponential_backoff
    </buffer>
  </match>
</label>
2019-03-29 18:04:21 +0000 [error]: #0 [out_amqp] Unexpected error during message publishing: "\xD1" from ASCII-8BIT to UTF-8
2019-03-29 18:04:24 +0000 [error]: #0 [out_amqp] Unexpected error during message publishing: "\xD0" from ASCII-8BIT to UTF-8
2019-03-29 18:04:24 +0000 [error]: #0 [out_amqp] Unexpected error during message publishing: "\xD0" from ASCII-8BIT to UTF-8
@warmfusion warmfusion added the bug label Apr 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants