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

tail on file that is regularly written to can fail due to file being locked (on Windows) #157

Open
roelandvh opened this issue Oct 18, 2019 · 0 comments

Comments

@roelandvh
Copy link

Tailing a file that gets regularly written to, like Apache log files, can crash with message The process cannot access the file because another process has locked a portion of the file.. This happened on a Windows 10 (version 1903) installation.

Please also see influxdata/telegraf#6539 where I provide more details and steps that I used for reproducing including a minimal Go program that uses just the tail module. Although for reproducing I used github.com/influxdata/tail in that program, this probably also applies to github.com/hpcloud/tail, given that influxdata/tail and hpcloud/tail have minimal differences and there appear to be no differences in the relevant tailFileSync function.

@roelandvh roelandvh changed the title tail on file that is regularly written can fail due to file being locked (on Windows) tail on file that is regularly written to can fail due to file being locked (on Windows) Oct 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant