docker-java icon indicating copy to clipboard operation
docker-java copied to clipboard

exec with input from stdin gets stuck

Open joshiste opened this issue 4 years ago • 5 comments

I'm trying to send some input to a exec via stdin but when waiting for the completion it's get stuck. Since i'm using docker-java via the testcontainers the okhttp transport is used.

In https://github.com/joshiste/docker-java/commit/ff4e47c725125d3fd3aae536da8e4d6ba22b3674 I've extended ExecStartCmdIT to reproduce the problem.

Results:

  • Netty: OK
  • Jersey: UnsupportedOperationException
  • OkHttp: Timeout
  • HttpClient5: Timeout

joshiste avatar Feb 19 '21 14:02 joshiste

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar May 21 '21 04:05 stale[bot]

Marking this issue as stale doesn't make the bug disappear.

joshiste avatar May 21 '21 09:05 joshiste

@joshiste yes, sorry for that. I just marked it as "acknowledged" to not let it stale again :)

It looks like #1567 could solve it, but there are some roadblocks

bsideup avatar May 21 '21 09:05 bsideup

Hi @joshiste! Could you please try 3.2.13? There were a few fixes in this direction :)

bsideup avatar Feb 15 '22 12:02 bsideup

I've rebased my branch in https://github.com/joshiste/docker-java/tree/issue-1552 to master. The ExecStartCmdIT.execStartWithStdIn still fails with a timeout (looks like it is now only using the apache http client).

The test case resembles a echo Hello World | docker exec -i c55ee08ea9ec cat which terminates correctly on command line.

Running the test case the onError() or onComplete() of the result callback is never called.

I think it would be valuable if you'd add the test to your repository...

joshiste avatar Feb 16 '22 09:02 joshiste