Skip to content

Instantly share code, notes, and snippets.

@mikoim
Created September 17, 2015 04:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikoim/daaa78e14fc7c431b462 to your computer and use it in GitHub Desktop.
Save mikoim/daaa78e14fc7c431b462 to your computer and use it in GitHub Desktop.
How to fix td-agent installation error
The following NEW packages will be installed:
td-agent
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/59.2 MB of archives.
After this operation, 211 MB of additional disk space will be used.
Selecting previously unselected package td-agent.
(Reading database ... 94733 files and directories currently installed.)
Preparing to unpack .../td-agent_2.2.1-0_amd64.deb ...
Unpacking td-agent (2.2.1-0) ...
Setting up td-agent (2.2.1-0) ...
Installing default conffile /etc/td-agent/td-agent.conf ...
* Starting td-agent td-agent /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.12.12/lib/fluent/supervisor.rb:49:in `initialize': Permission denied @ rb_sysopen - /var/log/td-agent/td-agent.log (Errno::EACCES)
from /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.12.12/lib/fluent/supervisor.rb:49:in `open'
from /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.12.12/lib/fluent/supervisor.rb:49:in `init'
from /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.12.12/lib/fluent/supervisor.rb:126:in `start'
from /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.12.12/lib/fluent/command/fluentd.rb:167:in `<top (required)>'
from /opt/td-agent/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
from /opt/td-agent/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
from /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.12.12/bin/fluentd:6:in `<top (required)>'
from /opt/td-agent/embedded/bin/fluentd:23:in `load'
from /opt/td-agent/embedded/bin/fluentd:23:in `<top (required)>'
from /usr/sbin/td-agent:7:in `load'
from /usr/sbin/td-agent:7:in `<main>'
[fail]
invoke-rc.d: initscript td-agent, action "start" failed.
dpkg: error processing package td-agent (--configure):
subprocess installed post-installation script returned error exit status 1
E: Sub-process /usr/bin/dpkg returned an error code (1)
#!/bin/sh
chown td-agent:td-agent /var/log/td-agent
@Xrampino
Copy link

Xrampino commented Jul 4, 2016

Appreciated!

@alogoc
Copy link

alogoc commented Jun 20, 2018

Seems that it's still an issue with td-agent3, cheers 👍

@mrust1
Copy link

mrust1 commented Jan 16, 2019

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment