Docker Community Forums

Share and learn in the Docker community.

Trouble with syslog-driver

docker

(Er45wq) #1

Hi all!
I use debian 8.5, rsyslogd 8.4.2, Docker version 1.12.1 .
I want use syslog-driver to redirect my logs from containers to host (debian). And i try it: docker run -t -d --log-driver=syslog ubuntu /bin/bash -c 'while true; do echo "Hello $(date)"; sleep 1; done' but something went wrong…

ea7e98cd1b59886919396afd9587d848b8d328f534e81a2abb792e2f00fb4353
docker: Error response from daemon: Failed to initialize logging driver: Unix syslog delivery error.

Any ideas?


(Nathan Le Claire) #2

syslogd is listening?

The -t -d is odd. Why -t -d? You probably want just -d (detached) without the -t (allocate a pseudo-TTY).


(Er45wq) #3

Hi nathanleclaire !
Yes, rsyslogd work fine:

# ps ax | grep rsys
14138 pts/0    S+     0:00 grep rsys
27518 ?        Ssl    0:00 /usr/sbin/rsyslogd -n

Sep 14 13:21:19 debian dockerd[16554]: time="2016-09-14T13:21:19.619599090+05:00" level=warning msg="Couldn't run auplink before unmount /var/lib/docker/aufs/mnt/16f5de1fc60b03daad01175f82c624f5cb5f389a36bd96fc747a89749d1cff9f-init: exec: \"auplink\": executable file not found in $PATH"
Sep 14 13:21:19 debian dockerd[16554]: time="2016-09-14T13:21:19.974209567+05:00" level=warning msg="Couldn't run auplink before unmount /var/lib/docker/aufs/mnt/16f5de1fc60b03daad01175f82c624f5cb5f389a36bd96fc747a89749d1cff9f: exec: \"auplink\": executable file not found in $PATH"
Sep 14 13:21:21 debian dockerd[16554]: time="2016-09-14T13:21:21.183317157+05:00" level=error msg="containerd: notify OOM events" error="cgroup path for memory not found"
Sep 14 13:21:21 debian dockerd[16554]: time="2016-09-14T13:21:21.187034302+05:00" level=error msg="Create container failed with error: Failed to initialize logging driver: Unix syslog delivery error"
Sep 14 13:21:21 debian dockerd[16554]: time="2016-09-14T13:21:21.886698006+05:00" level=warning msg="Couldn't run auplink before unmount /var/lib/docker/aufs/mnt/16f5de1fc60b03daad01175f82c624f5cb5f389a36bd96fc747a89749d1cff9f: exec: \"auplink\": executable file not found in $PATH"
Sep 14 13:21:21 debian dockerd[16554]: time="2016-09-14T13:21:21.896950681+05:00" level=error msg="Handler for POST /v1.24/containers/807cd583fc31b517016a835edabd5e5407b07dbb228b443ccf9f2775056ca278/start returned error: Failed to initialize logging driver: Unix syslog delivery error"

Without -t i get the same error.

# docker run -d --log-driver=syslog ubuntu  /bin/bash -c 'while true; do echo "Hello $(date)"; sleep 1; done'
807cd583fc31b517016a835edabd5e5407b07dbb228b443ccf9f2775056ca278
docker: Error response from daemon: Failed to initialize logging driver: Unix syslog delivery error.