You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[2023-12-11 09:01:36,943] [ERROR] Problem getting service stats from vrops-vc-... : <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>502 Bad Gateway</title>
</head><body>
<h1>Bad Gateway</h1>
<p>The proxy server received an invalid
response from an upstream server.<br />
</p>
</body></html>
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/requests/models.py", line 971, in json
return complexjson.loads(self.text, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/simplejson/__init__.py", line 514, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/simplejson/decoder.py", line 386, in decode
obj, end = self.raw_decode(s)
^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/simplejson/decoder.py", line 416, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/vrops-exporter/./inventory.py", line 96, in <module>
InventoryBuilder(os.environ.get('TARGET'), os.environ['PORT'], os.environ['SLEEP'])
File "/vrops-exporter/inventory/Builder.py", line 34, in __init__
self.query_inventory_permanent()
File "/vrops-exporter/inventory/Builder.py", line 59, in query_inventory_permanent
self.query_vrops(self.target, vrops_short_name, self.iteration)
File "/vrops-exporter/inventory/Builder.py", line 119, in query_vrops
Vrops.get_service_states(vrops, target, token)
File "/vrops-exporter/tools/Vrops.py", line 672, in get_service_states
return response.json(), response.status_code, response.elapsed.total_seconds()
^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/requests/models.py", line 975, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
The text was updated successfully, but these errors were encountered:
When fetching service_states fails and the reply is malformed, the inventory stops working because the error is not catched.
response.json needs to be catched.
Traceback:
The text was updated successfully, but these errors were encountered: