-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Logparser/tail input on Windows stops sendings logs due to file being locked #6539
Comments
Thanks for the report, it seems that an approriate fix might be to have a list of temporary errors here that are okay and should be ignored. If you can reproduce this with https://github.com/hpcloud/tail, and I suspect you will be able to, then it would be best to report there. The influxdata/tail repo has just a few patches that have not been accepted upstream yet. We may want to switch to the https://github.com/nxadm/tail fork when we have time, as hpcloud doesn't seem to have any active maintainers, but I would still report to hpcloud/tail since it has the most watchers. |
@danielnelson Thanks for your reply. On your suggestion, I created this issue in |
Hi, i didnt test these with roelandvh conf but i had a similar problem a few days ago, and as a work arround I used: |
@roelandvh If you have the time, can you try to reproduce the error with https://github.com/nxadm/tail? I added quite a few updates that fixed many of the MS Windows problems and made all Windows test pass, therefore removing the Windows support warning in the inherited README.md. |
I was got same issue i try found another metric integration solution. |
Hello, I'm observing the same issue with Telegraf 1.25.0 (git: HEAD@4d17ec79). Both methods "inotify" and "poll" behave the same. Is there any fix expected for this? |
Hello, Any updates on this issue? |
@lavalex unfortunately, the issue is buried deep in the |
Relevant telegraf.conf:
System info:
Steps to reproduce:
watch -n 10 wget -q -r -P wget-out https://<url>
)telegraf
database and keep executing and watching the results of this query:Expected behavior:
New data points should keep appearing in
apache_access_log
, shortly after each logline appears in the Apache log.Actual behavior:
Observe that immediately after starting, fresh data will appear in
apache_access_log
, but that will stop after a shorter or longer period of time (but usually within a few minutes max), even though new log lines are appearing in the Apache log files.Additional info:
I think I've reproduced the cause of this issue using the following simple Go program that uses the same code for tailing the log files as telegraf does:
After some experimenting (printf-debugging, really) in the influxdata/tail code, I noticed that the tail would sooner or later die, as a result of a "non-EOF error". The output of the above program was:
This would happen at this place in the
tail.go
file in thetailFileSync
func:So it appears that the fact that Apache is writing additional lines to the file at the same moment telegraf logparser wants to read new lines is causing this issue.
(Initially I wanted to report this at https://github.com/influxdata/tail but that repository doesn't accept issues.)
The text was updated successfully, but these errors were encountered: