Hi,
I have instantiated netbox as so:
nb = pynetbox.api( 'https://netbox.domain.tld', token='xxxxxxx', )
When calling pynetbox.dcim.interfaces.all(), I am presented with the following stack trace:
`>>> nb.dcim.interfaces.all()
Traceback (most recent call last):
File "/home/jord/.virtualenvs/netbox/lib64/python3.6/site-packages/requests/packages/urllib3/connection.py", line 142, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "/home/jord/.virtualenvs/netbox/lib64/python3.6/site-packages/requests/packages/urllib3/util/connection.py", line 67, in create_connection
for res in socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM):
File "/usr/lib64/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/jord/.virtualenvs/netbox/lib64/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 578, in urlopen
chunked=chunked)
File "/home/jord/.virtualenvs/netbox/lib64/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 351, in _make_request
self._validate_conn(conn)
File "/home/jord/.virtualenvs/netbox/lib64/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 814, in _validate_conn
conn.connect()
File "/home/jord/.virtualenvs/netbox/lib64/python3.6/site-packages/requests/packages/urllib3/connection.py", line 254, in connect
conn = self._new_conn()
File "/home/jord/.virtualenvs/netbox/lib64/python3.6/site-packages/requests/packages/urllib3/connection.py", line 151, in _new_conn
self, "Failed to establish a new connection: %s" % e)
requests.packages.urllib3.exceptions.NewConnectionError: <requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f92b7eb8f98>: 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/jord/.virtualenvs/netbox/lib64/python3.6/site-packages/requests/adapters.py", line 403, in send
timeout=timeout
File "/home/jord/.virtualenvs/netbox/lib64/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 623, in urlopen
_stacktrace=sys.exc_info()[2])
File "/home/jord/.virtualenvs/netbox/lib64/python3.6/site-packages/requests/packages/urllib3/util/retry.py", line 281, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
requests.packages.urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='netbox.domain.tldapi', port=443): Max retries exceeded with url: /dcim/interfaces/?limit=1000&offset=1050 (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f92b7eb8f98>: 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 "", line 1, in
File "/home/jord/.virtualenvs/netbox/lib64/python3.6/site-packages/pynetbox/lib/endpoint.py", line 119, in all
for i in req.get()
File "/home/jord/.virtualenvs/netbox/lib64/python3.6/site-packages/pynetbox/lib/query.py", line 227, in get
return req_all(self.url)
File "/home/jord/.virtualenvs/netbox/lib64/python3.6/site-packages/pynetbox/lib/query.py", line 220, in req_all
req = make_request(next_url)
File "/home/jord/.virtualenvs/netbox/lib64/python3.6/site-packages/pynetbox/lib/query.py", line 202, in make_request
req = requests.get(url, headers=headers)
File "/home/jord/.virtualenvs/netbox/lib64/python3.6/site-packages/requests/api.py", line 71, in get
return request('get', url, params=params, **kwargs)
File "/home/jord/.virtualenvs/netbox/lib64/python3.6/site-packages/requests/api.py", line 57, in request
return session.request(method=method, url=url, **kwargs)
File "/home/jord/.virtualenvs/netbox/lib64/python3.6/site-packages/requests/sessions.py", line 475, in request
resp = self.send(prep, **send_kwargs)
File "/home/jord/.virtualenvs/netbox/lib64/python3.6/site-packages/requests/sessions.py", line 606, in send
history = [resp for resp in gen] if allow_redirects else []
File "/home/jord/.virtualenvs/netbox/lib64/python3.6/site-packages/requests/sessions.py", line 606, in
history = [resp for resp in gen] if allow_redirects else []
File "/home/jord/.virtualenvs/netbox/lib64/python3.6/site-packages/requests/sessions.py", line 179, in resolve_redirects
**adapter_kwargs
File "/home/jord/.virtualenvs/netbox/lib64/python3.6/site-packages/requests/sessions.py", line 585, in send
r = adapter.send(request, **kwargs)
File "/home/jord/.virtualenvs/netbox/lib64/python3.6/site-packages/requests/adapters.py", line 467, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='netbox.domain.tldapi', port=443): Max retries exceeded with url: /dcim/interfaces/?limit=1000&offset=1050 (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f92b7eb8f98>: Failed to establish a new connection: [Errno -2] Name or service not known',))
`
I've tried to look at the data returned for that pagination range, but to my untrained eye I could not find any fields requiring a specifically serialized object much like the IPAddress object issue I struck in #42. I understand these issues might be completely unrelated, I'm only referencing since the stacktrace I am presented with looks much the same.
Would anyone have some ideas of where to start troubleshooting this?