2
votes

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.

2

2 Answers

1
votes

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.

-2
votes

Because of systemd, the following might work :

$ sudo systemctl start td-agent
$ sudo systemctl status td-agent