Giter VIP home page Giter VIP logo

Comments (7)

repeatedly avatar repeatedly commented on September 26, 2024 2

/fluentd/log is created by default.

RUN mkdir -p /fluentd/log

from fluentd-docker-image.

repeatedly avatar repeatedly commented on September 26, 2024

I also confirmed same error.

% docker run -p 24224:24224 -v /data:/fluentd/log  fluent/fluentd                                                  (git)-[master]
2015-07-22 16:49:22 +0000 [info]: reading config file path="/fluentd/etc/fluent.conf"
2015-07-22 16:49:22 +0000 [info]: starting fluentd-0.12.11
2015-07-22 16:49:22 +0000 [info]: gem 'fluentd' version '0.12.11'
2015-07-22 16:49:22 +0000 [info]: adding match in @mainstream pattern="docker.**" type="file"
2015-07-22 16:49:22 +0000 [error]: config error file="/fluentd/etc/fluent.conf" error="out_file: `/fluentd/log/docker.20150722_0.log` is not writable"
2015-07-22 16:49:22 +0000 [info]: process finished code=256
2015-07-22 16:49:22 +0000 [warn]: process died within 1 second. exit.

@tagomoris Could you handle this?

from fluentd-docker-image.

repeatedly avatar repeatedly commented on September 26, 2024

Removing -v /data:/fluentd/log from docker run works.

from fluentd-docker-image.

repeatedly avatar repeatedly commented on September 26, 2024

Ah Mac doesn't have /data...
Creating temporary directory resolve error on my env.

@amarcionek Could you show me your docker run command?

from fluentd-docker-image.

tagomoris avatar tagomoris commented on September 26, 2024

-v options is to introduce local directory into docker image.
Of course, source directory (ex: /data) should be exist and writable for docker process...

from fluentd-docker-image.

amarcionek avatar amarcionek commented on September 26, 2024

I used the same command line from the readme verbatim. I did create a /fluentd/log directory in the container's host, which I assume is what you mean by local directory, with 777 perms and that didn't work.

Now, I created a /tmp/log directory, also with 777, and that worked! That got me thinking...try /fluentd/logs That also worked! See output:

root@ubuntu15:/# docker run -p 24224:24224 -v /data:/fluentd/logs fluent/fluentd
2015-07-22 17:52:39 +0000 [info]: reading config file path="/fluentd/etc/fluent.conf"
2015-07-22 17:52:39 +0000 [info]: starting fluentd-0.12.11
2015-07-22 17:52:39 +0000 [info]: gem 'fluentd' version '0.12.11'
2015-07-22 17:52:39 +0000 [info]: adding match in @mainstream pattern="docker.**" type="file"
2015-07-22 17:52:39 +0000 [info]: adding match in @mainstream pattern="**" type="file"
2015-07-22 17:52:39 +0000 [info]: adding filter pattern="**" type="stdout"
2015-07-22 17:52:39 +0000 [info]: adding source type="forward"
2015-07-22 17:52:39 +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>
2015-07-22 17:52:39 +0000 [info]: listening fluent socket on 0.0.0.0:24224'

Note that /fluentd/logs doesn't even exist at the moment.

/fluentd/log is mentioned in the config no matter whether I use /fluentd/logs or /tmp/log. Could it be that /fluentd/log is a reserved value?

from fluentd-docker-image.

amarcionek avatar amarcionek commented on September 26, 2024

OK, I'm an idiot. My /data directory was not writable by all. I'm guessing the fluentd couldn't write to it after it was mapped using the docker volume. Thanks guys!

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.