problem: doesn't handle client retries gracefully #136

Closed
wesyoung opened this Issue Feb 10, 2017 · 1 comment

Projects

None yet

1 participant

@wesyoung
Member
2017-02-07 22:21:49,803 - DEBUG - csirtgsdk.client[93] - https://csirtg.io/api//users/csirtgadgets/feeds/port-scanners/indicators
Traceback (most recent call last):
  File "/root/.virtualenvs/smrt/bin/csirtg-ufw", line 9, in <module>
    load_entry_point('csirtg-smrt==0+unknown', 'console_scripts', 'csirtg-ufw')()
  File "/root/.virtualenvs/smrt/local/lib/python2.7/site-packages/csirtg_smrt/ufw.py", line 353, in main
    s.client.indicators_create(i)
  File "/root/.virtualenvs/smrt/lib/python2.7/site-packages/csirtg_smrt/client/zcsirtg.py", line 44, in indicators_create
    rv = i.submit()
  File "/root/.virtualenvs/smrt/local/lib/python2.7/site-packages/csirtgsdk/indicator.py", line 151, in submit
    return self.client.post(uri, data)
  File "/root/.virtualenvs/smrt/local/lib/python2.7/site-packages/csirtgsdk/client.py", line 97, in post
    body = self.session.post(uri, data=data, verify=self.verify_ssl)
  File "/root/.virtualenvs/smrt/local/lib/python2.7/site-packages/requests/sessions.py", line 535, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "/root/.virtualenvs/smrt/local/lib/python2.7/site-packages/requests/sessions.py", line 488, in request
    resp = self.send(prep, **send_kwargs)
  File "/root/.virtualenvs/smrt/local/lib/python2.7/site-packages/requests/sessions.py", line 609, in send
    r = adapter.send(request, **kwargs)
  File "/root/.virtualenvs/smrt/local/lib/python2.7/site-packages/requests/adapters.py", line 487, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='csirtg.io', port=443): Max retries exceeded with url: /api//users/csirtgadgets/feeds/port-scanners/indicators (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f3d8e3b3fd0>: Failed to establish a new connection: [Errno 110] Connection timed out',))
@wesyoung wesyoung added the bug label Feb 10, 2017
@wesyoung wesyoung added this to the R5 milestone Feb 10, 2017
@wesyoung
Member
2017-02-07 23:09:57,685 - DEBUG - csirtgsdk.client[93] - https://csirtg.io/api//users/csirtgadgets/feeds/port-scanners/indicators
2017-02-07 23:09:57,688 - ERROR - csirtgsdk.client[101] - request failed: 503
Traceback (most recent call last):
  File "/root/.virtualenvs/smrt/bin/csirtg-ufw", line 9, in <module>
    load_entry_point('csirtg-smrt==0+unknown', 'console_scripts', 'csirtg-ufw')()
  File "/root/.virtualenvs/smrt/local/lib/python2.7/site-packages/csirtg_smrt/ufw.py", line 353, in main
    s.client.indicators_create(i)
  File "/root/.virtualenvs/smrt/lib/python2.7/site-packages/csirtg_smrt/client/zcsirtg.py", line 44, in indicators_create
    rv = i.submit()
  File "/root/.virtualenvs/smrt/local/lib/python2.7/site-packages/csirtgsdk/indicator.py", line 151, in submit
    return self.client.post(uri, data)
  File "/root/.virtualenvs/smrt/local/lib/python2.7/site-packages/csirtgsdk/client.py", line 116, in post
    raise RuntimeError(err)
RuntimeError: unknown 500 error, contact administrator
@wesyoung wesyoung added a commit that closed this issue Feb 22, 2017
@wesyoung wesyoung fixes #136, #135, #137 1ddc3b7
@wesyoung wesyoung closed this in 1ddc3b7 Feb 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment