Open Khazrak opened 8 years ago
It seems that some pieces of the header are also displayed. Will have a look.
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
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)
Will look at fixing that too then :) So close!
Can you share a way to repro? Can't seem to hit it myself.
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)
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