データレイクの入門ハンズオンである aws-s3-datalake-handson を進めておりますが、Lab2のセクションで、Fluentd から Elasticsearch Service にログデータを送信するための設定がどうしても失敗して原因が解明できておりません。
/etc/td-agent/td-agent.conf
の設定ファイルは以下のように設定しております。
<source> @type tail path /root/es-demo/testapp.log pos_file /var/log/td-agent/testapp.log.pos format /^[(?<timestamp>[^ ]* [^ ]*)] (?<alarmlevel>[^ ]*) *? (?<host>[^ ]*) * (?<user>[^ ]*) * (?<number>.*) [(?<text>.*)]$/ time_format %d/%b/%Y:%H:%M:%S %z types size:integer, status:integer, reqtime:float, runtime:float, time:time tag testappec2.log </source> <match testappec2.log> type_name testappec2log @type elasticsearch include_tag_key true tag_key @log_name host search-handson-minilake-jvzlsqtbqnp523uvvuhpmh54dq.ap-northeast-1.es.amazonaws.com port 443 scheme https logstash_format true logstash_prefix testappec2log flush_interval 10s retry_limit 5 buffer_type file buffer_path /var/log/td-agent/buffer/testapp.log.buffer reload_connections false user aesadmin password My#Password1 </match>
ハンズオンの手順と異なるのは、ElasticSearchのマスターパスワード設定時に特殊文字を含めなければならなくなっていたので「#」をパスワード内に付け加えました。それ以外は手順通り進め、2回繰り返したので間違いないかと思います。
他にも色々記事をあたり、URLパラメーターに特殊文字が使えないために、「#」 => 「%23」に設定変更してみましたがダメでした。
こちらのエラーが出力されます。
[root@ip-10-0-0-21 td-agent]# tail -f /var/log/td-agent/td-agent.log 2021-07-04 09:44:16 +0900 [warn]: #0 failed to flush the buffer. retry_time=1 next_retry_seconds=2021-07-04 09:44:15 +0900 chunk="5c6417c2103f99dd31bf3c6481127b03" error_class=Elasticsearch::Transport::Transport::Errors::Unauthorized error="[401] " 2021-07-04 09:44:16 +0900 [warn]: #0 suppressed same stacktrace 2021-07-04 09:44:18 +0900 [warn]: #0 failed to flush the buffer. retry_time=2 next_retry_seconds=2021-07-04 09:44:17 +0900 chunk="5c6417c2103f99dd31bf3c6481127b03" error_class=Elasticsearch::Transport::Transport::Errors::Unauthorized error="[401] " 2021-07-04 09:44:18 +0900 [warn]: #0 suppressed same stacktrace 2021-07-04 09:44:23 +0900 [warn]: #0 failed to flush the buffer. retry_time=3 next_retry_seconds=2021-07-04 09:44:23 +0900 chunk="5c6417c2103f99dd31bf3c6481127b03" error_class=Elasticsearch::Transport::Transport::Errors::Unauthorized error="[401] " 2021-07-04 09:44:23 +0900 [warn]: #0 suppressed same stacktrace 2021-07-04 09:44:31 +0900 [warn]: #0 failed to flush the buffer. retry_time=4 next_retry_seconds=2021-07-04 09:44:30 +0900 chunk="5c6417c2103f99dd31bf3c6481127b03" error_class=Elasticsearch::Transport::Transport::Errors::Unauthorized error="[401] " 2021-07-04 09:44:31 +0900 [warn]: #0 suppressed same stacktrace 2021-07-04 09:44:49 +0900 [error]: #0 failed to flush the buffer, and hit limit for retries. dropping all chunks in the buffer queue. retry_times=5 records=6 error_class=Elasticsearch::Transport::Transport::Errors::Unauthorized error="[401] " 2021-07-04 09:44:49 +0900 [error]: #0 suppressed same stacktrace 2021-07-04 09:46:13 +0900 [warn]: #0 failed to flush the buffer. retry_time=0 next_retry_seconds=2021-07-04 09:46:14 +0900 chunk="5c64183499986a4c8755cf63f5fafb51" error_class=Elasticsearch::Transport::Transport::Errors::Unauthorized error="[401] " 2021-07-04 09:46:13 +0900 [warn]: #0 suppressed same stacktrace 2021-07-04 09:46:14 +0900 [warn]: #0 failed to flush the buffer. retry_time=0 next_retry_seconds=2021-07-04 09:46:14 +0900 chunk="5c64183499986a4c8755cf63f5fafb51" error_class=Elasticsearch::Transport::Transport::Errors::Unauthorized error="[401] " 2021-07-04 09:46:14 +0900 [warn]: #0 suppressed same stacktrace 2021-07-04 09:46:16 +0900 [warn]: #0 failed to flush the buffer. retry_time=1 next_retry_seconds=2021-07-04 09:46:15 +0900 chunk="5c64183499986a4c8755cf63f5fafb51" error_class=Elasticsearch::Transport::Transport::Errors::Unauthorized error="[401] " 2021-07-04 09:46:16 +0900 [warn]: #0 suppressed same stacktrace 2021-07-04 09:46:19 +0900 [warn]: #0 failed to flush the buffer. retry_time=2 next_retry_seconds=2021-07-04 09:46:18 +0900 chunk="5c64183499986a4c8755cf63f5fafb51" error_class=Elasticsearch::Transport::Transport::Errors::Unauthorized error="[401] " 2021-07-04 09:46:19 +0900 [warn]: #0 suppressed same stacktrace 2021-07-04 09:46:23 +0900 [warn]: #0 failed to flush the buffer. retry_time=3 next_retry_seconds=2021-07-04 09:46:23 +0900 chunk="5c64183499986a4c8755cf63f5fafb51" error_class=Elasticsearch::Transport::Transport::Errors::Unauthorized error="[401] " 2021-07-04 09:46:23 +0900 [warn]: #0 suppressed same stacktrace 2021-07-04 09:46:31 +0900 [warn]: #0 failed to flush the buffer. retry_time=4 next_retry_seconds=2021-07-04 09:46:31 +0900 chunk="5c64183499986a4c8755cf63f5fafb51" error_class=Elasticsearch::Transport::Transport::Errors::Unauthorized error="[401] " 2021-07-04 09:46:31 +0900 [warn]: #0 suppressed same stacktrace 2021-07-04 09:46:46 +0900 [error]: #0 failed to flush the buffer, and hit limit for retries. dropping all chunks in the buffer queue. retry_times=5 records=18 error_class=Elasticsearch::Transport::Transport::Errors::Unauthorized error="[401] " 2021-07-04 09:46:46 +0900 [error]: #0 suppressed same stacktrace
成功すれば以下のログが出力されるようです
[info]: #0 Connection opened to Elasticsearch cluster => {.....
handsonを同じようにして進めた方で突破された方、解決策に心当たりのある方は、ご教示頂けると幸いです。
宜しくお願いします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2021/07/04 15:20 編集
2021/07/04 16:32
2021/07/05 00:51
2021/07/05 07:54
2021/07/05 11:10