2

I have installed fluentD(td-agent) version 2 in CentOs 7. Now I'm unable to start td-agent. While starting td-agent it was throwing some error

-- Unit td-agent.service has begun starting up. Feb 02 14:53:39 chninitefk01 fluentd[2282]: /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) Feb 02 14:53:39 chninitefk01 fluentd[2282]: from /opt/td-agent/embedded/lib/ruby/site_ruby/2.1.0/rubygems.rb:299:in activate_bin_path' Feb 02 14:53:39 chninitefk01 fluentd[2282]: from /opt/td-agent/embedded/bin/fluentd:23:in `' Feb 02 14:53:39 chninitefk01 systemd[1]: td-agent.service: control process exited, code=exited status=1 Feb 02 14:53:39 chninitefk01 systemd[1]: Failed to start td-agent: Fluentd based data collector for Treasure Data. -- Subject: Unit td-agent.service has failed -- Defined-By: systemd

I have tried to install fluentD gem using td-agent-gem install fluentD, but that doesn't make any difference.

rolz
  • 591
  • 2
  • 11
  • 23

2 Answers2

3

Try running td-agent in dry run mode td-agent --dry-run. It will give you an idea what's wrong. It could be an issue of permissions. Has the plugin installed? you can check with /usr/sbin/td-agent-gem list. Check if it's installed.

Update: You do not need to install fluentd gem, it's already there. The probable cause could be permissions, running with non-sudo while installed as one or ruby.

Riz
  • 1,131
  • 1
  • 9
  • 12
-1

Because of systemd, the following might work :

$ sudo systemctl start td-agent
$ sudo systemctl status td-agent
Jean
  • 197
  • 10