Autodiscover + Docker decoding JSON: EOF

Hi,

i am trying to get some nginx-logs from the container shipped to elasticsearch... but i am getting some json-decoding errors using filebeat 6.2.3.
Weird thing is, these errors apper for already running containers.
If i start a new nginx:alpine container the logs appear just fine...

filebeat.autodiscover:
  providers:
    - type: docker
      templates:
        - condition:
            contains:
              docker.container.name: "nginx"
          config:
            - module: nginx
              access:
                prospector:
                  type: docker
                  containers.stream: stdout
                  containers.ids:
                    - "${data.docker.container.id}"
              error:
                prospector:
                  type: docker
                  containers.stream: stderr
                  containers.ids:
                    - "${data.docker.container.id}"
|2018-04-03T19:10:23.701+0200|INFO|log/harvester.go:216|Harvester started for file: /var/lib/docker/containers/5ca40e68ff704127f3a8994912c67cdea77c50d9d6a4a99dd6e2fa5f3b433a19/5ca40e68ff704127f3a8994912c67cdea77c50d9d6a4a99dd6e2fa5f3b433a19-json.log|
|---|---|---|---|
|2018-04-03T19:10:23.701+0200|INFO|log/harvester.go:216|Harvester started for file: /var/lib/docker/containers/5ca40e68ff704127f3a8994912c67cdea77c50d9d6a4a99dd6e2fa5f3b433a19/5ca40e68ff704127f3a8994912c67cdea77c50d9d6a4a99dd6e2fa5f3b433a19-json.log|
|2018-04-03T19:10:23.701+0200|ERROR|log/harvester.go:243|Read line error: decoding docker JSON: EOF; File: %!(EXTRA string=/var/lib/docker/containers/5ca40e68ff704127f3a8994912c67cdea77c50d9d6a4a99dd6e2fa5f3b433a19/5ca40e68ff704127f3a8994912c67cdea77c50d9d6a4a99dd6e2fa5f3b433a19-json.log)|
|2018-04-03T19:10:23.701+0200|ERROR|log/harvester.go:243|Read line error: decoding docker JSON: EOF; File: %!(EXTRA string=/var/lib/docker/containers/5ca40e68ff704127f3a8994912c67cdea77c50d9d6a4a99dd6e2fa5f3b433a19/5ca40e68ff704127f3a8994912c67cdea77c50d9d6a4a99dd6e2fa5f3b433a19-json.log)|

What version of docker are you using? Is the problem easily reproducible or it only happens from time to time?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.