Docker Community Forums

Share and learn in the Docker community.

Docker container not logging to docker logs

We run 3 docker containers to process messages and a load balancer all on the same system. Journalbeats is installed to report to remote logstash. When the 3 docker containers come up at the same time they all are able to log to docker logs. However, if one of the processes is restarted, it is not able to log to docker logs. That is, running docker log <container_name> does not show anything. This is verifiable using journalctl. No logs for the one restarted container.

Another note: using ‘docker stats’ when all 3 start at the same time their CPU utilization is near the same (110% or so). But when one of the containers is restarted after and initial percent of 100+ it drops down to about 15%, then after a few minutes it drops down to about 4%.

I would blame our load-balancer for not handing traffic to the new node, except that there are no docker logs, indicating some problem with docker.

Another note: one time the restarted process did get 2 log lines into docker logs, but they were the 4th and 5th expected log lines. Lines 1 - 3 were missing.

Host system is CentOS 7, an aws instance.
Docker containers run fedora-atomic.

Docker version:

Client:
Version: 1.12.5
API version: 1.24
Package version: docker-common-1.12.5-14.el7.centos.x86_64
Go version: go1.7.4
Git commit: 047e51b/1.12.5
Built: Mon Jan 23 15:35:13 2017
OS/Arch: linux/amd64

Server:
Version: 1.12.5
API version: 1.24
Package version: docker-common-1.12.5-14.el7.centos.x86_64
Go version: go1.7.4
Git commit: 047e51b/1.12.5
Built: Mon Jan 23 15:35:13 2017
OS/Arch: linux/amd64

When I type “docker info | grep ‘Logging driver’” and “docker logs ContainerID”, I do not get any results inspite of the containers being in running state.

Btw, I just have the default files under /etc/docker i.e. key.json file, no modifications at all. Any suggestions?

I am using AWS Linux2 with the below Docker versions:

Client:
Version: 18.09.9-ce
API version: 1.39
Go version: go1.10.3
Git commit: 039a7df
Built: Fri Nov 1 19:26:49 2019
OS/Arch: linux/amd64
Experimental: false

Server:
Engine:
Version: 18.09.9-ce
API version: 1.39 (minimum version 1.12)
Go version: go1.10.3
Git commit: 039a7df
Built: Fri Nov 1 19:28:24 2019
OS/Arch: linux/amd64
Experimental: false