tail:执行tail -f时无法识别的文件系统类型错误

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了tail:执行tail -f时无法识别的文件系统类型错误相关的知识,希望对你有一定的参考价值。

为什么在执行-f时显示错误但不执行--silent和--quite。可能有什么不同。我搜遍了每个地方,但没有发现差异?

root@<containerID>:/crowdLogistics/client/internal# tail --silent ../../logs/gunicorn_internal_client.log 
[2018-09-06 07:06:30 +0000] [69] [INFO] Starting gunicorn 19.6.0
[2018-09-06 07:06:30 +0000] [69] [INFO] Listening at: http://0.0.0.0:8080 (69)
[2018-09-06 07:06:30 +0000] [69] [INFO] Using worker: sync
[2018-09-06 07:06:30 +0000] [74] [INFO] Booting worker with pid: 74
[2018-09-06 07:06:30 +0000] [77] [INFO] Booting worker with pid: 77
[2018-09-06 07:06:30 +0000] [78] [INFO] Booting worker with pid: 78
[2018-09-06 07:06:30 +0000] [81] [INFO] Booting worker with pid: 81
[2018-09-06 07:06:30 +0000] [84] [INFO] Booting worker with pid: 84

root@<containerID>:/crowdLogistics/client/internal# tail --quiet ../../logs/gunicorn_internal_client.log 
[2018-09-06 07:06:30 +0000] [69] [INFO] Starting gunicorn 19.6.0
[2018-09-06 07:06:30 +0000] [69] [INFO] Listening at: http://0.0.0.0:8080 (69)
[2018-09-06 07:06:30 +0000] [69] [INFO] Using worker: sync
[2018-09-06 07:06:30 +0000] [74] [INFO] Booting worker with pid: 74
[2018-09-06 07:06:30 +0000] [77] [INFO] Booting worker with pid: 77
[2018-09-06 07:06:30 +0000] [78] [INFO] Booting worker with pid: 78
[2018-09-06 07:06:30 +0000] [81] [INFO] Booting worker with pid: 81
[2018-09-06 07:06:30 +0000] [84] [INFO] Booting worker with pid: 84

root@<containerID>:/crowdLogistics/client/internal# tail -f ../../logs/gunicorn_internal_client.log 
[2018-09-06 07:06:30 +0000] [69] [INFO] Starting gunicorn 19.6.0
[2018-09-06 07:06:30 +0000] [69] [INFO] Listening at: http://0.0.0.0:8080 (69)
[2018-09-06 07:06:30 +0000] [69] [INFO] Using worker: sync
[2018-09-06 07:06:30 +0000] [74] [INFO] Booting worker with pid: 74
[2018-09-06 07:06:30 +0000] [77] [INFO] Booting worker with pid: 77
[2018-09-06 07:06:30 +0000] [78] [INFO] Booting worker with pid: 78
[2018-09-06 07:06:30 +0000] [81] [INFO] Booting worker with pid: 81
[2018-09-06 07:06:30 +0000] [84] [INFO] Booting worker with pid: 84
tail: unrecognized file system type 0x794c7630 for ‘../../logs/gunicorn_internal_client.log’. please report this to bug-coreutils@gnu.org. reverting to polling
答案

无论如何,谢谢:) @VonC。我得到了解决方案。但这太暂时了。

按照本地docker上的这些说明操作以获得tail命令

cd /root
wget http://ftp.gnu.org/gnu/coreutils/coreutils-8.27.tar.xz && tar xf coreutils-8.27.tar.xz
export FORCE_UNSAFE_CONFIGURE=1
cd /root/coreutils-8.27 && ./configure 
--prefix=/root/coreutils 
--libexecdir=/root/coreutils/lib 
--enable-no-install-program=kill,uptime && make && make install

/root/coreutils/bin/tail -f «filename»
另一答案

root@<containerID>意味着你在一个容器会话中(例如通过docker exec

从那里,tail -f警告unrecognized file system type可能取决于您的图像中存在coreutil的版本。有关插图,请参阅this answer

根据执行环境,有patches to coreutils。 在您的情况下(执行环境是docker),请参阅bitnami-docker-tensorflow-serving issue 2

使用Docker和覆盖驱动程序时会发生这种情况:Bug 810669

由于使用带有覆盖存储驱动程序的docker导致“tail: unrecognized file system type 0x794c7630 for'/var/log/cron.log'”导致基本映像使用旧版本的coreutils引起。

一旦我们将基本图像从Debian Jessie(oldstable)更新到Debian Stretch(稳定),它可能会得到修复

以上是关于tail:执行tail -f时无法识别的文件系统类型错误的主要内容,如果未能解决你的问题,请参考以下文章

为啥 get_tail() 应该使用 tail_mutex 上的锁?

Go tail库

关于数据结构

Fluentd日志处理-tail拉取

zhx'code1

Aha code Two