rancher查看日志:failed to create fsnotify watcher: too many open files这是一个非常经典的 Kubernetes/Linux 系统参数限制问题。根本原因: Rancher(以及 Kubernetes)查看日志时,底层机制类似于 tail -f,需要使用 Linux 的 inotify 机制来监听文件变化。当节点上运行的容器太多,或者日志文件太多时,宿主机的 inotify 监听句柄(watches) 被用光了,就会报 too many open files 或 failed to create fsnotify watcher。