jorgebastida / awslogs

AWS CloudWatch logs for Humans™
Other
4.84k stars 335 forks source link

awslogs get sandbox/rubix ALL --watch throws an error time to time #189

Closed alaptseu closed 5 years ago

alaptseu commented 6 years ago

awslogs get sandbox/rubix ALL --watch | grep | grep 'COMMON'

Causes this error after some minutes:

`================================================================================ You've found a bug! Please, raise an issue attaching the following traceback https://github.com/jorgebastida/awslogs/issues/new

Version: 0.10.0 Python: 3.6.0 (default, Mar 4 2017, 12:32:34) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] boto3 version: 1.6.15 Platform: Darwin-17.4.0-x86_64-i386-64bit Config: {'aws_access_key_id': 'SENSITIVE', 'aws_secret_access_key': 'SENSITIVE', 'aws_session_token': 'SENSITIVE', 'aws_profile': 'SENSITIVE', 'aws_region': None, 'log_group_name': 'sandbox/rubix', 'log_stream_name': 'ALL', 'filter_pattern': None, 'watch': True, 'output_group_enabled': True, 'output_stream_enabled': True, 'output_timestamp_enabled': False, 'output_ingestion_time_enabled': False, 'start': '5m', 'end': None, 'color_enabled': True, 'query': None, 'func': 'list_logs'} Args: ['/usr/local/bin/awslogs', 'get', 'sandbox/rubix', 'ALL', '--watch']

Traceback (most recent call last): File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/awslogs/bin.py", line 172, in main getattr(logs, options.func)() File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/awslogs/core.py", line 196, in list_logs consumer() File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/awslogs/core.py", line 137, in consumer for event in generator(): File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/awslogs/core.py", line 124, in generator response = self.client.filter_log_events(kwargs) File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/botocore/client.py", line 314, in _api_call return self._make_api_call(operation_name, kwargs) File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/botocore/client.py", line 599, in _make_api_call operation_model, request_dict) File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/botocore/endpoint.py", line 143, in make_request return self._send_request(request_dict, operation_model) File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/botocore/endpoint.py", line 172, in _send_request success_response, exception): File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/botocore/endpoint.py", line 265, in _needs_retry caught_exception=caught_exception, request_dict=request_dict) File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/botocore/hooks.py", line 227, in emit return self._emit(event_name, kwargs) File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/botocore/hooks.py", line 210, in _emit response = handler(kwargs) File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/botocore/retryhandler.py", line 183, in call if self._checker(attempts, response, caught_exception): File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/botocore/retryhandler.py", line 251, in call caught_exception) File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/botocore/retryhandler.py", line 269, in _should_retry return self._checker(attempt_number, response, caught_exception) File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/botocore/retryhandler.py", line 317, in call caught_exception) File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/botocore/retryhandler.py", line 223, in call attempt_number, caught_exception) File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/botocore/retryhandler.py", line 359, in _check_caught_exception raise caught_exception File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/botocore/endpoint.py", line 213, in _get_response proxies=self.proxies, timeout=self.timeout) File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/botocore/vendored/requests/sessions.py", line 605, in send r.content File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/botocore/vendored/requests/models.py", line 750, in content self._content = bytes().join(self.iter_content(CONTENT_CHUNK_SIZE)) or bytes() File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/botocore/vendored/requests/models.py", line 673, in generate for chunk in self.raw.stream(chunk_size, decode_content=True): File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/botocore/vendored/requests/packages/urllib3/response.py", line 307, in stream data = self.read(amt=amt, decode_content=decode_content) File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/botocore/vendored/requests/packages/urllib3/response.py", line 243, in read data = self._fp.read(amt) File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 449, in read n = self.readinto(b) File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 493, in readinto n = self.fp.readinto(b) File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/socket.py", line 586, in readinto return self._sock.recv_into(b) File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 1002, in recv_into return self.read(nbytes, buffer) File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 865, in read return self._sslobj.read(len, buffer) File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 625, in read v = self._sslobj.read(len, buffer) ConnectionResetError: [Errno 54] Connection reset by peer`

jorgebastida commented 5 years ago

Are you sure this is not a connectivity issue?