Facing: fluentd log unreadable. it is excluded and would be examined next time
I have a simple configuration for fluentD daemon set running in kubernetes setup.
Fluentd version: fluentd-0.12.43
Below is my configuration.
<source>
@type tail
path /var/log/containers/sample*.log
time_format %Y-%m-%dT%H:%M:%S.%NZ
tag sample.*
format json
read_from_head true
</source>
<match sample.**>
@type forward
heartbeat_type tcp
send_timeout 60s
recover_wait 10s
hard_timeout 60s
<server>
name worker-node2
host 10.32.0.15
port 24224
weight 60
</server>
</match>
Getting below warning and NO logs are forwarded
2018-08-03 06:36:53 +0000 [warn]: /var/log/containers/samplelog-79bd66868b-t7xn9_logging1_fluentd-70e85c5d6328e7d.log unreadable. It is excluded and would be examined next time.
2018-08-03 06:37:53 +0000 [warn]: /var/log/containers/samplelog-79bd66868b-t7xn9_logging1_fluentd-70e85c5bc89ab24.log unreadable. It is excluded and would be examined next time.
Permission for log file:
[root@k8s-master fluentd-daemonset]# ls -lrt **/var/log/containers/**
**lrwxrwxrwx** Jun 25 06:25 sample-77g68_kube-system_kube-proxy-9f3c3951c32ee.log
-> /var/log/pods/aa1f8d5b-746f-11e8-95c0-005056b9ff3a/sample/7.log
YAML file for daemon set have mount instructions:
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: fluentd
namespace: logging1
labels:
k8s-app: fluentd-logging
version: v1
kubernetes.io/cluster-service: "true"
spec:
template:
-----
-----
-----
volumeMounts:
- name: fluentd-config
mountPath: /fluentd/etc/
- name: varlog
mountPath: /var/log
readOnly: true
- name: varlogpods
mountPath: /var/log/pods
readOnly: true
- name: varlogcontainers
mountPath: /var/log/containers
readOnly: true
- name: varlibdocker
mountPath: /var/lib/docker
readOnly: true
- name: varlibdockercontainers
mountPath: /var/lib/docker/containers
readOnly: true
terminationGracePeriodSeconds: 30
volumes:
- name: fluentd-config
configMap:
name: fluentd-config
- name: varlog
hostPath:
path: /var/log
- name: varlogpods
hostPath:
path: /var/log/pods
- name: varlogcontainers
hostPath:
path: /var/log/containers
- name: varlibdocker
hostPath:
path: /var/lib/docker
- name: varlibdockercontainers
hostPath:
path: /var/lib/docker/containers
Getting no clue even when permission is correct, fluentD version is correct, Mount instruction are their in kubernetes daemonset, why I am getting this warning.