Giter VIP home page Giter VIP logo

Comments (7)

repeatedly avatar repeatedly commented on September 26, 2024

Your directory name seems logs but fluentd tries to write to log.

from fluentd-docker-image.

viztastic avatar viztastic commented on September 26, 2024

Hi, are you sure @repeatedly ? See below, still doesn't work:

screenshot 2016-02-08 07 12 05

I'm pretty sure it doesn't matter what the folder name is on the host?

from fluentd-docker-image.

viztastic avatar viztastic commented on September 26, 2024

@repeatedly Just so you have 100% confidence, i've tried your approach and screenshotted permissions fyi, no luck:

screenshot 2016-02-08 07 17 20

from fluentd-docker-image.

repeatedly avatar repeatedly commented on September 26, 2024

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.

hsinhoyeh avatar hsinhoyeh commented on September 26, 2024

seems the permission problem on docker mount volumn.
there are two workarounds:

    1. NOT to mount folder
docker run -d -p 24224:24224 fluent/fluentd
    1. 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.

llernestal avatar llernestal commented on September 26, 2024

Related to this issue: moby/moby#8740

from fluentd-docker-image.

repeatedly avatar repeatedly commented on September 26, 2024

Thanks!

This issue is closed because the problem is not our dockerfile

from fluentd-docker-image.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.