Skip to content
This repository has been archived by the owner on Nov 6, 2018. It is now read-only.

Docker Logs weird behaviour #62

Open
Khazrak opened this issue Jun 13, 2016 · 6 comments · Fixed by #64
Open

Docker Logs weird behaviour #62

Khazrak opened this issue Jun 13, 2016 · 6 comments · Fixed by #64

Comments

@Khazrak
Copy link
Contributor

Khazrak commented Jun 13, 2016

When reading logs it seems like the first line is missing and some weird characters appear at the start of every line (if casting it to int I get the value 1).

My college also said that his last line is missing. My mongodb example does not illustrate that, will try to find a good example.

I attached how the logs looks with "docker logs" and how it looks with Java:
DockerLogs.txt

I tried using charsets of UTF-8 and US-ASCII to see if that helped but same result

@iocanel
Copy link
Member

iocanel commented Jun 13, 2016

It seems that some pieces of the header are also displayed. Will have a look.

@Khazrak
Copy link
Contributor Author

Khazrak commented Jun 16, 2016

Now the headers works fine and the first line displays.
But it doesn't show all the lines in the end, they get suspiciously cut (attached log):
DockerLogsCut.txt

@Khazrak
Copy link
Contributor Author

Khazrak commented Jun 17, 2016

It now gets all the logs :)

The only thing to remark is that I get this logged every time at the start:

[pool-1-thread-1] ERROR java.io.InputStreamReader - Error while pumping stream.
java.io.EOFException
at okio.RealBufferedSource.require(RealBufferedSource.java:64)
at okio.RealBufferedSource.readByte(RealBufferedSource.java:77)
at io.fabric8.docker.client.utils.DockerStreamPumper.run(DockerStreamPumper.java:61)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

@jimmidyson jimmidyson reopened this Jun 17, 2016
@jimmidyson
Copy link
Contributor

Will look at fixing that too then :) So close!

@jimmidyson
Copy link
Contributor

Can you share a way to repro? Can't seem to hit it myself.

@Khazrak
Copy link
Contributor Author

Khazrak commented Jun 20, 2016

LogProblem.txt

A class with a big junit test that get the problem.

Specs:
Running on Ubuntu 16.04 and using docker version 1.11.2 (I know, the lib is for 1.9.1, but there is no difference in log api that I've found)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants