jorgebastida / jorgebastida/awslogs

Connection reset by peer

Open
#150 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
5k
Forks
342
PR merge metrics
No merged PRs in 30d

Description

================================================================================
You've found a bug! Please, raise an issue attaching the following traceback
https://github.com/jorgebastida/awslogs/issues/new
--------------------------------------------------------------------------------
Version: 0.8.0
Python: 2.7.12 (default, Jul 1 2016, 15:12:24)
[GCC 5.4.0 20160609]
boto3 version: 1.4.4
Platform: Linux-4.4.0-66-generic-x86_64-with-Ubuntu-16.04-xenial
Config: {'output_timestamp_enabled': False, 'output_group_enabled': True, 'end': None, 'log_group_name': '/aws/lambda/masked', 'log_stream_name': 'ALL', 'aws_region': None, 'watch': True, 'aws_access_key_id': 'SENSITIVE', 'start': '5m', 'aws_profile': 'SENSITIVE', 'filter_pattern': None, 'aws_secret_access_key': 'SENSITIVE', 'output_ingestion_time_enabled': False, 'query': None, 'func': 'list_logs', 'aws_session_token': 'SENSITIVE', 'color_enabled': True, 'output_stream_enabled': True}
Args: ['/usr/local/bin/awslogs', 'get', '/aws/lambda/masked', '--watch']

Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/awslogs/bin.py", line 172, in main
getattr(logs, options.func)()
File "/usr/local/lib/python2.7/dist-packages/awslogs/core.py", line 187, in list_logs
consumer()
File "/usr/local/lib/python2.7/dist-packages/awslogs/core.py", line 136, in consumer
for event in generator():
File "/usr/local/lib/python2.7/dist-packages/awslogs/core.py", line 123, in generator
response = self.client.filter_log_events(**kwargs)
File "/home/cyrus/.local/lib/python2.7/site-packages/botocore/client.py", line 253, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/home/cyrus/.local/lib/python2.7/site-packages/botocore/client.py", line 544, in _make_api_call
operation_model, request_dict)
File "/home/cyrus/.local/lib/python2.7/site-packages/botocore/endpoint.py", line 141, in make_request
return self._send_request(request_dict, operation_model)
File "/home/cyrus/.local/lib/python2.7/site-packages/botocore/endpoint.py", line 170, in _send_request
success_response, exception):
File "/home/cyrus/.local/lib/python2.7/site-packages/botocore/endpoint.py", line 249, in _needs_retry
caught_exception=caught_exception, request_dict=request_dict)
File "/home/cyrus/.local/lib/python2.7/site-packages/botocore/hooks.py", line 227, in emit
return self._emit(event_name, kwargs)
File "/home/cyrus/.local/lib/python2.7/site-packages/botocore/hooks.py", line 210, in _emit
response = handler(**kwargs)
File "/home/cyrus/.local/lib/python2.7/site-packages/botocore/retryhandler.py", line 183, in __call__
if self._checker(attempts, response, caught_exception):
File "/home/cyrus/.local/lib/python2.7/site-packages/botocore/retryhandler.py", line 251, in __call__
caught_exception)
File "/home/cyrus/.local/lib/python2.7/site-packages/botocore/retryhandler.py", line 269, in _should_retry
return self._checker(attempt_number, response, caught_exception)
File "/home/cyrus/.local/lib/python2.7/site-packages/botocore/retryhandler.py", line 317, in __call__
caught_exception)
File "/home/cyrus/.local/lib/python2.7/site-packages/botocore/retryhandler.py", line 223, in __call__
attempt_number, caught_exception)
File "/home/cyrus/.local/lib/python2.7/site-packages/botocore/retryhandler.py", line 359, in _check_caught_exception
raise caught_exception
error: [Errno 104] Connection reset by peer
================================================================================

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with awslogs/core.py at generator() line 123 and consumer() line 136, then trace the request through botocore's retry handling shown in the traceback. Reproduce the failure with `awslogs get ... --watch` against CloudWatch logs; done means the connection-reset case is handled without the traceback escaping.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
cli, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.