Closed glmars closed 5 years ago
can you give me more details about the environment (OS, docker version) you run it? I have never seen dbl logging on restart event in any of the systems I'm running docker-logger on
I can't reproduce it but added a check to avoid dbl streaming. Pls try master and let me know if helped.
Yes, recent changes have helped.
Additional info: the problem is not reproduced every time. For example events & logs from two runs:
2019-06-17T12:29:33.694029740+07:00 container kill d96bd9ab69b554f53ed29a20929185917a3af29a427e4e1e6be2b13104ed2c11 (com.docker.compose.config-hash=1968fe17b9d9e93f512bdd6ae30a84078ebfdc3ff58f1f557e0a8d0a8c45645b, com.docker.compose.container-number=1, com.docker.compose.oneoff=False, com.docker.compose.project=webui, com.docker.compose.service=ipfs, com.docker.compose.version=1.17.0, image=ipfs/go-ipfs:v0.4.14, name=webui-ipfs, signal=15)
2019-06-17T12:29:33.792732113+07:00 container die d96bd9ab69b554f53ed29a20929185917a3af29a427e4e1e6be2b13104ed2c11 (com.docker.compose.config-hash=1968fe17b9d9e93f512bdd6ae30a84078ebfdc3ff58f1f557e0a8d0a8c45645b, com.docker.compose.container-number=1, com.docker.compose.oneoff=False, com.docker.compose.project=webui, com.docker.compose.service=ipfs, com.docker.compose.version=1.17.0, exitCode=0, image=ipfs/go-ipfs:v0.4.14, name=webui-ipfs)
2019-06-17T12:29:34.023830805+07:00 container stop d96bd9ab69b554f53ed29a20929185917a3af29a427e4e1e6be2b13104ed2c11 (com.docker.compose.config-hash=1968fe17b9d9e93f512bdd6ae30a84078ebfdc3ff58f1f557e0a8d0a8c45645b, com.docker.compose.container-number=1, com.docker.compose.oneoff=False, com.docker.compose.project=webui, com.docker.compose.service=ipfs, com.docker.compose.version=1.17.0, image=ipfs/go-ipfs:v0.4.14, name=webui-ipfs)
2019-06-17T12:29:34.449760481+07:00 container start d96bd9ab69b554f53ed29a20929185917a3af29a427e4e1e6be2b13104ed2c11 (com.docker.compose.config-hash=1968fe17b9d9e93f512bdd6ae30a84078ebfdc3ff58f1f557e0a8d0a8c45645b, com.docker.compose.container-number=1, com.docker.compose.oneoff=False, com.docker.compose.project=webui, com.docker.compose.service=ipfs, com.docker.compose.version=1.17.0, image=ipfs/go-ipfs:v0.4.14, name=webui-ipfs)
2019-06-17T12:29:34.450009775+07:00 container restart d96bd9ab69b554f53ed29a20929185917a3af29a427e4e1e6be2b13104ed2c11 (com.docker.compose.config-hash=1968fe17b9d9e93f512bdd6ae30a84078ebfdc3ff58f1f557e0a8d0a8c45645b, com.docker.compose.container-number=1, com.docker.compose.oneoff=False, com.docker.compose.project=webui, com.docker.compose.service=ipfs, com.docker.compose.version=1.17.0, image=ipfs/go-ipfs:v0.4.14, name=webui-ipfs)
2019/06/17 05:29:33.793 [INFO] {discovery} new event {ContainerID:d96bd9ab69b554f53ed29a20929185917a3af29a427e4e1e6be2b13104ed2c11 ContainerName:webui-ipfs Group: TS:2019-07-05 07:02:02.792732113 +0000 UTC Status:false}
2019/06/17 05:29:33.794 [WARN] {logger} stream from d96bd9ab69b554f53ed29a20929185917a3af29a427e4e1e6be2b13104ed2c11 terminated with error context canceled
2019/06/17 05:29:34.026 [INFO] {discovery} new event {ContainerID:d96bd9ab69b554f53ed29a20929185917a3af29a427e4e1e6be2b13104ed2c11 ContainerName:webui-ipfs Group: TS:2019-07-05 07:02:03.023830805 +0000 UTC Status:false}
2019/06/17 05:29:34.450 [INFO] {discovery} new event {ContainerID:d96bd9ab69b554f53ed29a20929185917a3af29a427e4e1e6be2b13104ed2c11 ContainerName:webui-ipfs Group: TS:2019-07-05 07:02:03.449760481 +0000 UTC Status:true}
2019/06/17 05:29:34.450 [INFO] {app} loggers created for logs/webui-ipfs.log and logs/webui-ipfs.log, max.size=10M, max.files=10, max.days=30
2019/06/17 05:29:34.450 [INFO] {logger} start log streamer for webui-ipfs
2019-06-17T12:29:54.809960170+07:00 container kill d96bd9ab69b554f53ed29a20929185917a3af29a427e4e1e6be2b13104ed2c11 (com.docker.compose.config-hash=1968fe17b9d9e93f512bdd6ae30a84078ebfdc3ff58f1f557e0a8d0a8c45645b, com.docker.compose.container-number=1, com.docker.compose.oneoff=False, com.docker.compose.project=webui, com.docker.compose.service=ipfs, com.docker.compose.version=1.17.0, image=ipfs/go-ipfs:v0.4.14, name=webui-ipfs, signal=15)
2019-06-17T12:29:54.890460627+07:00 container die d96bd9ab69b554f53ed29a20929185917a3af29a427e4e1e6be2b13104ed2c11 (com.docker.compose.config-hash=1968fe17b9d9e93f512bdd6ae30a84078ebfdc3ff58f1f557e0a8d0a8c45645b, com.docker.compose.container-number=1, com.docker.compose.oneoff=False, com.docker.compose.project=webui, com.docker.compose.service=ipfs, com.docker.compose.version=1.17.0, exitCode=0, image=ipfs/go-ipfs:v0.4.14, name=webui-ipfs)
2019-06-17T12:29:55.102520106+07:00 container stop d96bd9ab69b554f53ed29a20929185917a3af29a427e4e1e6be2b13104ed2c11 (com.docker.compose.config-hash=1968fe17b9d9e93f512bdd6ae30a84078ebfdc3ff58f1f557e0a8d0a8c45645b, com.docker.compose.container-number=1, com.docker.compose.oneoff=False, com.docker.compose.project=webui, com.docker.compose.service=ipfs, com.docker.compose.version=1.17.0, image=ipfs/go-ipfs:v0.4.14, name=webui-ipfs)
2019-06-17T12:29:55.509882486+07:00 container start d96bd9ab69b554f53ed29a20929185917a3af29a427e4e1e6be2b13104ed2c11 (com.docker.compose.config-hash=1968fe17b9d9e93f512bdd6ae30a84078ebfdc3ff58f1f557e0a8d0a8c45645b, com.docker.compose.container-number=1, com.docker.compose.oneoff=False, com.docker.compose.project=webui, com.docker.compose.service=ipfs, com.docker.compose.version=1.17.0, image=ipfs/go-ipfs:v0.4.14, name=webui-ipfs)
2019-06-17T12:29:55.510195305+07:00 container restart d96bd9ab69b554f53ed29a20929185917a3af29a427e4e1e6be2b13104ed2c11 (com.docker.compose.config-hash=1968fe17b9d9e93f512bdd6ae30a84078ebfdc3ff58f1f557e0a8d0a8c45645b, com.docker.compose.container-number=1, com.docker.compose.oneoff=False, com.docker.compose.project=webui, com.docker.compose.service=ipfs, com.docker.compose.version=1.17.0, image=ipfs/go-ipfs:v0.4.14, name=webui-ipfs)
2019/06/17 05:29:54.891 [INFO] {discovery} new event {ContainerID:d96bd9ab69b554f53ed29a20929185917a3af29a427e4e1e6be2b13104ed2c11 ContainerName:webui-ipfs Group: TS:2019-07-05 07:02:23.890460627 +0000 UTC Status:false}
2019/06/17 05:29:54.891 [WARN] {logger} stream from d96bd9ab69b554f53ed29a20929185917a3af29a427e4e1e6be2b13104ed2c11 terminated with error context canceled
2019/06/17 05:29:55.103 [INFO] {discovery} new event {ContainerID:d96bd9ab69b554f53ed29a20929185917a3af29a427e4e1e6be2b13104ed2c11 ContainerName:webui-ipfs Group: TS:2019-07-05 07:02:24.102520106 +0000 UTC Status:false}
2019/06/17 05:29:55.510 [INFO] {discovery} new event {ContainerID:d96bd9ab69b554f53ed29a20929185917a3af29a427e4e1e6be2b13104ed2c11 ContainerName:webui-ipfs Group: TS:2019-07-05 07:02:24.509882486 +0000 UTC Status:true}
2019/06/17 05:29:55.512 [INFO] {app} loggers created for logs/webui-ipfs.log and logs/webui-ipfs.log, max.size=10M, max.files=10, max.days=30
2019/06/17 05:29:55.512 [INFO] {logger} start log streamer for webui-ipfs
2019/06/17 05:29:55.534 [INFO] {discovery} new event {ContainerID:d96bd9ab69b554f53ed29a20929185917a3af29a427e4e1e6be2b13104ed2c11 ContainerName:webui-ipfs Group: TS:2019-07-05 07:02:24.510195305 +0000 UTC Status:true}
2019/06/17 05:29:55.534 [WARN] {app} ignore dbl-start {ContainerID:d96bd9ab69b554f53ed29a20929185917a3af29a427e4e1e6be2b13104ed2c11 ContainerName:webui-ipfs Group: TS:2019-07-05 07:02:24.510195305 +0000 UTC Status:true}
My environment: Docker version 17.09.1-ce, build 19e2cf6
, Ubuntu 16.04.3 LTS
The same reproduced on: Docker version 18.06.1-ce, build e68fc7a
, Ubuntu 18.04.2 LTS
thx. I think we can close the ticket.
Pls note - code from this project was merged into dkll providing the same functionality as docker-logger (dkll agent) plus server mode to collect logs (dkll server) and CLI client to access (dkll client). I'm planning to switch this one into maintenance mode.
Thank you for the quick fix :+1: . Could you publish a new release?
Thanks for info. I'm going to look at dkll
:wink:
Could you publish a new release?
done
docker restart [my container name]
leads to all records are logged twice.I suppose, two events
start
+restart
are cause of this problem.This is output of
docker events --filter 'container=[my container name]'
:This is log of
docker-logger
container: