2

我在 CentOS 中使用 td-agent。

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

更多当我输入“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]
4

2 回答 2

1

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

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

谢谢和问候,
阿洛克·塔克

于 2013-10-08T07:30:12.597 回答
0

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

于 2014-06-24T18:25:20.067 回答