Comments (7)
Your directory name seems logs
but fluentd tries to write to log
.
from fluentd-docker-image.
Hi, are you sure @repeatedly ? See below, still doesn't work:
I'm pretty sure it doesn't matter what the folder name is on the host?
from fluentd-docker-image.
@repeatedly Just so you have 100% confidence, i've tried your approach and screenshotted permissions fyi, no luck:
from fluentd-docker-image.
Ah, I see. Sorry, I missed your picture.
I tried latest image and it worked without errors.
% docker run -p 24224:24224 -v $HOME/tmp/docker/alpine/data:/fluentd/log fluent/fluentd
2016-02-07 20:32:42 +0000 [info]: reading config file path="/fluentd/etc/fluent.conf"
2016-02-07 20:32:42 +0000 [info]: starting fluentd-0.12.20
2016-02-07 20:32:42 +0000 [info]: gem 'fluentd' version '0.12.20'
2016-02-07 20:32:42 +0000 [info]: adding match in @mainstream pattern="docker.**" type="file"
2016-02-07 20:32:42 +0000 [info]: adding match in @mainstream pattern="**" type="file"
2016-02-07 20:32:42 +0000 [info]: adding filter pattern="**" type="stdout"
2016-02-07 20:32:42 +0000 [info]: adding source type="forward"
2016-02-07 20:32:42 +0000 [info]: using configuration file: <ROOT>
<source>
@type forward
@id input1
@label @mainstream
port 24224
</source>
<filter **>
@type stdout
</filter>
<label @mainstream>
<match docker.**>
@type file
@id output_docker1
path /fluentd/log/docker.*.log
symlink_path /fluentd/log/docker.log
append true
time_slice_format %Y%m%d
time_slice_wait 1m
time_format %Y%m%dT%H%M%S%z
buffer_path /fluentd/log/docker.*.log
</match>
<match **>
@type file
@id output1
path /fluentd/log/data.*.log
symlink_path /fluentd/log/data.log
append true
time_slice_format %Y%m%d
time_slice_wait 10m
time_format %Y%m%dT%H%M%S%z
buffer_path /fluentd/log/data.*.log
</match>
</label>
</ROOT>
2016-02-07 20:32:42 +0000 [info]: listening fluent socket on 0.0.0.0:24224
% ls data
docker.20160207.b52b3400102666b26.log docker.log@
% ls -al
total 24
drwxr-xr-x 9 repeatedly staff 306B 1 9 10:02 ./
drwxr-xr-x 6 repeatedly staff 204B 1 9 05:07 ../
-rw-r--r-- 1 repeatedly staff 266B 1 9 10:02 Dockerfile
drwxr-xr-x 3 repeatedly staff 102B 1 9 05:07 conf/
drwxr-xr-x 4 repeatedly staff 136B 2 8 05:33 data/
drwxr-xr-x 2 repeatedly staff 68B 1 9 05:07 plugins/
I'm not sure why writing file raises an error. Maybe docker image doesn't have a problem.
from fluentd-docker-image.
seems the permission problem on docker mount volumn.
there are two workarounds:
-
- NOT to mount folder
docker run -d -p 24224:24224 fluent/fluentd
-
- In your host machine, change ownership of the mounted folder to the one used in container
// let's say the user/group id used in fluentd container is 1000:1000
// and run the command in host machine
mkdir /tmp/fluentd
chown 1000:1000 /tmp/fluentd
docker run -d -p 24224:24224 -v /tmp/fluentd:/fluentd/log fluent/fluentd
from fluentd-docker-image.
Related to this issue: moby/moby#8740
from fluentd-docker-image.
Thanks!
This issue is closed because the problem is not our dockerfile
from fluentd-docker-image.
Related Issues (20)
- error=":excon is not registered on Faraday::Adapter" with v1.15.0 Docker and fluent-plugin-opensearch HOT 6
- fluent-plugin-prometheus-2.0.3 breaks with fluent/fluentd:v1.15.1-1.0 (Async version incompatibility?) HOT 2
- fluend:v1.14.4-1.0 has Security Vulnerebilities HOT 1
- Fluentd v1.15 docker image should bundle XML library gem by default HOT 2
- Fixing the logo on README.md HOT 1
- fluentd v1.15.0 image has many vulnerable packages HOT 1
- README: missing `fluentd` in providing config example HOT 2
- latest tag on DockerHub has not been updated for a long time HOT 10
- Vulnerability for fluentd:v1.16.0-1.0 HOT 8
- Dockerhub image isn't updated for 3 weeks HOT 2
- I want to run bash on startup with a Dockerfile I created, but Fulentd won't start.
- Fluentd Docker Container Overwhelmed with Plugin Error Messages HOT 1
- Feature request: Please provide a `latest-debian` tag on Docker Hub HOT 1
- Seeing critical vulnerability as part of the fluentd(v1.16.2) for zlib (CVE-2023-45853) library HOT 4
- Switch base image to 3.x-slim-bookworm
- Cannot build multi-platform image HOT 1
- docker image not published for 1.16.4 release HOT 1
- Segmentation fault after updating from version 1.16.3 to 1.16.4 HOT 17
- v1.17 images missing HOT 2
- RESOLVED: Workaround: disable jemalloc when image crashed (segmentation fault) with systemd plugin HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fluentd-docker-image.