質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.47%
Linux

Linuxは、Unixをベースにして開発されたオペレーティングシステムです。日本では「リナックス」と呼ばれています。 主にWebサーバやDNSサーバ、イントラネットなどのサーバ用OSとして利用されています。 上位500のスーパーコンピュータの90%以上はLinuxを使用しています。 携帯端末用のプラットフォームAndroidは、Linuxカーネル上に構築されています。

Ubuntu

Ubuntuは、Debian GNU/Linuxを基盤としたフリーのオペレーティングシステムです。

Q&A

解決済

1回答

7643閲覧

td-agentの起動に失敗する

fen57

総合スコア47

Linux

Linuxは、Unixをベースにして開発されたオペレーティングシステムです。日本では「リナックス」と呼ばれています。 主にWebサーバやDNSサーバ、イントラネットなどのサーバ用OSとして利用されています。 上位500のスーパーコンピュータの90%以上はLinuxを使用しています。 携帯端末用のプラットフォームAndroidは、Linuxカーネル上に構築されています。

Ubuntu

Ubuntuは、Debian GNU/Linuxを基盤としたフリーのオペレーティングシステムです。

0グッド

0クリップ

投稿2020/08/31 08:14

編集2020/08/31 09:34

前提・実現したいこと

以下のコマンドでtd-agentをインストールしました。

$ sudo curl -L https://toolbelt.treasuredata.com/sh/install-ubuntu-xenial-td-agent2.sh | sh

発生している問題・エラーメッセージ

td-agentを起動しようとするとエラーが出て失敗してしまいます。

$ sudo systemctl start td-agent.service Job for td-agent.service failed because the control process exited with error code. See "systemctl status td-agent.service" and "journalctl -xe" for details. $ sudo systemctl status td-agent.service ● td-agent.service - td-agent: Fluentd based data collector for Treasure Data Loaded: loaded (/lib/systemd/system/td-agent.service; disabled; vendor preset: enabled) Active: failed (Result: start-limit-hit) since Mon 2020-08-31 08:02:27 UTC; 2min 7s ago Docs: https://docs.treasuredata.com/articles/td-agent Process: 25841 ExecStart=/opt/td-agent/embedded/bin/fluentd --log $TD_AGENT_LOG_FILE --daemon /var/run/td-agent/td-agent.pid $TD_AGENT_OPTIONS (code=exited, status=1/FAILURE) Aug 31 08:02:26 ubuntu16-td-agent systemd[1]: td-agent.service: Control process exited, code=exited status=1 Aug 31 08:02:26 ubuntu16-td-agent systemd[1]: Failed to start td-agent: Fluentd based data collector for Treasure Data. Aug 31 08:02:26 ubuntu16-td-agent systemd[1]: td-agent.service: Unit entered failed state. Aug 31 08:02:26 ubuntu16-td-agent systemd[1]: td-agent.service: Failed with result 'exit-code'. Aug 31 08:02:27 ubuntu16-td-agent systemd[1]: td-agent.service: Service hold-off time over, scheduling restart. Aug 31 08:02:27 ubuntu16-td-agent systemd[1]: Stopped td-agent: Fluentd based data collector for Treasure Data. Aug 31 08:02:27 ubuntu16-td-agent systemd[1]: td-agent.service: Start request repeated too quickly. Aug 31 08:02:27 ubuntu16-td-agent systemd[1]: Failed to start td-agent: Fluentd based data collector for Treasure Data. Aug 31 08:02:27 ubuntu16-td-agent systemd[1]: td-agent.service: Unit entered failed state. Aug 31 08:02:27 ubuntu16-td-agent systemd[1]: td-agent.service: Failed with result 'start-limit-hit'.

追記
journalctl -xe のログです。

-- Unit td-agent.service has begun starting up. Aug 31 09:19:44 h fluentd[26826]: /opt/td-agent/embedded/lib/ruby/site_ruby/2.1.0/rubygems.rb:271:in `find_spec_for_exe': can't find gem fluentd (>= 0.a) (Gem::GemNotFoundException) Aug 31 09:19:44 h fluentd[26826]: from /opt/td-agent/embedded/lib/ruby/site_ruby/2.1.0/rubygems.rb:299:in `activate_bin_path' Aug 31 09:19:44 h fluentd[26826]: from /opt/td-agent/embedded/bin/fluentd:23:in `<main>' Aug 31 09:19:44 h systemd[1]: td-agent.service: Control process exited, code=exited status=1 Aug 31 09:19:44 h systemd[1]: Failed to start td-agent: Fluentd based data collector for Treasure Data. -- Subject: Unit td-agent.service has failed -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit td-agent.service has failed. -- -- The result is failed. Aug 31 09:19:44 h systemd[1]: td-agent.service: Unit entered failed state. Aug 31 09:19:44 h systemd[1]: td-agent.service: Failed with result 'exit-code'. Aug 31 09:19:44 h systemd[1]: td-agent.service: Service hold-off time over, scheduling restart. Aug 31 09:19:44 h systemd[1]: Stopped td-agent: Fluentd based data collector for Treasure Data. -- Subject: Unit td-agent.service has finished shutting down -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit td-agent.service has finished shutting down. Aug 31 09:19:44 h systemd[1]: td-agent.service: Start request repeated too quickly. Aug 31 09:19:44 h systemd[1]: Failed to start td-agent: Fluentd based data collector for Treasure Data. -- Subject: Unit td-agent.service has failed -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit td-agent.service has failed. -- -- The result is failed. Aug 31 09:19:44 h systemd[1]: td-agent.service: Unit entered failed state. Aug 31 09:19:44 h systemd[1]: td-agent.service: Failed with result 'start-limit-hit'.

syslogの出力です。

Aug 31 09:27:39 h systemd[1]: Starting td-agent: Fluentd based data collector for Treasure Data... Aug 31 09:27:39 h fluentd[27317]: /opt/td-agent/embedded/lib/ruby/site_ruby/2.1.0/rubygems.rb:271:in `find_spec_for_exe': can't find gem fluentd (>= 0.a) (Gem::GemNotFoundException) Aug 31 09:27:39 h fluentd[27317]: #011from /opt/td-agent/embedded/lib/ruby/site_ruby/2.1.0/rubygems.rb:299:in `activate_bin_path' Aug 31 09:27:39 h fluentd[27317]: #011from /opt/td-agent/embedded/bin/fluentd:23:in `<main>' Aug 31 09:27:39 h systemd[1]: td-agent.service: Control process exited, code=exited status=1 Aug 31 09:27:39 h systemd[1]: Failed to start td-agent: Fluentd based data collector for Treasure Data. Aug 31 09:27:39 h systemd[1]: td-agent.service: Unit entered failed state. Aug 31 09:27:39 h systemd[1]: td-agent.service: Failed with result 'exit-code'. Aug 31 09:27:39 h systemd[1]: td-agent.service: Service hold-off time over, scheduling restart. Aug 31 09:27:39 h systemd[1]: Stopped td-agent: Fluentd based data collector for Treasure Data. Aug 31 09:27:39 h systemd[1]: Starting td-agent: Fluentd based data collector for Treasure Data... Aug 31 09:27:39 h fluentd[27322]: /opt/td-agent/embedded/lib/ruby/site_ruby/2.1.0/rubygems.rb:271:in `find_spec_for_exe': can't find gem fluentd (>= 0.a) (Gem::GemNotFoundException) Aug 31 09:27:39 h fluentd[27322]: #011from /opt/td-agent/embedded/lib/ruby/site_ruby/2.1.0/rubygems.rb:299:in `activate_bin_path' Aug 31 09:27:39 h fluentd[27322]: #011from /opt/td-agent/embedded/bin/fluentd:23:in `<main>' Aug 31 09:27:39 h systemd[1]: td-agent.service: Control process exited, code=exited status=1 Aug 31 09:27:39 h systemd[1]: Failed to start td-agent: Fluentd based data collector for Treasure Data. Aug 31 09:27:39 h systemd[1]: td-agent.service: Unit entered failed state. Aug 31 09:27:39 h systemd[1]: td-agent.service: Failed with result 'exit-code'. Aug 31 09:27:40 h systemd[1]: td-agent.service: Service hold-off time over, scheduling restart. Aug 31 09:27:40 h systemd[1]: Stopped td-agent: Fluentd based data collector for Treasure Data. Aug 31 09:27:40 h systemd[1]: Starting td-agent: Fluentd based data collector for Treasure Data... Aug 31 09:27:40 h fluentd[27327]: /opt/td-agent/embedded/lib/ruby/site_ruby/2.1.0/rubygems.rb:271:in `find_spec_for_exe': can't find gem fluentd (>= 0.a) (Gem::GemNotFoundException) Aug 31 09:27:40 h fluentd[27327]: #011from /opt/td-agent/embedded/lib/ruby/site_ruby/2.1.0/rubygems.rb:299:in `activate_bin_path' Aug 31 09:27:40 h fluentd[27327]: #011from /opt/td-agent/embedded/bin/fluentd:23:in `<main>' Aug 31 09:27:40 h systemd[1]: td-agent.service: Control process exited, code=exited status=1 Aug 31 09:27:40 h systemd[1]: Failed to start td-agent: Fluentd based data collector for Treasure Data. Aug 31 09:27:40 h systemd[1]: td-agent.service: Unit entered failed state. Aug 31 09:27:40 h systemd[1]: td-agent.service: Failed with result 'exit-code'. Aug 31 09:27:40 h systemd[1]: td-agent.service: Service hold-off time over, scheduling restart. Aug 31 09:27:40 h systemd[1]: Stopped td-agent: Fluentd based data collector for Treasure Data. Aug 31 09:27:40 h systemd[1]: Starting td-agent: Fluentd based data collector for Treasure Data... Aug 31 09:27:40 h fluentd[27332]: /opt/td-agent/embedded/lib/ruby/site_ruby/2.1.0/rubygems.rb:271:in `find_spec_for_exe': can't find gem fluentd (>= 0.a) (Gem::GemNotFoundException) Aug 31 09:27:40 h fluentd[27332]: #011from /opt/td-agent/embedded/lib/ruby/site_ruby/2.1.0/rubygems.rb:299:in `activate_bin_path' Aug 31 09:27:40 h fluentd[27332]: #011from /opt/td-agent/embedded/bin/fluentd:23:in `<main>' Aug 31 09:27:40 h systemd[1]: td-agent.service: Control process exited, code=exited status=1 Aug 31 09:27:40 h systemd[1]: Failed to start td-agent: Fluentd based data collector for Treasure Data. Aug 31 09:27:40 h systemd[1]: td-agent.service: Unit entered failed state. Aug 31 09:27:40 h systemd[1]: td-agent.service: Failed with result 'exit-code'. Aug 31 09:27:40 h systemd[1]: td-agent.service: Service hold-off time over, scheduling restart. Aug 31 09:27:40 h systemd[1]: Stopped td-agent: Fluentd based data collector for Treasure Data. Aug 31 09:27:40 h systemd[1]: Starting td-agent: Fluentd based data collector for Treasure Data... Aug 31 09:27:40 h fluentd[27337]: /opt/td-agent/embedded/lib/ruby/site_ruby/2.1.0/rubygems.rb:271:in `find_spec_for_exe': can't find gem fluentd (>= 0.a) (Gem::GemNotFoundException) Aug 31 09:27:40 h fluentd[27337]: #011from /opt/td-agent/embedded/lib/ruby/site_ruby/2.1.0/rubygems.rb:299:in `activate_bin_path' Aug 31 09:27:40 h fluentd[27337]: #011from /opt/td-agent/embedded/bin/fluentd:23:in `<main>' Aug 31 09:27:40 h systemd[1]: td-agent.service: Control process exited, code=exited status=1 Aug 31 09:27:40 h systemd[1]: Failed to start td-agent: Fluentd based data collector for Treasure Data. Aug 31 09:27:40 h systemd[1]: td-agent.service: Unit entered failed state. Aug 31 09:27:40 h systemd[1]: td-agent.service: Failed with result 'exit-code'. Aug 31 09:27:40 h systemd[1]: td-agent.service: Service hold-off time over, scheduling restart. Aug 31 09:27:40 h systemd[1]: Stopped td-agent: Fluentd based data collector for Treasure Data. Aug 31 09:27:40 h systemd[1]: td-agent.service: Start request repeated too quickly. Aug 31 09:27:40 h systemd[1]: Failed to start td-agent: Fluentd based data collector for Treasure Data. Aug 31 09:27:40 h systemd[1]: td-agent.service: Unit entered failed state. Aug 31 09:27:40 h systemd[1]: td-agent.service: Failed with result 'start-limit-hit'.

