Skip to content

APIv2: Streaming closes after a few minutes #5224

@marusak

Description

@marusak

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description
Listening on /events endpoint of the APIv2 closes after a few minutes. It should be kept open as long as anyone is listening.

Steps to reproduce the issue:

  1. In one terminal run sudo podman --log-level=DEBUG system service -t 0
  2. In another terminal run sudo curl --unix-socket /run/podman/podman.sock http://d/v1.24/events
  3. In third terminal run some podman commands (run and stop) and see that the events show up. Then wait for a few minutes, run another command as see that it gets closed.

Describe the results you received:
When I start listening on /events I get messages as expected:

{"Type":"container","Action":"create","Actor":{"ID":"1df2a34f65ffd8eb75649791dc77100eff8b48cc0a4f4d14ded37ab213cb3b4a","Attributes":{"containerExitCode":"0","image":"docker.io/library/fedora:31","name":"objective_herschel"}},"scope":"local","time":1581929252,"timeNano":1581929252899004524}
...

but after a few minutes the curl gets disconnected with curl: (18) transfer closed with outstanding read data remaining and in the verbose podman system service I can see:

ERRO[0167] unable to write json: "write unix /run/podman/podman.sock->@: i/o timeout"

Describe the results you expected:
I expect that the streaming will be kept open as long as I listen to it.

Using own build of the current upstream as there is no release where /events work.

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.locked - please file new issue/PRAssist humans wanting to comment on an old issue or PR with locked comments.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions