Skip to content

Exception while trying to use Logs.fetch() with docker 18.09 #256

@nmaguiar

Description

@nmaguiar

Using release 0.0.6 in a container, with docker 18.09, fails whenever trying to use the logs().fetch() method for another container with the following exception:

com.amihaiemil.docker.UnexpectedResponseException: Expected status 200 but got 400 when calling unix://localhost:80/v1.35/containers/a589995677a2511cd8db4a72e79e04d1b33467f27cf951896f3129f22dca88c4/logs. Response body was {"message":"Bad parameters: you must choose at least one stream"}
        at com.amihaiemil.docker.MatchStatus.handleResponse(MatchStatus.java:66)
        at com.amihaiemil.docker.MatchStatus.handleResponse(MatchStatus.java:39)
        at com.amihaiemil.docker.ReadString.handleResponse(ReadString.java:57)
        at com.amihaiemil.docker.ReadString.handleResponse(ReadString.java:39)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:223)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:165)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:140)
        at com.amihaiemil.docker.HttpClientEnvelope.execute(HttpClientEnvelope.java:103)
        at com.amihaiemil.docker.RtLogs.fetch(RtLogs.java:84)
[...]

From what I understood from "Bad parameters: you must choose at least one stream", it looks like it's necessary to specify if its stdout or stderr since both, by default, are false.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions