rollbar-agent icon indicating copy to clipboard operation
rollbar-agent copied to clipboard

ConnectionError: ('Connection aborted.', error(32, 'Broken pipe'))

Open barrycarrjr opened this issue 6 years ago • 8 comments

Out of no where we began getting the error below

2018-10-10 21:14:53,004 ERROR Caught exception in ScannerThread.scan_all() loop Traceback (most recent call last): File "/usr/local/rollbar-agent", line 468, in scan_all self.scan_app(app, apps_state) File "/usr/local/rollbar-agent", line 532, in scan_app self.scan_file(app, filename, files_state[filename]) File "/usr/local/rollbar-agent", line 546, in scan_file processor.process(fp, filename, file_state) File "/usr/local/rollbar-agent", line 240, in process self._process_line(line) File "/usr/local/rollbar-agent", line 259, in _process_line self.send_payload(line) File "/usr/local/rollbar-agent", line 226, in send_payload headers={"content-type": "application/json"}) File "/usr/lib/python2.7/dist-packages/requests/api.py", line 107, in post return request('post', url, data=data, json=json, **kwargs) File "/usr/lib/python2.7/dist-packages/requests/api.py", line 53, in request return session.request(method=method, url=url, **kwargs) File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 468, in request resp = self.send(prep, **send_kwargs) File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 576, in send r = adapter.send(request, **kwargs) File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 426, in send raise ConnectionError(err, request=request) ConnectionError: ('Connection aborted.', error(32, 'Broken pipe'))

barrycarrjr avatar Oct 11 '18 18:10 barrycarrjr

Hey Barry,

Sorry to hear you're encountering this issue. Did this error happen just once or repeatedly? And have you tried restarting the agent?

jessewgibbs avatar Oct 11 '18 22:10 jessewgibbs

It was occurring repeatedly for a while. Yes, I restarted the agent but it kept occurring, so I had to turn off the agent. The agent is back on now and the error is not occurring at this time.

barrycarrjr avatar Oct 11 '18 22:10 barrycarrjr

Thanks, Barry, for the update. Glad to hear that this is now working. I'm going to keep this issue open in our backlog as an enhancement to make the messages more informative when there is some kind of IO issue.

jessewgibbs avatar Oct 11 '18 23:10 jessewgibbs

@jessewgibbs I am getting the same error and restarting the agent did not work.

anuj-reef avatar Jan 09 '19 05:01 anuj-reef

@anuj-reef sorry to hear that you're encountering this problem.

Can you let us know:

  • OS version
  • Python version
  • Any other info that might help us to reproduce the problem

jessewgibbs avatar Jan 09 '19 16:01 jessewgibbs

Same problem here, It is caused by sending large payload, The maximum size of request payload is 512kb, It return "413 Request Entity Too Large" when exceed and then the report data was left in targets folder. We write custom truncation strategy to reduce payload size for workaround on PHP webapp, But I think rollbar-agent should take responsibility to handle this exception transparently.

2018-11-13 23:47:20,542 ERROR Caught exception in ScannerThread.scan_all() loopW
Traceback (most recent call last):
  File "/usr/local/rollbar-agent", line 468, in scan_all
    self.scan_app(app, apps_state)
  File "/usr/local/rollbar-agent", line 532, in scan_app
    self.scan_file(app, filename, files_state[filename])
  File "/usr/local/rollbar-agent", line 546, in scan_file
    processor.process(fp, filename, file_state)
  File "/usr/local/rollbar-agent", line 240, in process
    self._process_line(line)
  File "/usr/local/rollbar-agent", line 259, in _process_line
    self.send_payload(line)
  File "/usr/local/rollbar-agent", line 226, in send_payload
    headers={"content-type": "application/json"})
  File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 116, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 60, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 524, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 637, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 498, in send
    raise ConnectionError(err, request=request)

Gasol avatar Jan 10 '19 02:01 Gasol

Agreed. rollbar-agent should just handle this case transparently

srikiraju avatar Mar 25 '19 22:03 srikiraju

Any updates on this bug? I have a similar issue right now. It's hard to debug when I can not catch my Python Exceptions...

levesquejf avatar Jul 02 '20 19:07 levesquejf