Skip to content
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

Docker syslog driver and fluentd syslog source #14

Closed
superdump opened this issue Jan 10, 2016 · 6 comments
Closed

Docker syslog driver and fluentd syslog source #14

superdump opened this issue Jan 10, 2016 · 6 comments

Comments

@superdump
Copy link

How can one use the docker syslog driver with this fluentd container when using the syslog source?

@tagomoris
Copy link
Member

Use type syslog
http://docs.fluentd.org/articles/in_syslog

@superdump
Copy link
Author

Yes, but doesn't one need to use the host machine ip or something?

@viztastic
Copy link

Hi @tagomoris I have the same question, not sure how to run fluentd inside a container but still have it handle logging for containers on the host machine..?

@superdump
Copy link
Author

You have to run the fluentd container with the json-file log driver.

Also, running fluentd in a container listening for syslog logs on a TCP port creates a situation where if the fluentd container is not running for some reason, docker will refuse to start other containers as the syslog log driver cannot initialise.

This felt too dangerous to me and I instead opted for using the json-file log driver with log rotation options set and using fluentd's file input, mapping /var/lib/docker/containers into the fluentd container.

@viztastic
Copy link

Hi @superdump is there an example I can refer to by any chance? Much appreciated.

@MrMMorris
Copy link

MrMMorris commented May 6, 2016

@superdump just as an FYI, a fail-on-startup-error log-opt flag has been added in docker 1.11 that will ignore fluentd being unreachable and allow you to start containers anyway:

https://github.com/jnummelin/docker/blob/3cf82ff1ab14e1ddd2b629524e894ac359168388/docs/admin/logging/fluentd.md#fail-on-startup-error

I have backported it to 1.9.1 and built my own docker binary because I don't have time to wait until 1.11 for a solution to such an obvious issue.

kenhys added a commit to kenhys/fluentd-docker-image that referenced this issue Feb 10, 2022
Docker hub automated build fails with bullseye.

It is caused by qemu-user-static that host(groovy) still contains a bug that crashes
arm64 Debian Bullseye guests.

   fluent#14 120.8 Setting up g++ (4:10.2.1-1) ...
   fluent#14 121.1 update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode
   fluent#14 121.1 Setting up gnupg (2.2.27-2) ...
   fluent#14 121.1 Processing triggers for libc-bin (2.31-13+deb11u2) ...
   fluent#14 121.2 qemu: uncaught target signal 11 (Segmentation fault) - core dumped
   fluent#14 121.5 Segmentation fault (core dumped)
   fluent#14 121.6 qemu: uncaught target signal 11 (Segmentation fault) - core dumped
   fluent#14 121.8 Segmentation fault (core dumped)
   fluent#14 121.8 dpkg: error processing package libc-bin (--configure):
   fluent#14 121.8 installed libc-bin package post-installation script subprocess returned error exit status 139
   fluent#14 121.8 Errors were encountered while processing:
   fluent#14 121.8 libc-bin
   fluent#14 121.9 E: Sub-process /usr/bin/dpkg returned an error code (1)

As a workaround, it use a newer qemu.

Signed-off-by: Kentaro Hayashi <hayashi@clear-code.com>
kenhys added a commit that referenced this issue Feb 14, 2022
Docker hub automated build fails with bullseye.

It is caused by qemu-user-static that host(groovy) still contains a bug that crashes
arm64 Debian Bullseye guests.

   #14 120.8 Setting up g++ (4:10.2.1-1) ...
   #14 121.1 update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode
   #14 121.1 Setting up gnupg (2.2.27-2) ...
   #14 121.1 Processing triggers for libc-bin (2.31-13+deb11u2) ...
   #14 121.2 qemu: uncaught target signal 11 (Segmentation fault) - core dumped
   #14 121.5 Segmentation fault (core dumped)
   #14 121.6 qemu: uncaught target signal 11 (Segmentation fault) - core dumped
   #14 121.8 Segmentation fault (core dumped)
   #14 121.8 dpkg: error processing package libc-bin (--configure):
   #14 121.8 installed libc-bin package post-installation script subprocess returned error exit status 139
   #14 121.8 Errors were encountered while processing:
   #14 121.8 libc-bin
   #14 121.9 E: Sub-process /usr/bin/dpkg returned an error code (1)

As a workaround, it use a newer qemu.

Signed-off-by: Kentaro Hayashi <hayashi@clear-code.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants