-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[0.14.20] [in_tail] prevents docker from removing containers #1680
Comments
This is far and away my #1 issue with fluentd; has been for years now. Please find a solution -- does anyone have a good workaround for having both |
I've end up with stopping fluentd each time I'm removing old containers. |
@zette i have a cron job restarting fluentd every 30 minutes to clean up pos_file and to release log files https://github.com/roffe/kube-gelf/blob/master/cron.yaml |
Yes and in_tail opens target files to tail logs until shutdown by default. |
Hi, I'm facing a similar issue as #287 eventhough the following configuration is present for docker log file rotation: I can see multiple files being generated, i.e. log files are being rotated once they hit 2G size mark, but fluentd is still reading the main file (*-json.log) and not the others (*log.1, .2, etc). |
This issue has been automatically marked as stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 30 days |
This issue was automatically closed because of stale in 30 days |
-s devicemapper --log-opt max-size=100m --log-opt
With this configuration local fluentd aggregates logs from all running containers json files, and sends them to external host for processing. This works well for running containers, but when the container is stopped and is being removed with
docker rm [container_name]
, the docker demon reports:Error response from daemon: Unable to remove filesystem for [container_id]: remove /var/lib/docker/containers/[container_id]/shm: device or resource busy
The above behavior is not happeing all the times, but often enough to cripple CI builds. Unfortunately we can not use docker fluentd forwarder, since the developers need to have realtime access to container logs.
Some work with docker log handling, and file rotation for fluent-bit has been already done in fluent/fluent-bit#287
After stopping/restarting the fluentd, container directory is unlocked and removed without problems. It seems that in_tail is holding lock on container log file, preventing docker from removing container's filesystem.
The text was updated successfully, but these errors were encountered: