bargenson / docker-filebeat

A docker image using the Docker API to collect and ship containers logs to Logstash
142 stars 74 forks source link

No JSON Object Could be decoded #12

Open trajano opened 5 years ago

trajano commented 5 years ago

I just tried to use your image on my swarm, but I got the following result.

Here is my service configuration

  docker-beats:
    image: bargenson/filebeat
    environment:
      - LOGSTASH_HOST=log
      - LOGSTASH_PORT=5044
      - SHIPPER_NAME=docker
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
    deploy:
      mode: global

Here's the log output (it just cycles)

support_docker-beats.0.vpfv01m3fgig@docker-engine    | Initializing Filebeat...
support_docker-beats.0.vpfv01m3fgig@docker-engine    | Traceback (most recent call last):
support_docker-beats.0.vpfv01m3fgig@docker-engine    |   File "<string>", line 3, in <module>
support_docker-beats.0.vpfv01m3fgig@docker-engine    |   File "/usr/lib/python2.7/json/__init__.py", line 339, in loads
support_docker-beats.0.vpfv01m3fgig@docker-engine    | 2018/12/15 04:35:54.223218 geolite.go:24: INFO GeoIP disabled: No paths were set under output.geoip.paths
support_docker-beats.0.vpfv01m3fgig@docker-engine    |     return _default_decoder.decode(s)
support_docker-beats.0.vpfv01m3fgig@docker-engine    |   File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
support_docker-beats.0.vpfv01m3fgig@docker-engine    |     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
support_docker-beats.0.vpfv01m3fgig@docker-engine    |   File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
support_docker-beats.0.vpfv01m3fgig@docker-engine    | 2018/12/15 04:35:54.223345 logstash.go:106: INFO Max Retries set to: 3
support_docker-beats.0.vpfv01m3fgig@docker-engine    |     raise ValueError("No JSON object could be decoded")
support_docker-beats.0.vpfv01m3fgig@docker-engine    | ValueError: No JSON object could be decoded
support_docker-beats.0.vpfv01m3fgig@docker-engine    | 2018/12/15 04:35:54.224152 outputs.go:119: INFO Activated logstash as output plugin.
support_docker-beats.0.vpfv01m3fgig@docker-engine    | 2018/12/15 04:35:54.224207 publish.go:288: INFO Publisher name: docker
support_docker-beats.0.vpfv01m3fgig@docker-engine    | 2018/12/15 04:35:54.224316 async.go:78: INFO Flush Interval set to: 1s
support_docker-beats.0.vpfv01m3fgig@docker-engine    | 2018/12/15 04:35:54.224321 async.go:84: INFO Max Bulk Size set to: 2048
support_docker-beats.0.vpfv01m3fgig@docker-engine    | 2018/12/15 04:35:54.224342 beat.go:147: INFO Init Beat: filebeat; Version: 1.1.1
support_docker-beats.0.vpfv01m3fgig@docker-engine    | 2018/12/15 04:35:54.224938 beat.go:173: INFO filebeat sucessfully setup. Start running.
support_docker-beats.0.vpfv01m3fgig@docker-engine    | 2018/12/15 04:35:54.224962 registrar.go:66: INFO Registry file set to: /opt/.filebeat
support_docker-beats.0.vpfv01m3fgig@docker-engine    | 2018/12/15 04:35:54.224986 prospector.go:127: INFO Set ignore_older duration to 24h0m0s
support_docker-beats.0.vpfv01m3fgig@docker-engine    | 2018/12/15 04:35:54.225017 prospector.go:127: INFO Set scan_frequency duration to 10s
support_docker-beats.0.vpfv01m3fgig@docker-engine    | 2018/12/15 04:35:54.225050 prospector.go:87: INFO Input type set to: stdin
support_docker-beats.0.vpfv01m3fgig@docker-engine    | 2018/12/15 04:35:54.225056 prospector.go:127: INFO Set backoff duration to 1s
support_docker-beats.0.vpfv01m3fgig@docker-engine    | 2018/12/15 04:35:54.225059 prospector.go:127: INFO Set max_backoff duration to 10s
support_docker-beats.0.vpfv01m3fgig@docker-engine    | 2018/12/15 04:35:54.225062 prospector.go:107: INFO force_close_file is disabled
support_docker-beats.0.vpfv01m3fgig@docker-engine    | 2018/12/15 04:35:54.225097 prospector.go:137: INFO Starting prospector of type: stdin
support_docker-beats.0.vpfv01m3fgig@docker-engine    | 2018/12/15 04:35:54.225122 log.go:113: INFO Harvester started for file: -
support_docker-beats.0.vpfv01m3fgig@docker-engine    | 2018/12/15 04:35:54.225167 spooler.go:77: INFO Starting spooler: spool_size: 2048; idle_timeout: 5s
support_docker-beats.0.vpfv01m3fgig@docker-engine    | 2018/12/15 04:35:54.225175 crawler.go:78: INFO All prospectors initialised with 0 states to persist
support_docker-beats.0.vpfv01m3fgig@docker-engine    | 2018/12/15 04:35:54.225180 registrar.go:83: INFO Starting Registrar
support_docker-beats.0.vpfv01m3fgig@docker-engine    | 2018/12/15 04:35:54.225187 publish.go:88: INFO Start sending events to output