Closed nlin24 closed 5 years ago
@Yergidy hey, I tried accessing the APIs on Gen8 again using the requests module; it seems to fail for Protocol Error as well. Please see below for more detail. Any thought? Thanks.
(venv36) nathan@boa:~$ python pull_ilo_data.py --iloip 192.168.1.188 --username admin-ro
password: iLO login password
>
Traceback (most recent call last):
File "/home/nathan/git/venv36/lib/python3.6/site-packages/urllib3/connectionpool.py", line 672, in urlopen
chunked=chunked,
File "/home/nathan/git/venv36/lib/python3.6/site-packages/urllib3/connectionpool.py", line 376, in _make_request
self._validate_conn(conn)
File "/home/nathan/git/venv36/lib/python3.6/site-packages/urllib3/connectionpool.py", line 994, in _validate_conn
conn.connect()
File "/home/nathan/git/venv36/lib/python3.6/site-packages/urllib3/connection.py", line 394, in connect
ssl_context=context,
File "/home/nathan/git/venv36/lib/python3.6/site-packages/urllib3/util/ssl_.py", line 383, in ssl_wrap_socket
return context.wrap_socket(sock)
File "/usr/lib/python3.6/ssl.py", line 407, in wrap_socket
_context=self, _session=session)
File "/usr/lib/python3.6/ssl.py", line 817, in __init__
self.do_handshake()
File "/usr/lib/python3.6/ssl.py", line 1077, in do_handshake
self._sslobj.do_handshake()
File "/usr/lib/python3.6/ssl.py", line 689, in do_handshake
self._sslobj.do_handshake()
OSError: [Errno 0] Error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/nathan/git/venv36/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/home/nathan/git/venv36/lib/python3.6/site-packages/urllib3/connectionpool.py", line 720, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/home/nathan/git/venv36/lib/python3.6/site-packages/urllib3/util/retry.py", line 400, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/home/nathan/git/venv36/lib/python3.6/site-packages/urllib3/packages/six.py", line 734, in reraise
raise value.with_traceback(tb)
File "/home/nathan/git/venv36/lib/python3.6/site-packages/urllib3/connectionpool.py", line 672, in urlopen
chunked=chunked,
File "/home/nathan/git/venv36/lib/python3.6/site-packages/urllib3/connectionpool.py", line 376, in _make_request
self._validate_conn(conn)
File "/home/nathan/git/venv36/lib/python3.6/site-packages/urllib3/connectionpool.py", line 994, in _validate_conn
conn.connect()
File "/home/nathan/git/venv36/lib/python3.6/site-packages/urllib3/connection.py", line 394, in connect
ssl_context=context,
File "/home/nathan/git/venv36/lib/python3.6/site-packages/urllib3/util/ssl_.py", line 383, in ssl_wrap_socket
return context.wrap_socket(sock)
File "/usr/lib/python3.6/ssl.py", line 407, in wrap_socket
_context=self, _session=session)
File "/usr/lib/python3.6/ssl.py", line 817, in __init__
self.do_handshake()
File "/usr/lib/python3.6/ssl.py", line 1077, in do_handshake
self._sslobj.do_handshake()
File "/usr/lib/python3.6/ssl.py", line 689, in do_handshake
self._sslobj.do_handshake()
urllib3.exceptions.ProtocolError: ('Connection aborted.', OSError(0, 'Error'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "pull_ilo_data.py", line 405, in <module>
download_configs(ilo_ip=iLO_creds["ip"], username=iLO_creds["username"], password=iLO_creds["password"])
File "pull_ilo_data.py", line 311, in download_configs
res = requests.post(session_api,headers=headers,json=data,verify=False)
File "/home/nathan/git/venv36/lib/python3.6/site-packages/requests/api.py", line 116, in post
return request('post', url, data=data, json=json, **kwargs)
File "/home/nathan/git/venv36/lib/python3.6/site-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/home/nathan/git/venv36/lib/python3.6/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/home/nathan/git/venv36/lib/python3.6/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/home/nathan/git/venv36/lib/python3.6/site-packages/requests/adapters.py", line 498, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', OSError(0, 'Error'))
(venv36) nathan@boa:~$
@nlin24 Just to be sure, you are using the iLO IP to connect and not the SSH IP?
Hey @Yergidy we got it working. It's a weird one, such that we observed the error on Gen8 occurs on Python 3.6.8 but not on Python 3.8.0. Not sure what's the root cause but seems to be Python interpreter related. Will probably just not-use version 3.6.8. Shall I go ahead and I close the ticket? Thanks.
By the way, yes, I am 100% sure I had the correct iLO IP and login credentials.
If you root caused the issue back to Python 3.6.8 you can close. Thanks!
Hello,
I am having trouble establishing a connection to a Gen8 iLO4 and wanted to see if anybody has a resolution to it. My script seems to work with Gen9 iLO4, with iLO Advanced Limited NRF, firmware version at 2.61 July 27 2018, but for unknown reason I can't get it to connect with a DL360 Gen8 iLO4, with iLO Advanced license, and firmware version at 2.55 Aug 16 2017. It fails for protocol error. I'm able to SSH to the Gen8 iLO4 and also access its web GUI. I am running on Ubuntu 18 LTS and Python 3.6.8. Any suggestions? Thanks in advance.
Error message:
Redfish log: