jsw@boomer ~/src/rpkilog create-http-api * % time rpkilog-hapi 2.57.220.0/22
Traceback (most recent call last):
File "/Users/jsw/.pyenv/versions/3.8.6/lib/python3.8/site-packages/urllib3/connectionpool.py", line 445, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/Users/jsw/.pyenv/versions/3.8.6/lib/python3.8/site-packages/urllib3/connectionpool.py", line 440, in _make_request
httplib_response = conn.getresponse()
File "/Users/jsw/.pyenv/versions/3.8.6/lib/python3.8/http/client.py", line 1347, in getresponse
response.begin()
File "/Users/jsw/.pyenv/versions/3.8.6/lib/python3.8/http/client.py", line 307, in begin
version, status, reason = self._read_status()
File "/Users/jsw/.pyenv/versions/3.8.6/lib/python3.8/http/client.py", line 268, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/Users/jsw/.pyenv/versions/3.8.6/lib/python3.8/socket.py", line 669, in readinto
return self._sock.recv_into(b)
File "/Users/jsw/.pyenv/versions/3.8.6/lib/python3.8/ssl.py", line 1241, in recv_into
return self.read(nbytes, buffer)
File "/Users/jsw/.pyenv/versions/3.8.6/lib/python3.8/ssl.py", line 1099, in read
return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/jsw/.pyenv/versions/3.8.6/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/Users/jsw/.pyenv/versions/3.8.6/lib/python3.8/site-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/Users/jsw/.pyenv/versions/3.8.6/lib/python3.8/site-packages/urllib3/util/retry.py", line 531, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/Users/jsw/.pyenv/versions/3.8.6/lib/python3.8/site-packages/urllib3/packages/six.py", line 735, in reraise
raise value
File "/Users/jsw/.pyenv/versions/3.8.6/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/Users/jsw/.pyenv/versions/3.8.6/lib/python3.8/site-packages/urllib3/connectionpool.py", line 447, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File "/Users/jsw/.pyenv/versions/3.8.6/lib/python3.8/site-packages/urllib3/connectionpool.py", line 336, in _raise_timeout
raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='es-prod.rpkilog.com', port=443): Read timed out. (read timeout=60)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/jsw/.pyenv/versions/3.8.6/lib/python3.8/site-packages/opensearchpy/connection/http_requests.py", line 170, in perform_request
response = self.session.send(prepared_request, **send_kwargs)
File "/Users/jsw/.pyenv/versions/3.8.6/lib/python3.8/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/Users/jsw/.pyenv/versions/3.8.6/lib/python3.8/site-packages/requests/adapters.py", line 529, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='es-prod.rpkilog.com', port=443): Read timed out. (read timeout=60)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/jsw/.pyenv/versions/3.8.6/bin/rpkilog-hapi", line 8, in <module>
sys.exit(cli_entry_point())
File "/Users/jsw/src/rpkilog/python/rpkilog/rpkilog/hapi.py", line 73, in cli_entry_point
result = get_history_for_prefix(**args)
File "/Users/jsw/src/rpkilog/python/rpkilog/rpkilog/hapi.py", line 193, in get_history_for_prefix
retval = invoke_es_query(query=es_query)
File "/Users/jsw/src/rpkilog/python/rpkilog/rpkilog/hapi.py", line 199, in invoke_es_query
qresult = es_client.search(query)
File "/Users/jsw/.pyenv/versions/3.8.6/lib/python3.8/site-packages/opensearchpy/client/utils.py", line 177, in _wrapped
return func(*args, params=params, headers=headers, **kwargs)
File "/Users/jsw/.pyenv/versions/3.8.6/lib/python3.8/site-packages/opensearchpy/client/__init__.py", line 1593, in search
return self.transport.perform_request(
File "/Users/jsw/.pyenv/versions/3.8.6/lib/python3.8/site-packages/opensearchpy/transport.py", line 412, in perform_request
raise e
File "/Users/jsw/.pyenv/versions/3.8.6/lib/python3.8/site-packages/opensearchpy/transport.py", line 373, in perform_request
status, headers_response, data = connection.perform_request(
File "/Users/jsw/.pyenv/versions/3.8.6/lib/python3.8/site-packages/opensearchpy/connection/http_requests.py", line 187, in perform_request
raise ConnectionTimeout("TIMEOUT", str(e), e)
opensearchpy.exceptions.ConnectionTimeout: ConnectionTimeout caused by - ReadTimeout(HTTPSConnectionPool(host='es-prod.rpkilog.com', port=443): Read timed out. (read timeout=60))
rpkilog-hapi 2.57.220.0/22 1.10s user 0.46s system 2% cpu 1:00.89 total
Too Many Requests
jsw@boomer ~/src/rpkilog create-http-api * % time rpkilog-hapi 2.57.220.0/22
Traceback (most recent call last):
File "/Users/jsw/.pyenv/versions/3.8.6/bin/rpkilog-hapi", line 8, in <module>
sys.exit(cli_entry_point())
File "/Users/jsw/src/rpkilog/python/rpkilog/rpkilog/hapi.py", line 73, in cli_entry_point
result = get_history_for_prefix(**args)
File "/Users/jsw/src/rpkilog/python/rpkilog/rpkilog/hapi.py", line 193, in get_history_for_prefix
retval = invoke_es_query(query=es_query)
File "/Users/jsw/src/rpkilog/python/rpkilog/rpkilog/hapi.py", line 199, in invoke_es_query
qresult = es_client.search(query)
File "/Users/jsw/.pyenv/versions/3.8.6/lib/python3.8/site-packages/opensearchpy/client/utils.py", line 177, in _wrapped
return func(*args, params=params, headers=headers, **kwargs)
File "/Users/jsw/.pyenv/versions/3.8.6/lib/python3.8/site-packages/opensearchpy/client/__init__.py", line 1593, in search
return self.transport.perform_request(
File "/Users/jsw/.pyenv/versions/3.8.6/lib/python3.8/site-packages/opensearchpy/transport.py", line 412, in perform_request
raise e
File "/Users/jsw/.pyenv/versions/3.8.6/lib/python3.8/site-packages/opensearchpy/transport.py", line 373, in perform_request
status, headers_response, data = connection.perform_request(
File "/Users/jsw/.pyenv/versions/3.8.6/lib/python3.8/site-packages/opensearchpy/connection/http_requests.py", line 210, in perform_request
self._raise_error(response.status_code, raw_data)
File "/Users/jsw/.pyenv/versions/3.8.6/lib/python3.8/site-packages/opensearchpy/connection/base.py", line 330, in _raise_error
raise HTTP_EXCEPTIONS.get(status_code, TransportError)(
opensearchpy.exceptions.TransportError: TransportError(429, '429 Too Many Requests /_search')
rpkilog-hapi 2.57.220.0/22 1.10s user 0.45s system 173% cpu 0.895 total
ES API HTTP Timeout
Too Many Requests