現象
- fluentd-0.14.21でfluent-plugin-forestとfluent-plugin-s3を同時に使用すると動かなくなる
入っているもの一覧
OS AmazonLinux(4.9.58-18.51.amzn1.x86_64)
# td-agent-gem list | grep aws aws-partitions (1.27.0) aws-sdk (2.10.45) aws-sdk-core (3.0.0, 2.10.85) aws-sdk-ec2 (1.1.0) aws-sdk-resources (2.10.45) aws-sigv4 (1.0.2) td-agent-gem list | grep fluent fluent-logger (0.7.1) fluent-mixin-config-placeholders (0.4.0) fluent-mixin-plaintextformatter (0.2.6) fluent-plugin-ec2-metadata (0.1.1) fluent-plugin-file-alternative (0.2.2) fluent-plugin-forest (0.3.3) fluent-plugin-kafka (0.6.1) fluent-plugin-mongo (0.8.1) fluent-plugin-rewrite-tag-filter (1.5.6) fluent-plugin-s3 (0.8.5) fluent-plugin-scribe (0.10.14) fluent-plugin-tail-ex (0.1.1) fluent-plugin-td (0.10.29) fluent-plugin-td-monitoring (0.2.3) fluent-plugin-webhdfs (0.7.1) fluentd (0.14.21, 0.12.40) fluentd-ui (0.4.4)
発生するログ
2017-11-17 06:08:11 +0000 [error]: #0 failed to configure/start sub output s3: Unable to activate aws-sdk-resources-2.10.45, because aws-sdk-core-3.0.0 conflicts with aws-sdk-core (= 2.10.45) 2017-11-17 06:08:11 +0000 [error]: #0 /opt/td-agent/embedded/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:2290:in `raise_if_conflicts' /opt/td-agent/embedded/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:1410:in `activate' /opt/td-agent/embedded/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:1444:in `block in activate_dependencies' /opt/td-agent/embedded/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:1430:in `each' /opt/td-agent/embedded/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:1430:in `activate_dependencies' /opt/td-agent/embedded/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:1412:in `activate'
導入手順
curl -L https://toolbelt.treasuredata.com/sh/install-redhat-td-agent2.sh | sh td-agent-gem install fluent-plugin-s3 td-agent-gem install fluent-plugin-forest td-agent-gem install fluent-plugin-tail-ex td-agent-gem install fluent-plugin-ec2-metadata td-agent-gem install fluent-plugin-file-alternative
使用しているコンフィグ(マスク済み)
<source> @type tail path /var/log/test.log tag test pos_file /var/log/td-agent/pos/test.log format 'none' </source> <match test> @type ec2_metadata output_tag ${instance_id} <record> hostname ${tagset_name} instance_id ${instance_id} instance_type ${instance_type} az ${availability_zone} vpc_id ${vpc_id} </record> </match> <match **> type forest subtype s3 <template> s3_bucket log-test-bucket s3_region ap-northeast-1 buffer_path /var/log/td-agent/buffer/${tag} time_slice_format test/${tag_parts[0]}/${hostname}/%Y/%m/%d/${tag_parts[1..-1]}-%Y-%m-%d-%H flush_at_shutdown true flush_interval 1s </template> </match>
試したこと
以下のコマンドを試しました。
(いろんなバージョンをsdk-coreのみでなく、aws-sdkにも入れたり抜いたりしました)
td-agent-gem uninstall aws-sdk-core -v 3.6.0
困っていること
td-agent自体は、/etc/init.d/td-agent startで起動するのですが、いざ、sourceに当てはまるログに書き込みがされると
[error]: #0 Cannot output messages with tag 'fluent.info'
のログが発生してしまいます。
s3pluginを使用しない場合はきちんとoutput_tagも反映されるのですがどうしたら良いでしょうか。
以上、よろしくおねがいいたします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。