docker logs doesnt work with log-driver=journald

Asked by Andor on 2018-08-10

There are multiple bug reports where log-driver=journald doesn't support read via command `docker logs` and command `kubectl logs` if you are using kubernetes on top of docker.
Everywhere docker developers suggest to remove `docker.io` package and install their build package.
Maybe you can suggest a better solution for this problem? Maybe some option can help with this issue?

Example reports:
https://github.com/kubernetes/kubernetes/issues/41996
https://github.com/moby/moby/issues/31404

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu docker.io Edit question
Assignee:
No assignee Edit question
Last query:
2018-08-10
Last reply:
2018-08-26
Sergei Mironov (errky) said : #1

I used strace (strace -s 1024 -fp 4551) on running dockerd from docker.io-17.12.1-0ubuntu1 package to diagnose a problem and found this:

[pid 4554] read(18, "GET /v1.35/containers/test/logs?stderr=1&stdout=1&tail=all HTTP/1.1\r\nHost: docker\r\nUser-Agent: Docker-Client/17.12.1-ce (linux)\r\n\r\n", 4096) = 131
[pid 4554] futex(0xc420379548, FUTEX_WAKE, 1) = 1
[pid 4553] <... pselect6 resumed> ) = 0 (Timeout)
[pid 4553] pselect6(0, NULL, NULL, NULL, {tv_sec=0, tv_nsec=20000}, NULL) = 0 (Timeout)
[pid 4553] pselect6(0, NULL, NULL, NULL, {tv_sec=0, tv_nsec=20000}, NULL) = 0 (Timeout)
[pid 4553] pselect6(0, NULL, NULL, NULL, {tv_sec=0, tv_nsec=20000}, NULL <unfinished ...>
[pid 4554] write(2, "time=\"2018-08-13T10:29:17.069195861Z\" level=error msg=\"Handler for GET /v1.35/containers/test/logs returned error: configured logging driver does not support reading\"\n", 167) = 167
[pid 4553] <... pselect6 resumed> ) = 0 (Timeout)
[pid 4553] pselect6(0, NULL, NULL, NULL, {tv_sec=0, tv_nsec=20000}, NULL <unfinished ...>
[pid 4554] write(18, "HTTP/1.1 501 Not Implemented\r\nApi-Version: 1.35\r\nContent-Type: application/json\r\nDocker-Experimental: false\r\nOstype: linux\r\nServer: Docker/17.12.1-ce (linux)\r\nDate: Mon, 13 Aug 2018 10:29:17 GMT\r\nContent-Length: 65\r\n\r\n{\"message\":\"configured logging driver does not support reading\"}\n", 283) = 283

Launchpad Janitor (janitor) said : #2

This question was expired because it remained in the 'Open' state without activity for the last 15 days.