Fluentd: Unable to start FluentD

Created on 2 Feb 2018  路  7Comments  路  Source: fluent/fluentd

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

[root@localhost ~]# /etc/init.d/td-agent start
Starting td-agent (via systemctl):  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.
                                                           [FAILED]
[root@localhost ~]# journalctl -xe
--
-- Unit td-agent.service has failed.
--
-- The result is failed.
Feb 02 17:10:05 localhost systemd[1]: Unit td-agent.service entered failed state.
Feb 02 17:10:05 localhost systemd[1]: td-agent.service failed.
Feb 02 17:10:05 localhost systemd[1]: td-agent.service holdoff time over, scheduling restart.
Feb 02 17:10:05 localhost systemd[1]: Starting td-agent: Fluentd based data collector for Treasure Data...
-- Subject: Unit td-agent.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit td-agent.service has begun starting up.
Feb 02 17:10:05 localhost fluentd[10544]: /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 17:10:05 localhost fluentd[10544]: from /opt/td-agent/embedded/lib/ruby/site_ruby/2.1.0/rubygems.rb:299:in `activate_bin_path'
Feb 02 17:10:05 localhost fluentd[10544]: from /opt/td-agent/embedded/bin/fluentd:23:in `<main>'
Feb 02 17:10:05 localhost systemd[1]: td-agent.service: control process exited, code=exited status=1
Feb 02 17:10:05 localhost 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.

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

Most helpful comment

Hi.

In /lib/systemd/system/td-agent.service, GEM_HOME and GEM_PATH have been set following.
Environment=GEM_HOME=/opt/td-agent/embedded/lib/ruby/gems/2.4.0/
Environment=GEM_PATH=/opt/td-agent/embedded/lib/ruby/gems/2.4.0/

I uninstalled td-agent3, and I installed td-agent2 again.
I changed version 2.4.0 to 2.1.0 in this file to resolve.

And,
# systemctl daemon-reload
# systemctl start td-agent

I have resolved the issue.
I guess that is occurred to uninstall "td-agent3" and to install "td-agent2".

All 7 comments

Please follow CONTRIBUTING guide: https://github.com/fluent/fluentd/blob/master/CONTRIBUTING.md
Closed for now.

@rolindroy I have same problem in ubuntu 16.04. Do you know how to deal?

+1

If I uninstall td-agent and install, the error goes away sometimes.
But not sure what causing it.

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.

> journalctl -xe returns

Mar 19 12:36:09 L7RS fluentd[10232]:         from /opt/td-agent/embedded/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
Mar 19 12:36:09 L7RS fluentd[10232]:         from /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-0.14.25/bin/fluentd:8:in `<top (required)>'
Mar 19 12:36:09 L7RS fluentd[10232]:         from /opt/td-agent/embedded/bin/fluentd:22:in `load'
Mar 19 12:36:09 L7RS fluentd[10232]:         from /opt/td-agent/embedded/bin/fluentd:22:in `<main>'
Mar 19 12:36:09 L7RS systemd[1]: td-agent.service: Control process exited, code=exited status=1
Mar 19 12:36:09 L7RS 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.
Mar 19 12:36:09 L7RS systemd[1]: td-agent.service: Unit entered failed state.
Mar 19 12:36:09 L7RS systemd[1]: td-agent.service: Failed with result 'exit-code'.
Mar 19 12:36:09 L7RS systemd[1]: td-agent.service: Service hold-off time over, scheduling restart.
Mar 19 12:36:09 L7RS 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.
Mar 19 12:36:09 L7RS systemd[1]: Starting td-agent: Fluentd based data collector for Treasure Data...
-- Subject: Unit td-agent.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit td-agent.service has begun starting up.

I have resolved the issue by removing td-agent completely and re-installed with td-agent3.sh script.
Now Its working perfectly.

curl -L https://toolbelt.treasuredata.com/sh/install-redhat-td-agent3.sh | sh

Hi.

In /lib/systemd/system/td-agent.service, GEM_HOME and GEM_PATH have been set following.
Environment=GEM_HOME=/opt/td-agent/embedded/lib/ruby/gems/2.4.0/
Environment=GEM_PATH=/opt/td-agent/embedded/lib/ruby/gems/2.4.0/

I uninstalled td-agent3, and I installed td-agent2 again.
I changed version 2.4.0 to 2.1.0 in this file to resolve.

And,
# systemctl daemon-reload
# systemctl start td-agent

I have resolved the issue.
I guess that is occurred to uninstall "td-agent3" and to install "td-agent2".

@sesame thank you

Was this page helpful?
0 / 5 - 0 ratings

Related issues

amread picture amread  路  5Comments

sradco picture sradco  路  3Comments

repeatedly picture repeatedly  路  7Comments

JayTeli picture JayTeli  路  4Comments

kakalo24 picture kakalo24  路  3Comments