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

cannot get any events #234

Open
Kilerd opened this issue Sep 16, 2020 · 4 comments
Open

cannot get any events #234

Kilerd opened this issue Sep 16, 2020 · 4 comments

Comments

@Kilerd
Copy link

Kilerd commented Sep 16, 2020

  • Crate version: git master
  • OS: macos with rust 1.46.0
  • Output of running docker version on the command line:
Client: Docker Engine - Community
 Azure integration  0.1.15
 Version:           19.03.12
 API version:       1.40
 Go version:        go1.13.10
 Git commit:        48a66213fe
 Built:             Mon Jun 22 15:41:33 2020
 OS/Arch:           darwin/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.12
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.13.10
  Git commit:       48a66213fe
  Built:            Mon Jun 22 15:49:27 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.2.13
  GitCommit:        7ad184331fa3e55e52b890ea95e65ba581ae3429
 runc:
  Version:          1.0.0-rc10
  GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

while following the example of getting docker events, there is nothing output in console. and at the same time, I was running docker events and curl --unix-socket /var/run/docker.sock -X GET -N http://docker/events in my terminals. any of them can get the correct output of event, but not the code of example.(I did not change any code of that example.)

@Kilerd
Copy link
Author

Kilerd commented Sep 16, 2020

and with the debug model, i started and stoped one of containers, it got logs like that:

start listening.
[2020-09-16T04:31:53Z DEBUG hyper::proto::h1::io] flushed 32 bytes 
[2020-09-16T04:31:53Z DEBUG hyper::proto::h1::io] read 211 bytes 
[2020-09-16T04:31:53Z DEBUG hyper::proto::h1::io] parsed 7 headers 
[2020-09-16T04:31:53Z DEBUG hyper::proto::h1::conn] incoming body is chunked encoding 
[2020-09-16T04:32:10Z DEBUG hyper::proto::h1::io] read 471 bytes 
[2020-09-16T04:32:10Z DEBUG hyper::proto::h1::decode] incoming chunked header: 0x1D0 (464 bytes) 
[2020-09-16T04:32:10Z DEBUG hyper::proto::h1::io] read 470 bytes 
[2020-09-16T04:32:10Z DEBUG hyper::proto::h1::decode] incoming chunked header: 0x1CF (463 bytes) 
[2020-09-16T04:32:10Z DEBUG hyper::proto::h1::io] read 320 bytes 
[2020-09-16T04:32:10Z DEBUG hyper::proto::h1::decode] incoming chunked header: 0x139 (313 bytes) 
[2020-09-16T04:32:10Z DEBUG hyper::proto::h1::io] read 457 bytes 
[2020-09-16T04:32:10Z DEBUG hyper::proto::h1::decode] incoming chunked header: 0x1C2 (450 bytes) 
[2020-09-16T04:32:18Z DEBUG hyper::proto::h1::io] read 317 bytes 
[2020-09-16T04:32:18Z DEBUG hyper::proto::h1::decode] incoming chunked header: 0x136 (310 bytes) 
[2020-09-16T04:32:18Z DEBUG hyper::proto::h1::io] read 459 bytes 
[2020-09-16T04:32:18Z DEBUG hyper::proto::h1::decode] incoming chunked header: 0x1C4 (452 bytes) 
[2020-09-16T04:32:30Z DEBUG hyper::proto::h1::io] read 471 bytes 
[2020-09-16T04:32:30Z DEBUG hyper::proto::h1::decode] incoming chunked header: 0x1D0 (464 bytes) 
[2020-09-16T04:32:30Z DEBUG hyper::proto::h1::io] read 470 bytes 
[2020-09-16T04:32:30Z DEBUG hyper::proto::h1::decode] incoming chunked header: 0x1CF (463 bytes) 
[2020-09-16T04:32:30Z DEBUG hyper::proto::h1::io] read 320 bytes 
[2020-09-16T04:32:30Z DEBUG hyper::proto::h1::decode] incoming chunked header: 0x139 (313 bytes) 
[2020-09-16T04:32:30Z DEBUG hyper::proto::h1::io] read 457 bytes 
[2020-09-16T04:32:30Z DEBUG hyper::proto::h1::decode] incoming chunked header: 0x1C2 (450 bytes) 

seems docker remote api have sent event to the client, but it cannot serialize the response and throw it out, did it?
would it be the something relating to JSON decode streaming api?

@Kilerd
Copy link
Author

Kilerd commented Sep 16, 2020

tracking inside, the event payload has been sent:

[/Users/k/.cargo/git/checkouts/shiplift-48fc668b583d42d4/49afd94/src/transport.rs:345] chunk_result = Ok(
    b"{\"status\":\"stop\",\"id\":\"ecd450599d4ffdf46441f2021b60b3d944be555b536a75606ff44086c420708e\",\"from\":\"docker/getting-started\",\"Type\":\"container\",\"Action\":\"stop\",\"Actor\":{\"ID\":\"ecd450599d4ffdf46441f2021b60b3d944be555b536a75606ff44086c420708e\",\"Attributes\":{\"image\":\"docker/getting-started\",\"maintainer\":\"NGINX Docker Maintainers \\[email protected]\\u003e\",\"name\":\"loving_faraday\"}},\"scope\":\"local\",\"time\":1600232526,\"timeNano\":1600232526868884729}",
)

@logaritmisk
Copy link

I have the same issue, and it's only on macOS. The same code works like a charm on Ubuntu 20.04.

@Kilerd
Copy link
Author

Kilerd commented Sep 17, 2020

yep, I only tested it on macOS.
but when reviewing the relative code, there is only one HTTP stream response and some stream operations, which DO not have any platform-relative code inside.
so I do not what happens and why.

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

2 participants