CentOS错误使用“service td-agent status”

时间:2013-10-08 03:05:37

标签: centos fluentd

我在CentOS中使用td-agent。

当我输入“service td-agent start”时,我看到“Starting td-agent:[OK]”。 为了检查它,我键入了“service td-agent status”,但我看到“td-agent dead但pid文件存在”。 我不明白这个结果。 请告诉我如何解决这个问题。

更 当我输入“service td-agent start”时,我看到了这条消息。

Starting td-agent: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.39/lib/fluent/supervisor.rb:30:in `initialize': Permission denied - /var/log/td-agent/td-agent.log (Errno::EACCES)
from /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.39/lib/fluent/supervisor.rb:30:in `open'
from /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.39/lib/fluent/supervisor.rb:30:in `init'
from /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.39/lib/fluent/supervisor.rb:79:in `start'
from /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.39/lib/fluent/command/fluentd.rb:141:in `<top (required)>'
from /usr/lib64/fluent/ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from /usr/lib64/fluent/ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.39/bin/fluentd:6:in `<top (required)>'
from /usr/lib64/fluent/ruby/bin/fluentd:23:in `load'
from /usr/lib64/fluent/ruby/bin/fluentd:23:in `<top (required)>'
from /usr/sbin/td-agent:7:in `load'
from /usr/sbin/td-agent:7:in `<main>'
                                                       [FAILED]

2 个答案:

答案 0 :(得分:1)

看起来是权限问题,但您仍然可以检查以下链接以在http://docs.treasure-data.com/articles/td-agent上安装和正确配置td-agent

它还有redhat / centos / ubuntu的安装说明。

谢谢&amp;问候,
Alok Thaker

答案 1 :(得分:0)

除了按照上面的建议检查权限之外,在重新启动td-agent之前删除pid文件。启动服务时,pid文件会跟踪td-agent的进程ID。如果您的位置不在/ var / run / td-agent /,请检查/etc/init.d/td-agent并查找$ PIDFILE

之类的内容