异常复现
- 使用docker-compose 运行filebeat时发现报错: Failed to create Beat meta file: open /usr/share/filebeat/data/meta.json.new: permission denied
2. compose:
version: '3'
services:
filebeat:
image: docker.elastic.co/beats/filebeat:7.5.0
restart: always
volumes:
- ./filebeat/conf/filebeat.yml:/usr/share/filebeat/filebeat.yml
ports:
- 9000:9000
解决方案
- 加入用户:
filebeat:
image: docker.elastic.co/beats/filebeat:7.5.0
restart: always
user: root
- 重新启动: