Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MonitorEventsAsync missing or blocking the last piece of data #576

Open
chrisdaiii opened this issue Jul 22, 2022 · 5 comments
Open

MonitorEventsAsync missing or blocking the last piece of data #576

chrisdaiii opened this issue Jul 22, 2022 · 5 comments

Comments

@chrisdaiii
Copy link

I found that in versions after 3.125.4 using the MonitorEventsAsync method, the last piece of data is lost (blocked), and it will only output the last piece of data when the monitoring event is triggered next time。

It should be caused by modifying the MonitorEventsAsync method code.

Problematic versions: 3.125.5, 3.125.10

Example:
step one:
docker rm xxxx
output action: die

step two:
docker run xxx
output action: destroy create start

The last piece of data is blocked until the next trigger to get it。

@chrisdaiii
Copy link
Author

Is this repository out of maintenance? I mentioned that the issue has been waiting for a long time and no maintainer has fixed it or replied. Since the version of MonitorEventsAsync after 3.125.4, there has been a problem, which has seriously affected my functional business...

@HofmeisterAn
Copy link
Contributor

HofmeisterAn commented Aug 29, 2022

Can you share some more information or a small example? I cannot reproduce it. I tried following:

  1. Create a container (docker run -d httpd)
  2. Run an application that monitors the events
  3. Delete a container (docker rm -f $id)

I immediately receive following events:

1661759715 71670a9b1055fafe787592d95b5062cafa6a0616ce3eb139e3e4fd884c86c320 kill
1661759715 71670a9b1055fafe787592d95b5062cafa6a0616ce3eb139e3e4fd884c86c320 die
1661759715 disconnect
1661759715 71670a9b1055fafe787592d95b5062cafa6a0616ce3eb139e3e4fd884c86c320 destroy

@galvesribeiro
Copy link
Member

@13750573877 you have to understand that none of us maintaining the project are full time employees of it. We have a life outside of it.

I can't reproduce the problem either so if you could make a simple repo with a simple console app reproducing the problem you are complaining it would be useful for us to try find out what is going on. Blame that there is a problem without enough context is like complain that it is cold in Alaska.

@AOne-T
Copy link

AOne-T commented Jul 25, 2023

I can confirm this problem. We also encountered with the same version.
We use a Docker Swarm cluster and have our app that monitors services start/die events to register/unregister services. But as we found if we update to version higher than 3.125.4 we do not receive start event.
For example, we restart three services. The last one that was restarted receives only die event. The start event for the third service will be received only if we restart the fourth service, which will trigger the third start event and fourth die event and no fourth start event. And this will last forever.

@AOne-T
Copy link

AOne-T commented Jul 25, 2023

The problem is in lib, because docker events cli command outputs start event, while lib not.
Logs from docker cli

docker events
2023-07-25T07:55:25.154993096Z service update zjdf54ktb16clut9ix1c9iuu7 (name=services_cargoservice)
2023-07-25T07:55:25.165486061Z service update zjdf54ktb16clut9ix1c9iuu7 (name=services_cargoservice, updatestate.new=updating)
2023-07-25T07:55:25.632694916Z container create a5bed2dda80cd002b39aa43dfb07e002637bf104d83c6d1c902e9414c88274f0 (com.docker.registrator.service.50043.healthcheck.grpc=true, com.docker.registrator.service.50043.healthcheck.initialstatus=passing, com.docker.registrator.service.50043.healthcheck.interval=10s, com.docker.registrator.service.50043.healthcheck.timeout=1s, com.docker.registrator.service.50043.name=cargoservice-grpc, com.docker.registrator.service.5043.healthcheck.http=/healthcheck, com.docker.registrator.service.5043.healthcheck.initialstatus=passing, com.docker.registrator.service.5043.healthcheck.interval=10s, com.docker.registrator.service.5043.healthcheck.timeout=1s, com.docker.registrator.service.5043.meta={"auth_webapi_locations":"/api/cargoservice"}, com.docker.registrator.service.5043.name=cargoservice, com.docker.registrator.service.5043.tags=webapi_endpoint, com.docker.stack.namespace=services, com.docker.swarm.node.id=qu0u64fhf9nljwfdm913wzpnm, com.docker.swarm.service.id=zjdf54ktb16clut9ix1c9iuu7, com.docker.swarm.service.name=services_cargoservice, com.docker.swarm.task=, com.docker.swarm.task.id=5rcxpaeh3h3qevwlxed0q3l4p, com.docker.swarm.task.name=services_cargoservice.1.5rcxpaeh3h3qevwlxed0q3l4p, image=cargoservice:latest@sha256:0d65c69b81198b27a4a73eaca162ab3fdf41fbac7fa671d6939d945722e0d9e9, name=services_cargoservice.1.5rcxpaeh3h3qevwlxed0q3l4p)
2023-07-25T07:55:28.558788733Z container kill d79f64fa51208fba76ee7b7e1afe12598f61233c67112ef09c9f72fa263e6418 (com.docker.registrator.service.50043.healthcheck.grpc=true, com.docker.registrator.service.50043.healthcheck.initialstatus=passing, com.docker.registrator.service.50043.healthcheck.interval=10s, com.docker.registrator.service.50043.healthcheck.timeout=1s, com.docker.registrator.service.50043.name=cargoservice-grpc, com.docker.registrator.service.5043.healthcheck.http=/healthcheck, com.docker.registrator.service.5043.healthcheck.initialstatus=passing, com.docker.registrator.service.5043.healthcheck.interval=10s, com.docker.registrator.service.5043.healthcheck.timeout=1s, com.docker.registrator.service.5043.meta={"auth_webapi_locations":"/api/cargoservice"}, com.docker.registrator.service.5043.name=cargoservice, com.docker.registrator.service.5043.tags=webapi_endpoint, com.docker.stack.namespace=services, com.docker.swarm.node.id=qu0u64fhf9nljwfdm913wzpnm, com.docker.swarm.service.id=zjdf54ktb16clut9ix1c9iuu7, com.docker.swarm.service.name=services_cargoservice, com.docker.swarm.task=, com.docker.swarm.task.id=x1hedwoucylccpnanqmyfj0oh, com.docker.swarm.task.name=services_cargoservice.1.x1hedwoucylccpnanqmyfj0oh, image=cargoservice:latest@sha256:0d65c69b81198b27a4a73eaca162ab3fdf41fbac7fa671d6939d945722e0d9e9, name=services_cargoservice.1.x1hedwoucylccpnanqmyfj0oh, signal=15)
2023-07-25T07:55:29.344881952Z network disconnect gv74ax2nm67sbtj7svyw0gfg1 (container=d79f64fa51208fba76ee7b7e1afe12598f61233c67112ef09c9f72fa263e6418, name=ingress, type=overlay)
2023-07-25T07:55:29.345336050Z network disconnect nvzlvob0lgtnvk9s3y3mbj5ar (container=d79f64fa51208fba76ee7b7e1afe12598f61233c67112ef09c9f72fa263e6418, name=intrnl, type=overlay)
2023-07-25T07:55:29.380368764Z container stop d79f64fa51208fba76ee7b7e1afe12598f61233c67112ef09c9f72fa263e6418 (com.docker.registrator.service.50043.healthcheck.grpc=true, com.docker.registrator.service.50043.healthcheck.initialstatus=passing, com.docker.registrator.service.50043.healthcheck.interval=10s, com.docker.registrator.service.50043.healthcheck.timeout=1s, com.docker.registrator.service.50043.name=cargoservice-grpc, com.docker.registrator.service.5043.healthcheck.http=/healthcheck, com.docker.registrator.service.5043.healthcheck.initialstatus=passing, com.docker.registrator.service.5043.healthcheck.interval=10s, com.docker.registrator.service.5043.healthcheck.timeout=1s, com.docker.registrator.service.5043.meta={"auth_webapi_locations":"/api/cargoservice"}, com.docker.registrator.service.5043.name=cargoservice, com.docker.registrator.service.5043.tags=webapi_endpoint, com.docker.stack.namespace=services, com.docker.swarm.node.id=qu0u64fhf9nljwfdm913wzpnm, com.docker.swarm.service.id=zjdf54ktb16clut9ix1c9iuu7, com.docker.swarm.service.name=services_cargoservice, com.docker.swarm.task=, com.docker.swarm.task.id=x1hedwoucylccpnanqmyfj0oh, com.docker.swarm.task.name=services_cargoservice.1.x1hedwoucylccpnanqmyfj0oh, image=cargoservice:latest@sha256:0d65c69b81198b27a4a73eaca162ab3fdf41fbac7fa671d6939d945722e0d9e9, name=services_cargoservice.1.x1hedwoucylccpnanqmyfj0oh)
2023-07-25T07:55:29.428049898Z container die d79f64fa51208fba76ee7b7e1afe12598f61233c67112ef09c9f72fa263e6418 (com.docker.registrator.service.50043.healthcheck.grpc=true, com.docker.registrator.service.50043.healthcheck.initialstatus=passing, com.docker.registrator.service.50043.healthcheck.interval=10s, com.docker.registrator.service.50043.healthcheck.timeout=1s, com.docker.registrator.service.50043.name=cargoservice-grpc, com.docker.registrator.service.5043.healthcheck.http=/healthcheck, com.docker.registrator.service.5043.healthcheck.initialstatus=passing, com.docker.registrator.service.5043.healthcheck.interval=10s, com.docker.registrator.service.5043.healthcheck.timeout=1s, com.docker.registrator.service.5043.meta={"auth_webapi_locations":"/api/cargoservice"}, com.docker.registrator.service.5043.name=cargoservice, com.docker.registrator.service.5043.tags=webapi_endpoint, com.docker.stack.namespace=services, com.docker.swarm.node.id=qu0u64fhf9nljwfdm913wzpnm, com.docker.swarm.service.id=zjdf54ktb16clut9ix1c9iuu7, com.docker.swarm.service.name=services_cargoservice, com.docker.swarm.task=, com.docker.swarm.task.id=x1hedwoucylccpnanqmyfj0oh, com.docker.swarm.task.name=services_cargoservice.1.x1hedwoucylccpnanqmyfj0oh, execDuration=1141, exitCode=0, image=cargoservice:latest@sha256:0d65c69b81198b27a4a73eaca162ab3fdf41fbac7fa671d6939d945722e0d9e9, name=services_cargoservice.1.x1hedwoucylccpnanqmyfj0oh)
2023-07-25T07:55:29.980693227Z network connect gv74ax2nm67sbtj7svyw0gfg1 (container=a5bed2dda80cd002b39aa43dfb07e002637bf104d83c6d1c902e9414c88274f0, name=ingress, type=overlay)
2023-07-25T07:55:30.058688141Z network connect nvzlvob0lgtnvk9s3y3mbj5ar (container=a5bed2dda80cd002b39aa43dfb07e002637bf104d83c6d1c902e9414c88274f0, name=intrnl, type=overlay)
2023-07-25T07:55:30.667848192Z container start a5bed2dda80cd002b39aa43dfb07e002637bf104d83c6d1c902e9414c88274f0 (com.docker.registrator.service.50043.healthcheck.grpc=true, com.docker.registrator.service.50043.healthcheck.initialstatus=passing, com.docker.registrator.service.50043.healthcheck.interval=10s, com.docker.registrator.service.50043.healthcheck.timeout=1s, com.docker.registrator.service.50043.name=cargoservice-grpc, com.docker.registrator.service.5043.healthcheck.http=/healthcheck, com.docker.registrator.service.5043.healthcheck.initialstatus=passing, com.docker.registrator.service.5043.healthcheck.interval=10s, com.docker.registrator.service.5043.healthcheck.timeout=1s, com.docker.registrator.service.5043.meta={"auth_webapi_locations":"/api/cargoservice"}, com.docker.registrator.service.5043.name=cargoservice, com.docker.registrator.service.5043.tags=webapi_endpoint, com.docker.stack.namespace=services, com.docker.swarm.node.id=qu0u64fhf9nljwfdm913wzpnm, com.docker.swarm.service.id=zjdf54ktb16clut9ix1c9iuu7, com.docker.swarm.service.name=services_cargoservice, com.docker.swarm.task=, com.docker.swarm.task.id=5rcxpaeh3h3qevwlxed0q3l4p, com.docker.swarm.task.name=services_cargoservice.1.5rcxpaeh3h3qevwlxed0q3l4p, image=cargoservice:latest@sha256:0d65c69b81198b27a4a73eaca162ab3fdf41fbac7fa671d6939d945722e0d9e9, name=services_cargoservice.1.5rcxpaeh3h3qevwlxed0q3l4p)

Logs from our app:

25-07-2023 07:43:49 | info: Microsoft.Hosting.Lifetime[0]
      Application started. Press Ctrl+C to shut down.
25-07-2023 07:43:49 | info: Microsoft.Hosting.Lifetime[0]
      Hosting environment: Production
25-07-2023 07:43:49 | info: Microsoft.Hosting.Lifetime[0]
      Content root path: /app/
25-07-2023 07:55:25 | info: Registrator.Docker.DockerEventListener[0]
      Received message from Docker: {"Status":"create","ID":"a5bed2dda80cd002b39aa43dfb07e002637bf104d83c6d1c902e9414c88274f0","From":"cargoservice:latest@sha256:0d65c69b81198b27a4a73eaca162ab3fdf41fbac7fa671d6939d945722e0d9e9","Type":"container","Action":"create","Actor":{"ID":"a5bed2dda80cd002b39aa43dfb07e002637bf104d83c6d1c902e9414c88274f0","Attributes":{"com.docker.registrator.service.50043.healthcheck.grpc":"true","com.docker.registrator.service.50043.healthcheck.initialstatus":"passing","com.docker.registrator.service.50043.healthcheck.interval":"10s","com.docker.registrator.service.50043.healthcheck.timeout":"1s","com.docker.registrator.service.50043.name":"cargoservice-grpc","com.docker.registrator.service.5043.healthcheck.http":"/healthcheck","com.docker.registrator.service.5043.healthcheck.initialstatus":"passing","com.docker.registrator.service.5043.healthcheck.interval":"10s","com.docker.registrator.service.5043.healthcheck.timeout":"1s","com.docker.registrator.service.5043.meta":"{\u0022auth_webapi_locations\u0022:\u0022/api/cargoservice\u0022}","com.docker.registrator.service.5043.name":"cargoservice","com.docker.registrator.service.5043.tags":"webapi_endpoint","com.docker.stack.namespace":"services","com.docker.swarm.node.id":"qu0u64fhf9nljwfdm913wzpnm","com.docker.swarm.service.id":"zjdf54ktb16clut9ix1c9iuu7","com.docker.swarm.service.name":"services_cargoservice","com.docker.swarm.task":"","com.docker.swarm.task.id":"5rcxpaeh3h3qevwlxed0q3l4p","com.docker.swarm.task.name":"services_cargoservice.1.5rcxpaeh3h3qevwlxed0q3l4p","image":"cargoservice:latest@sha256:0d65c69b81198b27a4a73eaca162ab3fdf41fbac7fa671d6939d945722e0d9e9","name":"services_cargoservice.1.5rcxpaeh3h3qevwlxed0q3l4p"}},"Scope":"local","Time":1690271725,"TimeNano":1690271725632694916}
25-07-2023 07:55:25 | info: Registrator.Docker.DockerEventListener[0]
      Message logged
25-07-2023 07:55:29 | info: Registrator.Docker.DockerEventListener[0]
      Received message from Docker: {"Status":"kill","ID":"d79f64fa51208fba76ee7b7e1afe12598f61233c67112ef09c9f72fa263e6418","From":"cargoservice:latest@sha256:0d65c69b81198b27a4a73eaca162ab3fdf41fbac7fa671d6939d945722e0d9e9","Type":"container","Action":"kill","Actor":{"ID":"d79f64fa51208fba76ee7b7e1afe12598f61233c67112ef09c9f72fa263e6418","Attributes":{"com.docker.registrator.service.50043.healthcheck.grpc":"true","com.docker.registrator.service.50043.healthcheck.initialstatus":"passing","com.docker.registrator.service.50043.healthcheck.interval":"10s","com.docker.registrator.service.50043.healthcheck.timeout":"1s","com.docker.registrator.service.50043.name":"cargoservice-grpc","com.docker.registrator.service.5043.healthcheck.http":"/healthcheck","com.docker.registrator.service.5043.healthcheck.initialstatus":"passing","com.docker.registrator.service.5043.healthcheck.interval":"10s","com.docker.registrator.service.5043.healthcheck.timeout":"1s","com.docker.registrator.service.5043.meta":"{\u0022auth_webapi_locations\u0022:\u0022/api/cargoservice\u0022}","com.docker.registrator.service.5043.name":"cargoservice","com.docker.registrator.service.5043.tags":"webapi_endpoint","com.docker.stack.namespace":"services","com.docker.swarm.node.id":"qu0u64fhf9nljwfdm913wzpnm","com.docker.swarm.service.id":"zjdf54ktb16clut9ix1c9iuu7","com.docker.swarm.service.name":"services_cargoservice","com.docker.swarm.task":"","com.docker.swarm.task.id":"x1hedwoucylccpnanqmyfj0oh","com.docker.swarm.task.name":"services_cargoservice.1.x1hedwoucylccpnanqmyfj0oh","image":"cargoservice:latest@sha256:0d65c69b81198b27a4a73eaca162ab3fdf41fbac7fa671d6939d945722e0d9e9","name":"services_cargoservice.1.x1hedwoucylccpnanqmyfj0oh","signal":"15"}},"Scope":"local","Time":1690271728,"TimeNano":1690271728558788733}
25-07-2023 07:55:29 | info: Registrator.Docker.DockerEventListener[0]
      Message logged
25-07-2023 07:55:29 | info: Registrator.Docker.DockerEventListener[0]
      Received message from Docker: {"Status":"stop","ID":"d79f64fa51208fba76ee7b7e1afe12598f61233c67112ef09c9f72fa263e6418","From":"cargoservice:latest@sha256:0d65c69b81198b27a4a73eaca162ab3fdf41fbac7fa671d6939d945722e0d9e9","Type":"container","Action":"stop","Actor":{"ID":"d79f64fa51208fba76ee7b7e1afe12598f61233c67112ef09c9f72fa263e6418","Attributes":{"com.docker.registrator.service.50043.healthcheck.grpc":"true","com.docker.registrator.service.50043.healthcheck.initialstatus":"passing","com.docker.registrator.service.50043.healthcheck.interval":"10s","com.docker.registrator.service.50043.healthcheck.timeout":"1s","com.docker.registrator.service.50043.name":"cargoservice-grpc","com.docker.registrator.service.5043.healthcheck.http":"/healthcheck","com.docker.registrator.service.5043.healthcheck.initialstatus":"passing","com.docker.registrator.service.5043.healthcheck.interval":"10s","com.docker.registrator.service.5043.healthcheck.timeout":"1s","com.docker.registrator.service.5043.meta":"{\u0022auth_webapi_locations\u0022:\u0022/api/cargoservice\u0022}","com.docker.registrator.service.5043.name":"cargoservice","com.docker.registrator.service.5043.tags":"webapi_endpoint","com.docker.stack.namespace":"services","com.docker.swarm.node.id":"qu0u64fhf9nljwfdm913wzpnm","com.docker.swarm.service.id":"zjdf54ktb16clut9ix1c9iuu7","com.docker.swarm.service.name":"services_cargoservice","com.docker.swarm.task":"","com.docker.swarm.task.id":"x1hedwoucylccpnanqmyfj0oh","com.docker.swarm.task.name":"services_cargoservice.1.x1hedwoucylccpnanqmyfj0oh","image":"cargoservice:latest@sha256:0d65c69b81198b27a4a73eaca162ab3fdf41fbac7fa671d6939d945722e0d9e9","name":"services_cargoservice.1.x1hedwoucylccpnanqmyfj0oh"}},"Scope":"local","Time":1690271729,"TimeNano":1690271729380368764}
25-07-2023 07:55:29 | info: Registrator.Docker.DockerEventListener[0]
      Message logged
25-07-2023 07:55:30 | info: Registrator.Docker.DockerEventListener[0]
      Received message from Docker: {"Status":"die","ID":"d79f64fa51208fba76ee7b7e1afe12598f61233c67112ef09c9f72fa263e6418","From":"cargoservice:latest@sha256:0d65c69b81198b27a4a73eaca162ab3fdf41fbac7fa671d6939d945722e0d9e9","Type":"container","Action":"die","Actor":{"ID":"d79f64fa51208fba76ee7b7e1afe12598f61233c67112ef09c9f72fa263e6418","Attributes":{"com.docker.registrator.service.50043.healthcheck.grpc":"true","com.docker.registrator.service.50043.healthcheck.initialstatus":"passing","com.docker.registrator.service.50043.healthcheck.interval":"10s","com.docker.registrator.service.50043.healthcheck.timeout":"1s","com.docker.registrator.service.50043.name":"cargoservice-grpc","com.docker.registrator.service.5043.healthcheck.http":"/healthcheck","com.docker.registrator.service.5043.healthcheck.initialstatus":"passing","com.docker.registrator.service.5043.healthcheck.interval":"10s","com.docker.registrator.service.5043.healthcheck.timeout":"1s","com.docker.registrator.service.5043.meta":"{\u0022auth_webapi_locations\u0022:\u0022/api/cargoservice\u0022}","com.docker.registrator.service.5043.name":"cargoservice","com.docker.registrator.service.5043.tags":"webapi_endpoint","com.docker.stack.namespace":"services","com.docker.swarm.node.id":"qu0u64fhf9nljwfdm913wzpnm","com.docker.swarm.service.id":"zjdf54ktb16clut9ix1c9iuu7","com.docker.swarm.service.name":"services_cargoservice","com.docker.swarm.task":"","com.docker.swarm.task.id":"x1hedwoucylccpnanqmyfj0oh","com.docker.swarm.task.name":"services_cargoservice.1.x1hedwoucylccpnanqmyfj0oh","execDuration":"1141","exitCode":"0","image":"cargoservice:latest@sha256:0d65c69b81198b27a4a73eaca162ab3fdf41fbac7fa671d6939d945722e0d9e9","name":"services_cargoservice.1.x1hedwoucylccpnanqmyfj0oh"}},"Scope":"local","Time":1690271729,"TimeNano":1690271729428049898}
25-07-2023 07:55:30 | info: Registrator.Docker.DockerContainerRegistrator[0]
      Container with id = d79f64fa51208fba76ee7b7e1afe12598f61233c67112ef09c9f72fa263e6418 stopped.
25-07-2023 07:55:30 | info: Registrator.Docker.DockerContainerRegistrator[0]
      Service with id = services_cargoservice.1.x1hedwoucylccpnanqmyfj0oh:50043 unregistered.
25-07-2023 07:55:30 | info: Registrator.Docker.DockerContainerRegistrator[0]
      Service with id = services_cargoservice.1.x1hedwoucylccpnanqmyfj0oh:5043 unregistered.
