k3s-io / k3s

Lightweight Kubernetes
https://k3s.io
Apache License 2.0
26.96k stars 2.27k forks source link

kubectl logs <pod-name> throws Unable to configure handler 'unifiedSyslogHandler': [Errno 2] No such file or directory #812

Closed shriharisc closed 4 years ago

shriharisc commented 4 years ago

Describe the bug K3s version : k3s version v0.8.1 (d116e74a)

I am trying to install MariaDB over Helm, and it failed with Error: Job failed: BackoffLimitExceeded

However if try to use the kubectl alias of k3s for describing the logs of the pods in error, it throws Python exception : Unable to configure handler 'unifiedSyslogHandler': [Errno 2] No such file or directory

$> kubectl get pods -n dev1 NAME READY STATUS RESTARTS AGE mdb-pre-install-d7npl 0/1 Error 0 101s mdb-pre-install-fxfqq 0/1 Error 0 103s mdb-pre-install-jw5sk 0/1 Error 0 90s

$> kubectl logs cdpdb-cmdb-pre-install-d7npl -n dev1 Traceback (most recent call last): File "/usr/bin/harmonize_log", line 18, in import flexlog File "/usr/lib/python2.7/site-packages/flexlog/init.py", line 7, in FLEXLOGGER = FlexLogger() File "/usr/lib/python2.7/site-packages/flexlog/FlexLogger.py", line 132, in init self._logger_name) File "/usr/lib/python2.7/site-packages/unified_logging/logger.py", line 32, in init logging.config.dictConfig(config_dic) File "/usr/lib64/python2.7/logging/config.py", line 803, in dictConfig dictConfigClass(config).configure() File "/usr/lib64/python2.7/logging/config.py", line 585, in configure '%r: %s' % (name, e)) ValueError: Unable to configure handler 'unifiedSyslogHandler': [Errno 2] No such file or directory

However kubectl describe on pod work, and I see the pod's runtime description.

$> v$ kubectl describe pod mdb-pre-install-d7npl -n dev1 Name: mdb-pre-install-d7npl Namespace: dev1 Priority: 0 PriorityClassName: Node: master/192.168.0.200 ..... Events: Type Reason Age From Message


Normal Scheduled 8m11s default-scheduler Successfully assigned dev1/mdb-pre-install-d7npl to master Normal Pulled 8m9s kubelet, master Container image "mdb/admin:4.8-3.1391" already present on machine Normal Created 8m9s kubelet, master Created container pre-install-admin Normal Started 8m8s kubelet, master Started container pre-install-admin

I have Python3 installed Python 3.6.8 (default, Aug 20 2019, 17:12:48)

galal-hussein commented 4 years ago

@shriharisc I wasn't able to reproduce the issue when installing maridab from the stable repo, can you provide more information whether this chart is from stable repo or local one

shriharisc commented 4 years ago

This issue was not related to k3s, but due to unavailablity of mounted folder.