Closed l15k4 closed 9 years ago
There is a slight delay after which the logs are forwarded. Would you like to sort that out? It shouldn't be too hard.
Basically for freshly minted container we need to fetch the full logs.
Hey, I don't think it is in my power, I've never done anything with node.js and I don't understand what delay you are talking about. It doesn't yield any logs no matter when I run loghose or after how long I start log anything.
@StephenHynes7 is it all working in docker-logentries
, right?
@mcollina No it doesn't work in there. The reason why it doesn't work in docker-logentries is imho because of this issue :-)
@mcollina I have noticed a similar issue on one of my machines ( same set up on worked on a different one though ), it seemed like only the payload and not the headers were passed to docker-loghose, but I can have a closer look and see if I can replicate it.
@cammellos that would be awesome, thanks! Just to confirm, this is working for you, right?
it's working ok on all my machines but one, where I noticed a similar issue. But the docker installation is somewhat broken there, so I figured that that might have been the problem. I will need to have a closer look at it now that a similar issue has been reported.
On Tue, Aug 25, 2015 at 10:46 AM, Matteo Collina notifications@github.com wrote:
@cammellos https://github.com/cammellos that would be awesome, thanks! Just to confirm, this is working for you, right?
— Reply to this email directly or view it on GitHub https://github.com/mcollina/docker-loghose/issues/2#issuecomment-134541160 .
Btw it doesn't happen only when you do :
$ docker run --rm ubuntu:14.04 /bin/echo 'Hello world'
Hello world
$ docker run --rm busybox /bin/echo 'Hello world'
Hello world
It happens even if you start the container, got to shell and do echo 'Hello world'
... there is still no output from loghose...
I think this issue might be related to the piece of code https://github.com/mcollina/docker-allcontainers/blob/master/allcontainers.js#L31-L37
As far as I understood for containers that are not running in the background (-d) or in interactive mode (-i) - ie busybox and ubuntu - will start and stop almost instantly.
try this:
docker run --rm busybox /bin/sh -c 'echo "Hello world!"'
and then
docker run --rm busybox /bin/sh -c 'sleep 3; echo "Hello world!"'
You should see the log message when you run with sleep 3
I tried loghose on 4 scenarios:
The issue did not reproduce on my machine, I could see the logs.
More info would be needed to investigate this particular case. @agassner 's explanation might point in the right direction.
Just a detail: the docker-logentries
container does not output anything, you must check on the Logentries account if logs are sent or not.
It all works now, docker-logentries too, thank you all guys.
Hi,
1)
2)
But loghose container yields no logs at all... I was playing with it for a while and a single log line came out :
But it was only when I ran the
busybox:latest
command for the first time... Then just silence