Bug 1259700

Summary: 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
Product: OpenShift Container Platform Reporter: Miheer Salunke <misalunk>
Component: DocumentationAssignee: brice <bfallonf>
Status: CLOSED CURRENTRELEASE QA Contact: Vikram Goyal <vigoyal>
Severity: low Docs Contact: Vikram Goyal <vigoyal>
Priority: urgent    
Version: 3.0.0CC: aos-bugs, jokerman, mmccomas, vigoyal
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-09-23 23:10:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Miheer Salunke 2015-09-03 11:54:45 UTC
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 06:12:25 UTC
Docs Pr submitted:

https://github.com/openshift/openshift-docs/pull/955

Comment 3 Miheer Salunke 2015-09-14 08:53:15 UTC
It seems to be good. Thanks!

Comment 4 brice 2015-09-15 01:07:02 UTC
Thanks, Miheer.

I'll put this onto QA.

Comment 5 Vikram Goyal 2015-09-15 01:25:19 UTC
LGTM.