試したこと

変数 $TD_AGENT_LOG_FILE は存在しませんでした。
/etc/td-agent/td-agent.conf は初期の状態から編集していません。
エラーメッセージのURLを参照しても、解決策は書いておらず困っています。
どなたかお力添えいただけないでしょうか。

補足情報(FW/ツールのバージョンなど)

td-agent 0.12.40
Ubuntu 16.04

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

over

2020/08/31 09:00

ご掲載頂いている内容には明示的なエラーが出力されていないように見受けられます 「journalctl -xe」で表示される内容、およびシスログから原因を探る必要があります。
fen57

2020/08/31 09:35

お返事いただきありがとうございます。 journalctl -xeとsyslogの出力を追記しました。文字数制限のため、ホスト名をhで置き換えました。
guest

回答1

0

ベストアンサー

以下事例が見つかりました。
https://github.com/fluent/fluentd/issues/1841

sudo curl -L https://toolbelt.treasuredata.com/sh/install-ubuntu-xenial-td-agent2.sh | sh

インストールしているバージョン古くないですか?
掲載したサイトでは古いバージョンを削除の上、td-agent3をインストールすることで解消したとあります。

投稿2020/08/31 09:41

over

総合スコア4309

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

fen57

2020/08/31 09:54

回答していただきありがとうございます。 今参考にしている書籍が古いバージョンを使っており、新しいバージョンにすると /etc/td-agent/td-agent.conf の記述方法が変わってしまうので、可能であれば古いバージョンを使いたいです。 古いバージョンを動作させる方法は無いでしょうか?
over

2020/08/31 12:58

その書籍にはシステム要件記載されていませんか? そのシステム要件(OSバージョン、Pythonバージョン等)に合わせて環境を構築するしか思い当りません。
fen57

2020/08/31 14:50

書籍のシステム要件通りにサーバーを作成したのですが、動かないので、教えていただいた最新版で動作させることにします。 回答していただきありがとうございました。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.47%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問