urllib2.URLError: <urlopen error [Errno 111] Connection refused>
ntwauto opened this issue · 1 comments
Followed the example under README and run into this issue. Can you please help?
get_sh_ver = switch.show('show version')
Traceback (most recent call last):
File "", line 1, in
File "/srv/Home/[user]/.local/lib/python2.7/site-packages/pycsco/nxos/device.py", line 111, in show
data = self.sw1.send_req()
File "/srv/Home/[user]/.local/lib/python2.7/site-packages/pycsco/nxos/nxapi.py", line 287, in send_req
return req.get_resp(self.req_to_string(), self.cookie, self.timeout)
File "/srv/Home/[user]/.local/lib/python2.7/site-packages/pycsco/nxos/nxapi.py", line 141, in get_resp
timeout=timeout)) as resp:
File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 429, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 447, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1228, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1198, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error [Errno 111] Connection refused>
I think the issue is that 6.2.16 code on nexus doesn't support http or https.