DMTF / Redfish-JsonSchema-ResponseValidator

The Redfish JSON Schema Response Validator is a Python3 utility used to validate any JSON resource against DMTF provided JSON schemas
Other
3 stars 6 forks source link

Getting traceback error while running redfish jsonschema response validator #9

Closed Ganesan149 closed 2 weeks ago

Ganesan149 commented 1 year ago

I am doing run using below command,

python3 Redfish-JsonSchema-ResponseValidator/Redfish-JsonSchema-ResponseValidator.py -r https://10.19.102.19 -u root -p 0penPeggy123@ -S -v -i /redfish/v1

and get the below output

Traceback (most recent call last): File "/home/lab/.local/lib/python3.6/site-packages/urllib3/connection.py", line 175, in _new_conn (self._dns_host, self.port), self.timeout, **extra_kw File "/home/lab/.local/lib/python3.6/site-packages/urllib3/util/connection.py", line 72, in create_connection for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): File "/usr/lib/python3.6/socket.py", line 745, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/lab/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 710, in urlopen chunked=chunked, File "/home/lab/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 398, in _make_request conn.request(method, url, **httplib_request_kw) File "/home/lab/.local/lib/python3.6/site-packages/urllib3/connection.py", line 239, in request super(HTTPConnection, self).request(method, url, body=body, headers=headers) File "/usr/lib/python3.6/http/client.py", line 1285, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/lib/python3.6/http/client.py", line 1331, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/lib/python3.6/http/client.py", line 1280, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/lib/python3.6/http/client.py", line 1046, in _send_output self.send(msg) File "/usr/lib/python3.6/http/client.py", line 984, in send self.connect() File "/home/lab/.local/lib/python3.6/site-packages/urllib3/connection.py", line 205, in connect conn = self._new_conn() File "/home/lab/.local/lib/python3.6/site-packages/urllib3/connection.py", line 187, in _new_conn self, "Failed to establish a new connection: %s" % e urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f0dbc387e10>: Failed to establish a new connection: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/lab/.local/lib/python3.6/site-packages/requests/adapters.py", line 450, in send timeout=timeout File "/home/lab/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 788, in urlopen method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2] File "/home/lab/.local/lib/python3.6/site-packages/urllib3/util/retry.py", line 592, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='redfish.dmtf.org', port=80): Max retries exceeded with url: /schemas/v1/ServiceRoot.v1_13_0.json (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f0dbc387e10>: Failed to establish a new connection: [Errno -2] Name or service not known',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "Redfish-JsonSchema-ResponseValidator/Redfish-JsonSchema-ResponseValidator.py", line 456, in rv = ResourceValidate(sys.argv) File "Redfish-JsonSchema-ResponseValidator/Redfish-JsonSchema-ResponseValidator.py", line 139, in init self.valFromHost() File "Redfish-JsonSchema-ResponseValidator/Redfish-JsonSchema-ResponseValidator.py", line 195, in valFromHost self.validate(data,schname,self.url) File "Redfish-JsonSchema-ResponseValidator/Redfish-JsonSchema-ResponseValidator.py", line 362, in validate datac = self.getorcache(schname,'org') File "Redfish-JsonSchema-ResponseValidator/Redfish-JsonSchema-ResponseValidator.py", line 342, in getorcache data = self.getFromOrg(schname) File "Redfish-JsonSchema-ResponseValidator/Redfish-JsonSchema-ResponseValidator.py", line 311, in getFromOrg r = requests.get(self.orgurl + schname) File "/home/lab/.local/lib/python3.6/site-packages/requests/api.py", line 75, in get return request('get', url, params=params, kwargs) File "/home/lab/.local/lib/python3.6/site-packages/requests/api.py", line 61, in request return session.request(method=method, url=url, kwargs) File "/home/lab/.local/lib/python3.6/site-packages/requests/sessions.py", line 529, in request resp = self.send(prep, send_kwargs) File "/home/lab/.local/lib/python3.6/site-packages/requests/sessions.py", line 645, in send r = adapter.send(request, kwargs) File "/home/lab/.local/lib/python3.6/site-packages/requests/adapters.py", line 519, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPConnectionPool(host='redfish.dmtf.org', port=80): Max retries exceeded with url: /schemas/v1/ServiceRoot.v1_13_0.json (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f0dbc387e10>: Failed to establish a new connection: [Errno -2] Name or service not known',))

OS Version / Package Version Installed cat /etc/os-release NAME="Ubuntu" VERSION="18.04.6 LTS (Bionic Beaver)"

pip3 list | grep -i "requests" requests 2.27.1

pip3 list | grep -i "jsonschema" jsonschema 3.2.0

python3 -V Python 3.6.9

mraineri commented 1 year ago

The trace indicates it's not able to access the service. Are you able to confirm the service you're using is accessible and has a stable network connection?

mraineri commented 2 weeks ago

At this time we're archiving this project in favor of the Redfish Service Validator found here: https://github.com/DMTF/Redfish-Service-Validator