Bug 1259700 - Add the directory creation /var/log/td-agent/tmp step in https://access.redhat.com/documentation/en/openshift-enterprise/version-3.0/openshift-enterprise-30-administrator-guide/chapter-5-aggregating-container-logs
Add the directory creation /var/log/td-agent/tmp step in https://access.redha...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Container Platform
Classification: Red Hat
Component: Documentation (Show other bugs)
3.0.0
Unspecified Unspecified
urgent Severity low
: ---
: ---
Assigned To: brice
Vikram Goyal
Vikram Goyal
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-03 07:54 EDT by Miheer Salunke
Modified: 2015-09-23 19:10 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-09-23 19:10:06 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Miheer Salunke 2015-09-03 07:54:45 EDT
Document URL: https://access.redhat.com/documentation/en/openshift-enterprise/version-3.0/openshift-enterprise-30-administrator-guide/chapter-5-aggregating-container-logs

Section Number and Name: 
6.2.1. Installing fluentd (td-agent) on Nodes

Describe the issue: 
After starting td-agent you see the following error in the td-agent.log after following the steps mentioned in the above link-

yum -y localinstall td-agent-2.2.0-0.x86_64.rpm
/opt/td-agent/embedded/bin/gem install fluent-plugin-kubernetes-0.3.1.gem docker-api-1.22.2.gem excon-0.45.4.gem gelf-1.4.0.gem
mkdir -p /etc/td-agent/config.d
chown td-agent:td-agent /etc/td-agent/config.d
echo 'DAEMON_ARGS=' >> /etc/sysconfig/td-agent
echo 'TD_AGENT_ARGS="/usr/sbin/td-agent --log /var/log/td-agent/td-agent.log --use-v1-config"' >> /etc/sysconfig/td-agent
echo "@include config.d/*.conf" >> /etc/td-agent/td-agent.conf
cp out_gelf.rb /etc/td-agent/plugin/
systemctl enable td-agent
systemctl start td-agent

Errors-

2015-08-24 13:39:51 +0200 [info]: listening dRuby uri="druby://127.0.0.1:24230" object="Engine"
2015-08-24 13:39:51 +0200 [error]: unexpected error error_class=Errno::ENOENT error=#<Errno::ENOENT: No such file or directory @ rb_sysopen - /var/log/td-agent/tmp/fluentd-docker.pos>
  2015-08-24 13:39:51 +0200 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.12.7/lib/fluent/plugin/in_tail.rb:78:in `initialize'
  2015-08-24 13:39:51 +0200 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.12.7/lib/fluent/plugin/in_tail.rb:78:in `open'

The .pos file doesn't exists. The source of the problem seems to be the missing folder /var/log/td-agent/tmp

I had to create the folder and restarted the Agent (without errors):

install -d /var/log/td-agent/tmp -o td-agent -g td-agent -m 755
systemctl restart td-agent

You should add the directory creation in your documentation: https://access.redhat.com/documentation/en/openshift-enterprise/version-3.0/openshift-enterprise-30-administrator-guide/chapter-5-aggregating-container-logs


Suggestions for improvement: 

In point no 2,

You should add the directory creation in your documentation: https://access.redhat.com/documentation/en/openshift-enterprise/version-3.0/openshift-enterprise-30-administrator-guide/chapter-5-aggregating-container-logs

# mkdir -p /var/log/td-agent/tmp
# chown td-agent:td-agent /var/log/td-agent/tmp


Additional information:
Comment 2 brice 2015-09-10 02:12:25 EDT
Docs Pr submitted:

https://github.com/openshift/openshift-docs/pull/955
Comment 3 Miheer Salunke 2015-09-14 04:53:15 EDT
It seems to be good. Thanks!
Comment 4 brice 2015-09-14 21:07:02 EDT
Thanks, Miheer.

I'll put this onto QA.
Comment 5 Vikram Goyal 2015-09-14 21:25:19 EDT
LGTM.

Note You need to log in before you can comment on or make changes to this bug.