Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Promtail: stale NFS file handle #3651

Closed
mxsiegle opened this issue Apr 23, 2021 · 1 comment
Closed

Promtail: stale NFS file handle #3651

mxsiegle opened this issue Apr 23, 2021 · 1 comment
Labels
stale A stale issue or PR that will automatically be closed.

Comments

@mxsiegle
Copy link

Hey,

I'm trying to log files that are located on a mounted NFS volume and noticed that Promtail v2.2.0 was excessively spamming the following log messages over and over:

Apr 22 11:23:07 <hostname> promtail[5430]: level=info ts=2021-04-22T11:23:07.477188057Z caller=tailer.go:173 component=tailer msg="skipping update of position for a file which does not currently exist"

I found PR #3457 and upgraded to Promtail v2.2.1 which indeed gave me more information on the issue:

Apr 22 15:35:58 <hostname> promtail[19673]: level=info ts=2021-04-22T15:35:58.423440228Z caller=tailer.go:141 component=tailer msg="tail routine: tail channel closed, stopping tailer" path=/path/to/file/file.log reason="Error reading /path/to/file/file.log: read /path/to/file/file.log: stale NFS file handle"
Apr 22 15:35:58 <hostname> promtail[19673]: level=info ts=2021-04-22T15:35:58.424899792Z caller=tailer.go:134 component=tailer msg="tail routine: exited" path=/path/to/file/file.log

I understand that this is somewhat not Promtail's fault and more like an OS and NFS 'issue', but maybe there is something that can be done about it regardless, e.g. by closing and re-opening the file when this issue occurs.
Interestingly, collecting logs was still mostly working although the behavior was a bit flaky at times.

Our servers are all running SLES15 and I could observe that behavior randomly on multiple hosts with different NFS servers mounted on each of them, so it doesn't look like a temporary issue or with a specific NFS server.

Any ideas?

At the very least I think the log level should be changed if the issue is repeating. I had 50 files open and it would print 50 messages every 10s (default file refresh) or 150 with Promtail v2.2.1.

@stale
Copy link

stale bot commented Jun 2, 2021

This issue has been automatically marked as stale because it has not had any activity in the past 30 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale A stale issue or PR that will automatically be closed. label Jun 2, 2021
@stale stale bot closed this as completed Jun 10, 2021
cyriltovena pushed a commit to cyriltovena/loki that referenced this issue Jun 11, 2021
* Adds support to S3 server side encryption using AWS KMS

Signed-off-by: Lucas Miguel <lucasvieira.dev@gmail.com>

* refatored based on PR review

Signed-off-by: Lucas Miguel <lucasvieira.dev@gmail.com>

* small refactor

Signed-off-by: Lucas Miguel <lucasvieira.dev@gmail.com>

* rebased master

Signed-off-by: Lucas Miguel <lucasvieira.dev@gmail.com>

* rebased master correctly

Signed-off-by: Lucas Miguel <lucasvieira.dev@gmail.com>

* added new line

Signed-off-by: Lucas Miguel <lucasvieira.dev@gmail.com>

* refactored

Signed-off-by: Lucas Miguel <lucasvieira.dev@gmail.com>

* reordered changelog

Signed-off-by: Lucas Miguel <lucasvieira.dev@gmail.com>

* refactored NewSSEParsedConfig

Signed-off-by: Lucas Miguel <lucasvieira.dev@gmail.com>

* removed unused struct

Signed-off-by: Lucas Miguel <lucasvieira.dev@gmail.com>

Co-authored-by: Lucas Vieira <lucas.vieira@ASSUMESEEQUITE.workdayinternal.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale A stale issue or PR that will automatically be closed.
Projects
None yet
Development

No branches or pull requests

1 participant