-
问题描述
在Filebeat 容器内运行:
./filebeat modules list
出现错误:
Error initializing beat: error loading config file: config file (“filebeat.yml”) must be owned by the user identifier (uid=0) or root
-
解决方案
ll
查看filebeat.yml权限为配置文件中的登录用户。From Config File Ownership and Permissions, to correct the problem you can use :
chown root filebeat.yml # or chown 0 filebeat.yml # 这里这个数值依据错误提示,可能有所不同
but another two problem raise:
-
chown: changing ownership of ‘filebeat.yml’: Read-only file system
To correct this problem:
这个read-only是启动容器的时候设置的,取消即可。
docker run -d --name=filebeat --user=root --volume="$(pwd)/filebeat.docker.yml:/usr/share/filebeat/filebeat.yml:ro" # 修改为 docker run -d --name=filebeat --user=root --volume="$(pwd)/filebeat.docker.yml:/usr/share/filebeat/filebeat.yml"
-
Error initializing beat: error loading config file: config file (“filebeat.yml”) can only be writable by the owner but the permissions are “-rwxrwxrwx” (to fix the permissions use: ‘chmod go-w /usr/share/fileb
eat/filebeat.yml’)上面已有提示:
chmod go-w /usr/share/filebeat/filebeat.yml
(20201222已解决)config file (“filebeat.yml“) must be owned by the user identifier (uid=0) or root
猜你喜欢
转载自blog.csdn.net/The_Time_Runner/article/details/111709771
今日推荐
周排行