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

Agent fails to open files due to file locking on Windows #11488

Closed
nvass opened this issue Mar 29, 2022 · 2 comments
Closed

Agent fails to open files due to file locking on Windows #11488

nvass opened this issue Mar 29, 2022 · 2 comments

Comments

@nvass
Copy link

nvass commented Mar 29, 2022

When trying to send files as logs to Datadog, it seems that the Datadog agent does not open them because they are already opened by another process. This will always be the case for log files. I've had this problem with Elasticsearch on Windows but I suspect it will be quite common with other servers running on Windows OSes.

From agent.log:
2022-03-29 11:50:20 EEST | CORE | INFO | (pkg/logs/scheduler/scheduler.go:66 in Schedule) | Received a new logs config: custom_logs
2022-03-29 11:50:20 EEST | CORE | WARN | (pkg/logs/input/file/scanner.go:205 in launchTailers) | Could not collect files: file C:\elasticsearch-7.17.1-windows-x86_64.d\elasticsearch-7.17.1-windows-x86_64\elasticsearch-7.17.1\logs\elasticsearch.log does not exist
2022-03-29 11:50:20 EEST | CORE | WARN | (pkg/logs/input/file/scanner.go:205 in launchTailers) | Could not collect files: file C:\elasticsearch-7.17.1-windows-x86_64.d\elasticsearch-7.17.1-windows-x86_64\elasticsearch-7.17.1\logs\elasticsearch_server.json does not exist

Describe what happened:
Log files cannot be opened

Describe what you expected:
Logs files should be opened and sent to Datadog as logs.

Steps to reproduce the issue:
Use Elasticsearch and try to monitor the logs directory. It should be reproducible with other servers that write log files.

Additional environment details (Operating System, Cloud provider, etc):
Microsoft Windows server 2019 Standard

@nvass
Copy link
Author

nvass commented Mar 30, 2022

Being unknowledgeable with regard to using Windows, it was a file permissions error.

@nvass nvass closed this as completed Mar 30, 2022
@shtyler
Copy link

shtyler commented Aug 19, 2022

Hi @nvass, can you please describe how you solved the issue?

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

2 participants