25-07-2023 08:07:21 | info: Registrator.Docker.DockerEventListener[0]
      Received message from Docker: {"Status":"start","ID":"a5bed2dda80cd002b39aa43dfb07e002637bf104d83c6d1c902e9414c88274f0","From":"cargoservice:latest@sha256:0d65c69b81198b27a4a73eaca162ab3fdf41fbac7fa671d6939d945722e0d9e9","Type":"container","Action":"start","Actor":{"ID":"a5bed2dda80cd002b39aa43dfb07e002637bf104d83c6d1c902e9414c88274f0","Attributes":{"com.docker.registrator.service.50043.healthcheck.grpc":"true","com.docker.registrator.service.50043.healthcheck.initialstatus":"passing","com.docker.registrator.service.50043.healthcheck.interval":"10s","com.docker.registrator.service.50043.healthcheck.timeout":"1s","com.docker.registrator.service.50043.name":"cargoservice-grpc","com.docker.registrator.service.5043.healthcheck.http":"/healthcheck","com.docker.registrator.service.5043.healthcheck.initialstatus":"passing","com.docker.registrator.service.5043.healthcheck.interval":"10s","com.docker.registrator.service.5043.healthcheck.timeout":"1s","com.docker.registrator.service.5043.meta":"{\u0022auth_webapi_locations\u0022:\u0022/api/cargoservice\u0022}","com.docker.registrator.service.5043.name":"cargoservice","com.docker.registrator.service.5043.tags":"webapi_endpoint","com.docker.stack.namespace":"services","com.docker.swarm.node.id":"qu0u64fhf9nljwfdm913wzpnm","com.docker.swarm.service.id":"zjdf54ktb16clut9ix1c9iuu7","com.docker.swarm.service.name":"services_cargoservice","com.docker.swarm.task":"","com.docker.swarm.task.id":"5rcxpaeh3h3qevwlxed0q3l4p","com.docker.swarm.task.name":"services_cargoservice.1.5rcxpaeh3h3qevwlxed0q3l4p","image":"cargoservice:latest@sha256:0d65c69b81198b27a4a73eaca162ab3fdf41fbac7fa671d6939d945722e0d9e9","name":"services_cargoservice.1.5rcxpaeh3h3qevwlxed0q3l4p"}},"Scope":"local","Time":1690271730,"TimeNano":1690271730667848192}
25-07-2023 08:07:21 | info: Registrator.Docker.DockerEventListener[0]
      Received message from Docker: {"Status":"create","ID":"1c47679f64c416d74eb78ca821c1896fdb57ac1f8a9e0baff28f47bc2804e210","From":"registrator:latest@sha256:94c7cf4f0917e84f81dff14b552b3c561bd824dcc90018836dfff3c661680b78","Type":"container","Action":"create","Actor":{"ID":"1c47679f64c416d74eb78ca821c1896fdb57ac1f8a9e0baff28f47bc2804e210","Attributes":{"com.docker.stack.namespace":"discovery","com.docker.swarm.node.id":"qu0u64fhf9nljwfdm913wzpnm","com.docker.swarm.service.id":"la6snk0tv7bhlewcwnv9kbvuk","com.docker.swarm.service.name":"discovery_registrator","com.docker.swarm.task":"","com.docker.swarm.task.id":"4addvq1ndmdh28g1plz0ujzgq","com.docker.swarm.task.name":"discovery_registrator.qu0u64fhf9nljwfdm913wzpnm.4addvq1ndmdh28g1plz0ujzgq","image":"registrator:latest@sha256:94c7cf4f0917e84f81dff14b552b3c561bd824dcc90018836dfff3c661680b78","name":"discovery_registrator.qu0u64fhf9nljwfdm913wzpnm.4addvq1ndmdh28g1plz0ujzgq"}},"Scope":"local","Time":1690272441,"TimeNano":1690272441477895914}
25-07-2023 08:07:21 | info: Registrator.Docker.DockerEventListener[0]
      Message logged
25-07-2023 08:07:21 | info: Registrator.Docker.DockerContainerRegistrator[0]
      Container with id = a5bed2dda80cd002b39aa43dfb07e002637bf104d83c6d1c902e9414c88274f0 started.
25-07-2023 08:07:21 | info: Registrator.Docker.DockerContainerRegistrator[0]
      Service with id = services_cargoservice.1.5rcxpaeh3h3qevwlxed0q3l4p:50043 registered.
25-07-2023 08:07:21 | info: Registrator.Docker.DockerContainerRegistrator[0]
      Service with id = services_cargoservice.1.5rcxpaeh3h3qevwlxed0q3l4p:5043 registered.
25-07-2023 08:07:23 | info: Registrator.Docker.DockerEventListener[0]
      Received message from Docker: {"Status":"destroy","ID":"fdc96e4adc845cca6ed07685aa356eee701a7e5f51eaea37ae20fbf60f40d62c","From":"registrator:latest@sha256:4bd1600b0ab0b3440eb7d549e3b5ede3baa5b0f3bef54d0a7975584bd899fb10","Type":"container","Action":"destroy","Actor":{"ID":"fdc96e4adc845cca6ed07685aa356eee701a7e5f51eaea37ae20fbf60f40d62c","Attributes":{"com.docker.stack.namespace":"discovery","com.docker.swarm.node.id":"qu0u64fhf9nljwfdm913wzpnm","com.docker.swarm.service.id":"la6snk0tv7bhlewcwnv9kbvuk","com.docker.swarm.service.name":"discovery_registrator","com.docker.swarm.task":"","com.docker.swarm.task.id":"pexx98dc88u5f8ljw4lnzkivs","com.docker.swarm.task.name":"discovery_registrator.qu0u64fhf9nljwfdm913wzpnm.pexx98dc88u5f8ljw4lnzkivs","image":"registrator:latest@sha256:4bd1600b0ab0b3440eb7d549e3b5ede3baa5b0f3bef54d0a7975584bd899fb10","name":"discovery_registrator.qu0u64fhf9nljwfdm913wzpnm.pexx98dc88u5f8ljw4lnzkivs"}},"Scope":"local","Time":1690272443,"TimeNano":1690272443426991411}
25-07-2023 08:07:23 | info: Registrator.Docker.DockerEventListener[0]
      Message logged
25-07-2023 08:07:24 | info: Microsoft.Hosting.Lifetime[0]
      Application is shutting down...
25-07-2023 08:07:24 | info: Registrator.Docker.DockerEventListener[0]
      Received message from Docker: {"Status":"kill","ID":"e2dfbabd96e4a38ecb52bf56ce2209321d6fd77842fc268c19fe4c4fa77285e6","From":"registrator:latest@sha256:136518243fcd21ec6d27c1e5c81935b1a56c47d75509155ffce3b073dcda2ff0","Type":"container","Action":"kill","Actor":{"ID":"e2dfbabd96e4a38ecb52bf56ce2209321d6fd77842fc268c19fe4c4fa77285e6","Attributes":{"com.docker.stack.namespace":"discovery","com.docker.swarm.node.id":"qu0u64fhf9nljwfdm913wzpnm","com.docker.swarm.service.id":"la6snk0tv7bhlewcwnv9kbvuk","com.docker.swarm.service.name":"discovery_registrator","com.docker.swarm.task":"","com.docker.swarm.task.id":"2nnbmbe9ewh05lcg2e8pdcnjg","com.docker.swarm.task.name":"discovery_registrator.qu0u64fhf9nljwfdm913wzpnm.2nnbmbe9ewh05lcg2e8pdcnjg","image":"registrator:latest@sha256:136518243fcd21ec6d27c1e5c81935b1a56c47d75509155ffce3b073dcda2ff0","name":"discovery_registrator.qu0u64fhf9nljwfdm913wzpnm.2nnbmbe9ewh05lcg2e8pdcnjg","signal":"15"}},"Scope":"local","Time":1690272444,"TimeNano":1690272444326312796}
25-07-2023 08:07:24 | info: Registrator.Docker.DockerEventListener[0]
      Message logged

In log from our app the target service receives start event only when we restart our registator service (or any other service). It seems like it pushes the last event when the new one arrives. (see timestamps)

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

No branches or pull requests

4 participants