timdaman / check_docker

Nagios plugin to check docker containers
GNU General Public License v3.0
152 stars 60 forks source link

JSON Decode Error #78

Open tomshort-si opened 3 years ago

tomshort-si commented 3 years ago

Hi,

I successfully installed check_docker via curl, however I get the following error after using this command check_docker --connection vm_ip:4996 --containers gateway-develop --status running.

I can SSH to this machine and docker ps to confirm the name and port of the container. Any help would be appreciated!

Traceback (most recent call last):
  File "/home/mark/.local/lib/python3.8/site-packages/check_docker/check_docker.py", line 982, in main
    perform_checks(argv[1:])
  File "/home/mark/.local/lib/python3.8/site-packages/check_docker/check_docker.py", line 937, in perform_checks
    containers = get_containers(args.containers, args.present)
  File "/home/mark/.local/lib/python3.8/site-packages/check_docker/check_docker.py", line 319, in get_containers
    containers_list, _ = get_url(daemon + '/containers/json?all=1')
  File "/home/mark/.local/lib/python3.8/site-packages/check_docker/check_docker.py", line 280, in get_url
    return process_urllib_response(response), response.status
  File "/home/mark/.local/lib/python3.8/site-packages/check_docker/check_docker.py", line 287, in process_urllib_response
    return json.loads(body)
  File "/usr/lib/python3.8/json/__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.8/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.8/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
UNKNOWN: Exception raised during check': JSONDecodeError('Expecting value: line 1 column 1 (char 0)')
JAACNTT commented 3 years ago

I have the same problem, did you solved it???