-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Description
Docker client version:
Client version: 1.7.1
Client API version: 1.19
Package Version (client): docker-1.7.1-108.el7.x86_64
Go version (client): go1.4.2
Git commit (client): 3043001/1.7.1
OS/Arch (client): linux/amd64
Server version: 1.7.1
Server API version: 1.19
Package Version (server): docker-1.7.1-108.el7.x86_64
Go version (server): go1.4.2
Git commit (server): 3043001/1.7.1
OS/Arch (server): linux/amd64
Docker daemon version:
sudo docker -D info
Containers: 65
Images: 114
Storage Driver: devicemapper
Pool Name: docker-253:1-68511491-pool
Pool Blocksize: 65.54 kB
Backing Filesystem: xfs
Data file: /dev/loop0
Metadata file: /dev/loop1
Data Space Used: 3.356 GB
Data Space Total: 107.4 GB
Data Space Available: 36.4 GB
Metadata Space Used: 8.303 MB
Metadata Space Total: 2.147 GB
Metadata Space Available: 2.139 GB
Udev Sync Supported: true
Deferred Removal Enabled: false
Data loop file: /var/lib/docker/devicemapper/devicemapper/data
Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
Library Version: 1.02.93-RHEL7 (2015-01-28)
Execution Driver: native-0.2
Logging Driver: journald
Kernel Version: 3.10.0-229.11.1.el7.x86_64
Operating System: CentOS Linux 7 (Core)
CPUs: 2
Total Memory: 3.703 GiB
Name: localhost.localdomain
ID: O5EP:QXAY:BRPT:WK3H:EGTY:QA6T:L6HE:MWQ4:7HBB:T6K5:OTYQ:LH6O
When we set the docker logging driver to journald and configure a container to allow tty the JournalD hueristics detects standard out as blob data. You can get around this with journalctl by using the –o json option, but if you do not enable tty the standard out stream is correctly detected. Below is an example on how to reproduce.
Start a container:
sudo docker run -it centos bash
In container:
[root@6cd051dc2a8a /]# echo "hi this is a test”
On the host running journalctl command for container
journalctl CONTAINER_ID=6cd051dc2a8a
-- Logs begin at Thu 2015-08-20 14:13:46 UTC, end at Thu 2015-08-20 14:18:15 UTC. --
Aug 20 14:17:38 localhost.localdomain docker[1010]: [88B blob data]
Aug 20 14:17:38 localhost.localdomain docker[1010]: [18B blob data]
Specifying the output format to JSON results in:
journalctl -o json CONTAINER_ID=6cd051dc2a8a
{ "__CURSOR" : "s=8729e2baf7cf49e0b7e809c47a99234c;i=c90;b=ab92778f2d4d4872b29ed8e8ce38db4a;m=de04e5a;t=51dbed0482463;x=4a6085b0a86fd2c7", "__REALTIME_TIMESTAMP" : "1440080258933859", "__MONOTONIC_TIMESTAMP" : "232803930", "_BOOT_ID" : "ab92778f2d4d4872b29ed8e8ce38db4a", "PRIORITY" : "6", "_UID" : "0", "_GID" : "0
{ "__CURSOR" : "s=8729e2baf7cf49e0b7e809c47a99234c;i=c91;b=ab92778f2d4d4872b29ed8e8ce38db4a;m=de04f4e;t=51dbed0482558;x=55b46ff249ba8387", "__REALTIME_TIMESTAMP" : "1440080258934104", "__MONOTONIC_TIMESTAMP" : "232804174", "_BOOT_ID" : "ab92778f2d4d4872b29ed8e8ce38db4a", "PRIORITY" : "6", "_UID" : "0", "_GID" : “0