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

(Windows) Metricbeat will not start due to config file permissions #76

Open
kaijunxu opened this issue May 12, 2022 · 4 comments
Open
Labels
bug Something isn't working workaround_exists

Comments

@kaijunxu
Copy link

When running on WSL2 on Windows, Metricbeat container will not start with error Exiting: error loading config file: config file ("metricbeat.yml") can only be writable by the owner but the permissions are "-rwxrwxrwx" (to fix the permissions use: 'chmod go-w /usr/share/metricbeat/metricbeat.yml') and end up in a restart loop. This may be related to known issues with file permissions on WSL/WSL2. This results in the Kibana dashboards showing "no data available".

Per Elastic documentation, this can be easily worked around by using the --strict.perms=false - for example modifying the docker-compose-override.yml file to command: -e --strict.perms=false. This is not a recommended fix but should be sufficient for demo and learning purposes.

Tested with 6.1.0-post, Ubuntu 18.04 on WSL2 (Windows 10). I suspect (but not tested) 6.2.0-post will have same issue. Impact for non-Windows users (e.g. Mac) not tested but I believe there will not be any impact from this change.

Recognize that we do not officially test these examples for Windows users, but this is a relatively simple workaround.

@hifly81 hifly81 added the bug Something isn't working label Aug 4, 2023
@hifly81
Copy link
Collaborator

hifly81 commented Sep 29, 2023

@kaijunxu for the moment support on Windows for demo is not tested.
Feel free to open a new issue to ask for demo support on Windows

@wensenz
Copy link

wensenz commented Nov 15, 2023

i got same question!, when well fix ?

@ejentos
Copy link

ejentos commented Nov 29, 2023

Guys as a workaround you can try to set 'read only' attribute to metricbeat.yml file. The problem should gone.
photo_2023-11-29_22-36-16

@hifly81
Copy link
Collaborator

hifly81 commented Jan 9, 2024

@kaijunxu @wensenz are you happy with the workaround proposed by @ejentos ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working workaround_exists
Projects
None yet
Development

No branches or pull requests

4 participants