Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTPS_PROXY with socks5 not respected #5976

Closed
2 tasks done
pickfire opened this issue Feb 25, 2021 · 2 comments
Closed
2 tasks done

HTTPS_PROXY with socks5 not respected #5976

pickfire opened this issue Feb 25, 2021 · 2 comments
Assignees
Labels
configuration guidance Question that needs advice or information.

Comments

@pickfire
Copy link

Confirm by changing [ ] to [x] below to ensure that it's a bug:

Describe the bug

It prefixes HTTPS_PROXY with https:// even though there are already socks5://.

SDK version number aws-cli/1.19.5 Python/3.9.2 Linux/5.11.1-zen1-1-zen botocore/1.20.5

Platform/OS/Hardware/Device
What are you running the cli on? Linux mi 5.11.1-zen1-1-zen #1 ZEN SMP PREEMPT Tue, 23 Feb 2021 14:05:33 +0000 x86_64 GNU/Linux

To Reproduce (observed behavior)

$ export HTTPS_PROXY=socks5://127.0.0.1:9900
$ aws ec2 describe-instances

Failed to connect to proxy URL: "http://socks5://127.0.0.1:9900"

Expected behavior

It should use the specified proxy instead of tweaking it.

Logs/output

2021-02-25 13:23:37,174 - MainThread - awscli.clidriver - DEBUG - CLI version: aws-cli/1.19.5 Python/3.9.2 Linux/5.11.1-zen1-1-zen botocore/1.20.5
2021-02-25 13:23:37,174 - MainThread - awscli.clidriver - DEBUG - Arguments entered to CLI: ['ec2', 'describe-instances', '--debug']
2021-02-25 13:23:37,174 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function add_scalar_parsers at 0x7f9b6b0cf8b0>
2021-02-25 13:23:37,174 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function register_uri_param_handler at 0x7f9b69ad2280>
2021-02-25 13:23:37,174 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function inject_assume_role_provider_cache at 0x7f9b69b04310>
2021-02-25 13:23:37,175 - MainThread - botocore.utils - DEBUG - IMDS ENDPOINT: http://169.254.169.254/
2021-02-25 13:23:37,176 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function attach_history_handler at 0x7f9b697308b0>
2021-02-25 13:23:37,178 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /usr/lib/python3.9/site-packages/botocore/data/ec2/2016-11-15/service-2.json
2021-02-25 13:23:37,205 - MainThread - botocore.hooks - DEBUG - Event building-command-table.ec2: calling handler functools.partial(<function _remove_commands at 0x7f9b6960ec10>, commands_to_remove=['import-instance', 'import-volume'])
2021-02-25 13:23:37,205 - MainThread - awscli.customizations.removals - DEBUG - Removing operation: import-instance
2021-02-25 13:23:37,205 - MainThread - awscli.customizations.removals - DEBUG - Removing operation: import-volume
2021-02-25 13:23:37,205 - MainThread - botocore.hooks - DEBUG - Event building-command-table.ec2: calling handler <function add_waiters at 0x7f9b695f4160>
2021-02-25 13:23:37,209 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /usr/lib/python3.9/site-packages/botocore/data/ec2/2016-11-15/waiters-2.json
2021-02-25 13:23:37,210 - MainThread - awscli.clidriver - DEBUG - OrderedDict([('filters', <awscli.arguments.ListArgument object at 0x7f9b690f1f10>), ('instance-ids', <awscli.arguments.ListArgument object at 0x7f9b690f1e50>), ('dry-run', <awscli.arguments.BooleanArgument object at 0x7f9b690f1e20>), ('no-dry-run', <awscli.arguments.BooleanArgument object at 0x7f9b690f1dc0>), ('max-results', <awscli.arguments.CLIArgument object at 0x7f9b690f1d90>), ('next-token', <awscli.arguments.CLIArgument object at 0x7f9b690f1d60>)])
2021-02-25 13:23:37,210 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.ec2.describe-instances: calling handler <function add_streaming_output_arg at 0x7f9b6b0cfc10>
2021-02-25 13:23:37,210 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.ec2.describe-instances: calling handler <function rename_arg.<locals>._rename_arg at 0x7f9b69590310>
2021-02-25 13:23:37,210 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.ec2.describe-instances: calling handler <function rename_arg.<locals>._rename_arg at 0x7f9b695903a0>
2021-02-25 13:23:37,210 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.ec2.describe-instances: calling handler functools.partial(<function pull_up_bool at 0x7f9b695f0a60>, event_handler=<botocore.hooks.EventAliaser object at 0x7f9b69b80e50>)
2021-02-25 13:23:37,211 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.ec2.describe-instances: calling handler <function add_cli_input_json at 0x7f9b69b04ca0>
2021-02-25 13:23:37,211 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.ec2.describe-instances: calling handler <function unify_paging_params at 0x7f9b696814c0>
2021-02-25 13:23:37,215 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /usr/lib/python3.9/site-packages/botocore/data/ec2/2016-11-15/paginators-1.json
2021-02-25 13:23:37,215 - MainThread - awscli.customizations.paginate - DEBUG - Modifying paging parameters for operation: DescribeInstances
2021-02-25 13:23:37,216 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.ec2.describe-instances: calling handler <function add_generate_skeleton at 0x7f9b6965f670>
2021-02-25 13:23:37,216 - MainThread - botocore.hooks - DEBUG - Event before-building-argument-table-parser.ec2.describe-instances: calling handler <bound method OverrideRequiredArgsArgument.override_required_args of <awscli.customizations.cliinputjson.CliInputJSONArgument object at 0x7f9b6908f160>>
2021-02-25 13:23:37,216 - MainThread - botocore.hooks - DEBUG - Event before-building-argument-table-parser.ec2.describe-instances: calling handler <bound method GenerateCliSkeletonArgument.override_required_args of <awscli.customizations.generatecliskeleton.GenerateCliSkeletonArgument object at 0x7f9b6908f460>>
2021-02-25 13:23:37,217 - MainThread - botocore.hooks - DEBUG - Event operation-args-parsed.ec2.describe-instances: calling handler functools.partial(<function validate_boolean_mutex_groups at 0x7f9b695f0af0>, boolean_pairs=[])
2021-02-25 13:23:37,217 - MainThread - botocore.hooks - DEBUG - Event operation-args-parsed.ec2.describe-instances: calling handler functools.partial(<function check_should_enable_pagination at 0x7f9b696815e0>, ['next-token', 'max-results'], {}, OrderedDict([('filters', <awscli.arguments.ListArgument object at 0x7f9b690f1f10>), ('instance-ids', <awscli.arguments.ListArgument object at 0x7f9b690f1e50>), ('dry-run', <awscli.arguments.BooleanArgument object at 0x7f9b690f1e20>), ('no-dry-run', <awscli.arguments.BooleanArgument object at 0x7f9b690f1dc0>), ('max-results', <awscli.arguments.CLIArgument object at 0x7f9b690f1d90>), ('next-token', <awscli.arguments.CLIArgument object at 0x7f9b690f1d60>), ('cli-input-json', <awscli.customizations.cliinputjson.CliInputJSONArgument object at 0x7f9b6908f160>), ('starting-token', <awscli.customizations.paginate.PageArgument object at 0x7f9b690f1cd0>), ('page-size', <awscli.customizations.paginate.PageArgument object at 0x7f9b690f1ca0>), ('max-items', <awscli.customizations.paginate.PageArgument object at 0x7f9b6908f310>), ('generate-cli-skeleton', <awscli.customizations.generatecliskeleton.GenerateCliSkeletonArgument object at 0x7f9b6908f460>)]))
2021-02-25 13:23:37,217 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.ec2.describe-instances.filters: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f9b695321f0>
2021-02-25 13:23:37,217 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.ec2.describe-instances.instance-ids: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f9b695321f0>
2021-02-25 13:23:37,217 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.ec2.describe-instances.dry-run: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f9b695321f0>
2021-02-25 13:23:37,217 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.ec2.describe-instances.max-results: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f9b695321f0>
2021-02-25 13:23:37,217 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.ec2.describe-instances.next-token: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f9b695321f0>
2021-02-25 13:23:37,218 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.ec2.describe-instances.cli-input-json: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f9b695321f0>
2021-02-25 13:23:37,218 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.ec2.describe-instances.starting-token: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f9b695321f0>
2021-02-25 13:23:37,218 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.ec2.describe-instances.page-size: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f9b695321f0>
2021-02-25 13:23:37,218 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.ec2.describe-instances.max-items: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f9b695321f0>
2021-02-25 13:23:37,218 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.ec2.describe-instances.generate-cli-skeleton: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f9b695321f0>
2021-02-25 13:23:37,218 - MainThread - botocore.hooks - DEBUG - Event calling-command.ec2.describe-instances: calling handler <bound method CliInputJSONArgument.add_to_call_parameters of <awscli.customizations.cliinputjson.CliInputJSONArgument object at 0x7f9b6908f160>>
2021-02-25 13:23:37,218 - MainThread - botocore.hooks - DEBUG - Event calling-command.ec2.describe-instances: calling handler <bound method GenerateCliSkeletonArgument.generate_json_skeleton of <awscli.customizations.generatecliskeleton.GenerateCliSkeletonArgument object at 0x7f9b6908f460>>
2021-02-25 13:23:37,218 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: env
2021-02-25 13:23:37,218 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: assume-role
2021-02-25 13:23:37,218 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: assume-role-with-web-identity
2021-02-25 13:23:37,218 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: sso
2021-02-25 13:23:37,218 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: shared-credentials-file
2021-02-25 13:23:37,219 - MainThread - botocore.credentials - INFO - Found credentials in shared credentials file: ~/.aws/credentials
2021-02-25 13:23:37,219 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /usr/lib/python3.9/site-packages/botocore/data/endpoints.json
2021-02-25 13:23:37,223 - MainThread - botocore.hooks - DEBUG - Event choose-service-name: calling handler <function handle_service_name_alias at 0x7f9b6a126dc0>
2021-02-25 13:23:37,229 - MainThread - botocore.hooks - DEBUG - Event creating-client-class.ec2: calling handler <function add_generate_presigned_url at 0x7f9b6a1d8670>
2021-02-25 13:23:37,232 - MainThread - botocore.endpoint - DEBUG - Setting ec2 timeout as (60, 60)
2021-02-25 13:23:37,233 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /usr/lib/python3.9/site-packages/botocore/data/_retry.json
2021-02-25 13:23:37,233 - MainThread - botocore.client - DEBUG - Registering retry handlers for service: ec2
2021-02-25 13:23:37,234 - MainThread - botocore.hooks - DEBUG - Event before-parameter-build.ec2.DescribeInstances: calling handler <bound method ParameterAlias.alias_parameter_in_call of <botocore.handlers.ParameterAlias object at 0x7f9b6a158400>>
2021-02-25 13:23:37,234 - MainThread - botocore.hooks - DEBUG - Event before-parameter-build.ec2.DescribeInstances: calling handler <function generate_idempotent_uuid at 0x7f9b6a156040>
2021-02-25 13:23:37,235 - MainThread - botocore.hooks - DEBUG - Event before-call.ec2.DescribeInstances: calling handler <function inject_api_version_header_if_needed at 0x7f9b6a1528b0>
2021-02-25 13:23:37,235 - MainThread - botocore.endpoint - DEBUG - Making request for OperationModel(name=DescribeInstances) with params: {'url_path': '/', 'query_string': '', 'method': 'POST', 'headers': {'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8', 'User-Agent': 'aws-cli/1.19.5 Python/3.9.2 Linux/5.11.1-zen1-1-zen botocore/1.20.5'}, 'body': {'Action': 'DescribeInstances', 'Version': '2016-11-15'}, 'url': 'https://ec2.us-east-1.amazonaws.com/', 'context': {'client_region': 'us-east-1', 'client_config': <botocore.config.Config object at 0x7f9b68dee9d0>, 'has_streaming_input': False, 'auth_type': None}}
2021-02-25 13:23:37,235 - MainThread - botocore.hooks - DEBUG - Event request-created.ec2.DescribeInstances: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x7f9b68dee7f0>>
2021-02-25 13:23:37,235 - MainThread - botocore.hooks - DEBUG - Event choose-signer.ec2.DescribeInstances: calling handler <function set_operation_specific_signer at 0x7f9b6a14dee0>
2021-02-25 13:23:37,235 - MainThread - botocore.auth - DEBUG - Calculating signature using v4 auth.
2021-02-25 13:23:37,235 - MainThread - botocore.auth - DEBUG - CanonicalRequest:
POST
/

content-type:application/x-www-form-urlencoded; charset=utf-8
host:ec2.us-east-1.amazonaws.com
x-amz-date:20210225T052337Z

content-type;host;x-amz-date
6171eb09865e32b0602af0f7957e26573a51f53caaedff02ff88883cb0275885
2021-02-25 13:23:37,235 - MainThread - botocore.auth - DEBUG - StringToSign:
AWS4-HMAC-SHA256
20210225T052337Z
20210225/us-east-1/ec2/aws4_request
8e356274fe56cfea0a31701999ba1f1256bf6e608b368e520a6729ae304305a9
2021-02-25 13:23:37,236 - MainThread - botocore.auth - DEBUG - Signature:
c7781e46d9a3eacbf36eda12a6803fc18f8de2be49d9ea75e79d7ed3fa5b6061
2021-02-25 13:23:37,236 - MainThread - botocore.endpoint - DEBUG - Sending http request: <AWSPreparedRequest stream_output=False, method=POST, url=https://ec2.us-east-1.amazonaws.com/, headers={'Content-Type': b'application/x-www-form-urlencoded; charset=utf-8', 'User-Agent': b'aws-cli/1.19.5 Python/3.9.2 Linux/5.11.1-zen1-1-zen botocore/1.20.5', 'X-Amz-Date': b'20210225T052337Z', 'Authorization': b'AWS4-HMAC-SHA256 Credential=AKIASNOPEDNGTAGGJ3LJ/20210225/us-east-1/ec2/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=c7781e46d9a3eacbf36eda12a6803fc18f8de2be49d9ea75e79d7ed3fa5b6061', 'Content-Length': '43'}>
2021-02-25 13:23:37,236 - MainThread - botocore.httpsession - DEBUG - Certificate path: /usr/lib/python3.9/site-packages/botocore/cacert.pem
2021-02-25 13:23:37,237 - MainThread - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): ec2.us-east-1.amazonaws.com:443
2021-02-25 13:23:37,253 - MainThread - botocore.endpoint - DEBUG - Exception received when sending HTTP request.
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 169, in _new_conn
    conn = connection.create_connection(
  File "/usr/lib/python3.9/site-packages/urllib3/util/connection.py", line 73, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/lib/python3.9/socket.py", line 953, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 696, in urlopen
    self._prepare_proxy(conn)
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 964, in _prepare_proxy
    conn.connect()
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 353, in connect
    conn = self._new_conn()
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 181, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <botocore.awsrequest.AWSHTTPSConnection object at 0x7f9b68dc6be0>: Failed to establish a new connection: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/botocore/httpsession.py", line 311, in send
    urllib_response = conn.urlopen(
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "/usr/lib/python3.9/site-packages/urllib3/util/retry.py", line 506, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/lib/python3.9/site-packages/urllib3/packages/six.py", line 734, in reraise
    raise value.with_traceback(tb)
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 696, in urlopen
    self._prepare_proxy(conn)
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 964, in _prepare_proxy
    conn.connect()
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 353, in connect
    conn = self._new_conn()
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 181, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.ProxyError: ('Cannot connect to proxy.', NewConnectionError('<botocore.awsrequest.AWSHTTPSConnection object at 0x7f9b68dc6be0>: Failed to establish a new connection: [Errno -2] Name or service not known'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/botocore/endpoint.py", line 200, in _do_get_response
    http_response = self._send(request)
  File "/usr/lib/python3.9/site-packages/botocore/endpoint.py", line 269, in _send
    return self.http_session.send(request)
  File "/usr/lib/python3.9/site-packages/botocore/httpsession.py", line 342, in send
    raise ProxyConnectionError(proxy_url=proxy_url, error=e)
botocore.exceptions.ProxyConnectionError: Failed to connect to proxy URL: "http://socks5://127.0.0.1:9900"
2021-02-25 13:23:37,255 - MainThread - botocore.hooks - DEBUG - Event needs-retry.ec2.DescribeInstances: calling handler <botocore.retryhandler.RetryHandler object at 0x7f9b68dc6400>
2021-02-25 13:23:37,255 - MainThread - botocore.retryhandler - DEBUG - retry needed, retryable exception caught: Failed to connect to proxy URL: "http://socks5://127.0.0.1:9900"
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 169, in _new_conn
    conn = connection.create_connection(
  File "/usr/lib/python3.9/site-packages/urllib3/util/connection.py", line 73, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/lib/python3.9/socket.py", line 953, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 696, in urlopen
    self._prepare_proxy(conn)
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 964, in _prepare_proxy
    conn.connect()
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 353, in connect
    conn = self._new_conn()
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 181, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <botocore.awsrequest.AWSHTTPSConnection object at 0x7f9b68dc6be0>: Failed to establish a new connection: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/botocore/httpsession.py", line 311, in send
    urllib_response = conn.urlopen(
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "/usr/lib/python3.9/site-packages/urllib3/util/retry.py", line 506, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/lib/python3.9/site-packages/urllib3/packages/six.py", line 734, in reraise
    raise value.with_traceback(tb)
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 696, in urlopen
    self._prepare_proxy(conn)
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 964, in _prepare_proxy
    conn.connect()
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 353, in connect
    conn = self._new_conn()
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 181, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.ProxyError: ('Cannot connect to proxy.', NewConnectionError('<botocore.awsrequest.AWSHTTPSConnection object at 0x7f9b68dc6be0>: Failed to establish a new connection: [Errno -2] Name or service not known'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/botocore/retryhandler.py", line 269, in _should_retry
    return self._checker(attempt_number, response, caught_exception)
  File "/usr/lib/python3.9/site-packages/botocore/retryhandler.py", line 316, in __call__
    checker_response = checker(attempt_number, response,
  File "/usr/lib/python3.9/site-packages/botocore/retryhandler.py", line 222, in __call__
    return self._check_caught_exception(
  File "/usr/lib/python3.9/site-packages/botocore/retryhandler.py", line 359, in _check_caught_exception
    raise caught_exception
  File "/usr/lib/python3.9/site-packages/botocore/endpoint.py", line 200, in _do_get_response
    http_response = self._send(request)
  File "/usr/lib/python3.9/site-packages/botocore/endpoint.py", line 269, in _send
    return self.http_session.send(request)
  File "/usr/lib/python3.9/site-packages/botocore/httpsession.py", line 342, in send
    raise ProxyConnectionError(proxy_url=proxy_url, error=e)
botocore.exceptions.ProxyConnectionError: Failed to connect to proxy URL: "http://socks5://127.0.0.1:9900"
2021-02-25 13:23:37,256 - MainThread - botocore.retryhandler - DEBUG - Retry needed, action of: 0.9099422194227621
2021-02-25 13:23:37,256 - MainThread - botocore.endpoint - DEBUG - Response received to retry, sleeping for 0.9099422194227621 seconds
2021-02-25 13:23:38,168 - MainThread - botocore.hooks - DEBUG - Event request-created.ec2.DescribeInstances: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x7f9b68dee7f0>>
2021-02-25 13:23:38,168 - MainThread - botocore.hooks - DEBUG - Event choose-signer.ec2.DescribeInstances: calling handler <function set_operation_specific_signer at 0x7f9b6a14dee0>
2021-02-25 13:23:38,169 - MainThread - botocore.auth - DEBUG - Calculating signature using v4 auth.
2021-02-25 13:23:38,169 - MainThread - botocore.auth - DEBUG - CanonicalRequest:
POST
/

content-type:application/x-www-form-urlencoded; charset=utf-8
host:ec2.us-east-1.amazonaws.com
x-amz-date:20210225T052338Z

content-type;host;x-amz-date
6171eb09865e32b0602af0f7957e26573a51f53caaedff02ff88883cb0275885
2021-02-25 13:23:38,169 - MainThread - botocore.auth - DEBUG - StringToSign:
AWS4-HMAC-SHA256
20210225T052338Z
20210225/us-east-1/ec2/aws4_request
291eac2925945420bb4ad04a3b2c5f8e30ce427f3e8412ae1c308b92d6460935
2021-02-25 13:23:38,169 - MainThread - botocore.auth - DEBUG - Signature:
844b29ae69fff4d4271c14b6d442fbe5c6b2d5d6c211763fa02e477b92bcc09d
2021-02-25 13:23:38,169 - MainThread - botocore.endpoint - DEBUG - Sending http request: <AWSPreparedRequest stream_output=False, method=POST, url=https://ec2.us-east-1.amazonaws.com/, headers={'Content-Type': b'application/x-www-form-urlencoded; charset=utf-8', 'User-Agent': b'aws-cli/1.19.5 Python/3.9.2 Linux/5.11.1-zen1-1-zen botocore/1.20.5', 'X-Amz-Date': b'20210225T052338Z', 'Authorization': b'AWS4-HMAC-SHA256 Credential=AKIASNOPEDNGTAGGJ3LJ/20210225/us-east-1/ec2/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=844b29ae69fff4d4271c14b6d442fbe5c6b2d5d6c211763fa02e477b92bcc09d', 'Content-Length': '43'}>
2021-02-25 13:23:38,170 - MainThread - botocore.httpsession - DEBUG - Certificate path: /usr/lib/python3.9/site-packages/botocore/cacert.pem
2021-02-25 13:23:38,170 - MainThread - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (2): ec2.us-east-1.amazonaws.com:443
2021-02-25 13:23:38,188 - MainThread - botocore.endpoint - DEBUG - Exception received when sending HTTP request.
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 169, in _new_conn
    conn = connection.create_connection(
  File "/usr/lib/python3.9/site-packages/urllib3/util/connection.py", line 73, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/lib/python3.9/socket.py", line 953, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 696, in urlopen
    self._prepare_proxy(conn)
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 964, in _prepare_proxy
    conn.connect()
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 353, in connect
    conn = self._new_conn()
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 181, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <botocore.awsrequest.AWSHTTPSConnection object at 0x7f9b68dc6ee0>: Failed to establish a new connection: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/botocore/httpsession.py", line 311, in send
    urllib_response = conn.urlopen(
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "/usr/lib/python3.9/site-packages/urllib3/util/retry.py", line 506, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/lib/python3.9/site-packages/urllib3/packages/six.py", line 734, in reraise
    raise value.with_traceback(tb)
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 696, in urlopen
    self._prepare_proxy(conn)
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 964, in _prepare_proxy
    conn.connect()
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 353, in connect
    conn = self._new_conn()
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 181, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.ProxyError: ('Cannot connect to proxy.', NewConnectionError('<botocore.awsrequest.AWSHTTPSConnection object at 0x7f9b68dc6ee0>: Failed to establish a new connection: [Errno -2] Name or service not known'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/botocore/endpoint.py", line 200, in _do_get_response
    http_response = self._send(request)
  File "/usr/lib/python3.9/site-packages/botocore/endpoint.py", line 269, in _send
    return self.http_session.send(request)
  File "/usr/lib/python3.9/site-packages/botocore/httpsession.py", line 342, in send
    raise ProxyConnectionError(proxy_url=proxy_url, error=e)
botocore.exceptions.ProxyConnectionError: Failed to connect to proxy URL: "http://socks5://127.0.0.1:9900"
2021-02-25 13:23:38,189 - MainThread - botocore.hooks - DEBUG - Event needs-retry.ec2.DescribeInstances: calling handler <botocore.retryhandler.RetryHandler object at 0x7f9b68dc6400>
2021-02-25 13:23:38,189 - MainThread - botocore.retryhandler - DEBUG - retry needed, retryable exception caught: Failed to connect to proxy URL: "http://socks5://127.0.0.1:9900"
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 169, in _new_conn
    conn = connection.create_connection(
  File "/usr/lib/python3.9/site-packages/urllib3/util/connection.py", line 73, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/lib/python3.9/socket.py", line 953, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 696, in urlopen
    self._prepare_proxy(conn)
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 964, in _prepare_proxy
    conn.connect()
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 353, in connect
    conn = self._new_conn()
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 181, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <botocore.awsrequest.AWSHTTPSConnection object at 0x7f9b68dc6ee0>: Failed to establish a new connection: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/botocore/httpsession.py", line 311, in send
    urllib_response = conn.urlopen(
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "/usr/lib/python3.9/site-packages/urllib3/util/retry.py", line 506, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/lib/python3.9/site-packages/urllib3/packages/six.py", line 734, in reraise
    raise value.with_traceback(tb)
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 696, in urlopen
    self._prepare_proxy(conn)
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 964, in _prepare_proxy
    conn.connect()
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 353, in connect
    conn = self._new_conn()
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 181, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.ProxyError: ('Cannot connect to proxy.', NewConnectionError('<botocore.awsrequest.AWSHTTPSConnection object at 0x7f9b68dc6ee0>: Failed to establish a new connection: [Errno -2] Name or service not known'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/botocore/retryhandler.py", line 269, in _should_retry
    return self._checker(attempt_number, response, caught_exception)
  File "/usr/lib/python3.9/site-packages/botocore/retryhandler.py", line 316, in __call__
    checker_response = checker(attempt_number, response,
  File "/usr/lib/python3.9/site-packages/botocore/retryhandler.py", line 222, in __call__
    return self._check_caught_exception(
  File "/usr/lib/python3.9/site-packages/botocore/retryhandler.py", line 359, in _check_caught_exception
    raise caught_exception
  File "/usr/lib/python3.9/site-packages/botocore/endpoint.py", line 200, in _do_get_response
    http_response = self._send(request)
  File "/usr/lib/python3.9/site-packages/botocore/endpoint.py", line 269, in _send
    return self.http_session.send(request)
  File "/usr/lib/python3.9/site-packages/botocore/httpsession.py", line 342, in send
    raise ProxyConnectionError(proxy_url=proxy_url, error=e)
botocore.exceptions.ProxyConnectionError: Failed to connect to proxy URL: "http://socks5://127.0.0.1:9900"
2021-02-25 13:23:38,189 - MainThread - botocore.retryhandler - DEBUG - Retry needed, action of: 0.797292036667872
2021-02-25 13:23:38,189 - MainThread - botocore.endpoint - DEBUG - Response received to retry, sleeping for 0.797292036667872 seconds
2021-02-25 13:23:38,988 - MainThread - botocore.hooks - DEBUG - Event request-created.ec2.DescribeInstances: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x7f9b68dee7f0>>
2021-02-25 13:23:38,988 - MainThread - botocore.hooks - DEBUG - Event choose-signer.ec2.DescribeInstances: calling handler <function set_operation_specific_signer at 0x7f9b6a14dee0>
2021-02-25 13:23:38,989 - MainThread - botocore.auth - DEBUG - Calculating signature using v4 auth.
2021-02-25 13:23:38,989 - MainThread - botocore.auth - DEBUG - CanonicalRequest:
POST
/

content-type:application/x-www-form-urlencoded; charset=utf-8
host:ec2.us-east-1.amazonaws.com
x-amz-date:20210225T052338Z

content-type;host;x-amz-date
6171eb09865e32b0602af0f7957e26573a51f53caaedff02ff88883cb0275885
2021-02-25 13:23:38,989 - MainThread - botocore.auth - DEBUG - StringToSign:
AWS4-HMAC-SHA256
20210225T052338Z
20210225/us-east-1/ec2/aws4_request
291eac2925945420bb4ad04a3b2c5f8e30ce427f3e8412ae1c308b92d6460935
2021-02-25 13:23:38,989 - MainThread - botocore.auth - DEBUG - Signature:
844b29ae69fff4d4271c14b6d442fbe5c6b2d5d6c211763fa02e477b92bcc09d
2021-02-25 13:23:38,989 - MainThread - botocore.endpoint - DEBUG - Sending http request: <AWSPreparedRequest stream_output=False, method=POST, url=https://ec2.us-east-1.amazonaws.com/, headers={'Content-Type': b'application/x-www-form-urlencoded; charset=utf-8', 'User-Agent': b'aws-cli/1.19.5 Python/3.9.2 Linux/5.11.1-zen1-1-zen botocore/1.20.5', 'X-Amz-Date': b'20210225T052338Z', 'Authorization': b'AWS4-HMAC-SHA256 Credential=xxxxxxxxxxxxxxxxxxxxxx/xxxxxxxx/us-east-1/ec2/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=844b29ae69fff4d4271c14b6d442fbe5c6b2d5d6c211763fa02e477b92bcc09d', 'Content-Length': '43'}>
2021-02-25 13:23:38,990 - MainThread - botocore.httpsession - DEBUG - Certificate path: /usr/lib/python3.9/site-packages/botocore/cacert.pem
2021-02-25 13:23:38,990 - MainThread - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (3): ec2.us-east-1.amazonaws.com:443
2021-02-25 13:23:39,008 - MainThread - botocore.endpoint - DEBUG - Exception received when sending HTTP request.
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 169, in _new_conn
    conn = connection.create_connection(
  File "/usr/lib/python3.9/site-packages/urllib3/util/connection.py", line 73, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/lib/python3.9/socket.py", line 953, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 696, in urlopen
    self._prepare_proxy(conn)
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 964, in _prepare_proxy
    conn.connect()
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 353, in connect
    conn = self._new_conn()
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 181, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <botocore.awsrequest.AWSHTTPSConnection object at 0x7f9b68d6e850>: Failed to establish a new connection: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/botocore/httpsession.py", line 311, in send
    urllib_response = conn.urlopen(
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "/usr/lib/python3.9/site-packages/urllib3/util/retry.py", line 506, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/lib/python3.9/site-packages/urllib3/packages/six.py", line 734, in reraise
    raise value.with_traceback(tb)
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 696, in urlopen
    self._prepare_proxy(conn)
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 964, in _prepare_proxy
    conn.connect()
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 353, in connect
    conn = self._new_conn()
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 181, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.ProxyError: ('Cannot connect to proxy.', NewConnectionError('<botocore.awsrequest.AWSHTTPSConnection object at 0x7f9b68d6e850>: Failed to establish a new connection: [Errno -2] Name or service not known'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/botocore/endpoint.py", line 200, in _do_get_response
    http_response = self._send(request)
  File "/usr/lib/python3.9/site-packages/botocore/endpoint.py", line 269, in _send
    return self.http_session.send(request)
  File "/usr/lib/python3.9/site-packages/botocore/httpsession.py", line 342, in send
    raise ProxyConnectionError(proxy_url=proxy_url, error=e)
botocore.exceptions.ProxyConnectionError: Failed to connect to proxy URL: "http://socks5://127.0.0.1:9900"
2021-02-25 13:23:39,009 - MainThread - botocore.hooks - DEBUG - Event needs-retry.ec2.DescribeInstances: calling handler <botocore.retryhandler.RetryHandler object at 0x7f9b68dc6400>
2021-02-25 13:23:39,009 - MainThread - botocore.retryhandler - DEBUG - retry needed, retryable exception caught: Failed to connect to proxy URL: "http://socks5://127.0.0.1:9900"
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 169, in _new_conn
    conn = connection.create_connection(
  File "/usr/lib/python3.9/site-packages/urllib3/util/connection.py", line 73, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/lib/python3.9/socket.py", line 953, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 696, in urlopen
    self._prepare_proxy(conn)
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 964, in _prepare_proxy
    conn.connect()
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 353, in connect
    conn = self._new_conn()
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 181, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <botocore.awsrequest.AWSHTTPSConnection object at 0x7f9b68d6e850>: Failed to establish a new connection: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/botocore/httpsession.py", line 311, in send
    urllib_response = conn.urlopen(
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "/usr/lib/python3.9/site-packages/urllib3/util/retry.py", line 506, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/lib/python3.9/site-packages/urllib3/packages/six.py", line 734, in reraise
    raise value.with_traceback(tb)
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 696, in urlopen
    self._prepare_proxy(conn)
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 964, in _prepare_proxy
    conn.connect()
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 353, in connect
    conn = self._new_conn()
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 181, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.ProxyError: ('Cannot connect to proxy.', NewConnectionError('<botocore.awsrequest.AWSHTTPSConnection object at 0x7f9b68d6e850>: Failed to establish a new connection: [Errno -2] Name or service not known'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/botocore/retryhandler.py", line 269, in _should_retry
    return self._checker(attempt_number, response, caught_exception)
  File "/usr/lib/python3.9/site-packages/botocore/retryhandler.py", line 316, in __call__
    checker_response = checker(attempt_number, response,
  File "/usr/lib/python3.9/site-packages/botocore/retryhandler.py", line 222, in __call__
    return self._check_caught_exception(
  File "/usr/lib/python3.9/site-packages/botocore/retryhandler.py", line 359, in _check_caught_exception
    raise caught_exception
  File "/usr/lib/python3.9/site-packages/botocore/endpoint.py", line 200, in _do_get_response
    http_response = self._send(request)
  File "/usr/lib/python3.9/site-packages/botocore/endpoint.py", line 269, in _send
    return self.http_session.send(request)
  File "/usr/lib/python3.9/site-packages/botocore/httpsession.py", line 342, in send
    raise ProxyConnectionError(proxy_url=proxy_url, error=e)
botocore.exceptions.ProxyConnectionError: Failed to connect to proxy URL: "http://socks5://127.0.0.1:9900"
2021-02-25 13:23:39,010 - MainThread - botocore.retryhandler - DEBUG - Retry needed, action of: 0.6084957609452286
2021-02-25 13:23:39,010 - MainThread - botocore.endpoint - DEBUG - Response received to retry, sleeping for 0.6084957609452286 seconds
2021-02-25 13:23:39,620 - MainThread - botocore.hooks - DEBUG - Event request-created.ec2.DescribeInstances: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x7f9b68dee7f0>>
2021-02-25 13:23:39,620 - MainThread - botocore.hooks - DEBUG - Event choose-signer.ec2.DescribeInstances: calling handler <function set_operation_specific_signer at 0x7f9b6a14dee0>
2021-02-25 13:23:39,621 - MainThread - botocore.auth - DEBUG - Calculating signature using v4 auth.
2021-02-25 13:23:39,621 - MainThread - botocore.auth - DEBUG - CanonicalRequest:
POST
/

content-type:application/x-www-form-urlencoded; charset=utf-8
host:ec2.us-east-1.amazonaws.com
x-amz-date:20210225T052339Z

content-type;host;x-amz-date
6171eb09865e32b0602af0f7957e26573a51f53caaedff02ff88883cb0275885
2021-02-25 13:23:39,621 - MainThread - botocore.auth - DEBUG - StringToSign:
AWS4-HMAC-SHA256
20210225T052339Z
20210225/us-east-1/ec2/aws4_request
85f61711def7e20b72fac50880c2716c5217b9f16504d5ec7775929690e90990
2021-02-25 13:23:39,621 - MainThread - botocore.auth - DEBUG - Signature:
8eba2214ad5a898ee5852ac009add7338a117ff096d4085f22d817bcd4f2031e
2021-02-25 13:23:39,621 - MainThread - botocore.endpoint - DEBUG - Sending http request: <AWSPreparedRequest stream_output=False, method=POST, url=https://ec2.us-east-1.amazonaws.com/, headers={'Content-Type': b'application/x-www-form-urlencoded; charset=utf-8', 'User-Agent': b'aws-cli/1.19.5 Python/3.9.2 Linux/5.11.1-zen1-1-zen botocore/1.20.5', 'X-Amz-Date': b'20210225T052339Z', 'Authorization': b'AWS4-HMAC-SHA256 Credential=AKIASNOPEDNGTAGGJ3LJ/20210225/us-east-1/ec2/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=8eba2214ad5a898ee5852ac009add7338a117ff096d4085f22d817bcd4f2031e', 'Content-Length': '43'}>
2021-02-25 13:23:39,622 - MainThread - botocore.httpsession - DEBUG - Certificate path: /usr/lib/python3.9/site-packages/botocore/cacert.pem
2021-02-25 13:23:39,622 - MainThread - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (4): ec2.us-east-1.amazonaws.com:443
2021-02-25 13:23:39,638 - MainThread - botocore.endpoint - DEBUG - Exception received when sending HTTP request.
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 169, in _new_conn
    conn = connection.create_connection(
  File "/usr/lib/python3.9/site-packages/urllib3/util/connection.py", line 73, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/lib/python3.9/socket.py", line 953, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 696, in urlopen
    self._prepare_proxy(conn)
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 964, in _prepare_proxy
    conn.connect()
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 353, in connect
    conn = self._new_conn()
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 181, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <botocore.awsrequest.AWSHTTPSConnection object at 0x7f9b68dc6a60>: Failed to establish a new connection: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/botocore/httpsession.py", line 311, in send
    urllib_response = conn.urlopen(
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "/usr/lib/python3.9/site-packages/urllib3/util/retry.py", line 506, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/lib/python3.9/site-packages/urllib3/packages/six.py", line 734, in reraise
    raise value.with_traceback(tb)
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 696, in urlopen
    self._prepare_proxy(conn)
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 964, in _prepare_proxy
    conn.connect()
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 353, in connect
    conn = self._new_conn()
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 181, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.ProxyError: ('Cannot connect to proxy.', NewConnectionError('<botocore.awsrequest.AWSHTTPSConnection object at 0x7f9b68dc6a60>: Failed to establish a new connection: [Errno -2] Name or service not known'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/botocore/endpoint.py", line 200, in _do_get_response
    http_response = self._send(request)
  File "/usr/lib/python3.9/site-packages/botocore/endpoint.py", line 269, in _send
    return self.http_session.send(request)
  File "/usr/lib/python3.9/site-packages/botocore/httpsession.py", line 342, in send
    raise ProxyConnectionError(proxy_url=proxy_url, error=e)
botocore.exceptions.ProxyConnectionError: Failed to connect to proxy URL: "http://socks5://127.0.0.1:9900"
2021-02-25 13:23:39,639 - MainThread - botocore.hooks - DEBUG - Event needs-retry.ec2.DescribeInstances: calling handler <botocore.retryhandler.RetryHandler object at 0x7f9b68dc6400>
2021-02-25 13:23:39,639 - MainThread - botocore.retryhandler - DEBUG - retry needed, retryable exception caught: Failed to connect to proxy URL: "http://socks5://127.0.0.1:9900"
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 169, in _new_conn
    conn = connection.create_connection(
  File "/usr/lib/python3.9/site-packages/urllib3/util/connection.py", line 73, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/lib/python3.9/socket.py", line 953, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 696, in urlopen
    self._prepare_proxy(conn)
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 964, in _prepare_proxy
    conn.connect()
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 353, in connect
    conn = self._new_conn()
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 181, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <botocore.awsrequest.AWSHTTPSConnection object at 0x7f9b68dc6a60>: Failed to establish a new connection: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/botocore/httpsession.py", line 311, in send
    urllib_response = conn.urlopen(
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "/usr/lib/python3.9/site-packages/urllib3/util/retry.py", line 506, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/lib/python3.9/site-packages/urllib3/packages/six.py", line 734, in reraise
    raise value.with_traceback(tb)
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 696, in urlopen
    self._prepare_proxy(conn)
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 964, in _prepare_proxy
    conn.connect()
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 353, in connect
    conn = self._new_conn()
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 181, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.ProxyError: ('Cannot connect to proxy.', NewConnectionError('<botocore.awsrequest.AWSHTTPSConnection object at 0x7f9b68dc6a60>: Failed to establish a new connection: [Errno -2] Name or service not known'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/botocore/retryhandler.py", line 269, in _should_retry
    return self._checker(attempt_number, response, caught_exception)
  File "/usr/lib/python3.9/site-packages/botocore/retryhandler.py", line 316, in __call__
    checker_response = checker(attempt_number, response,
  File "/usr/lib/python3.9/site-packages/botocore/retryhandler.py", line 222, in __call__
    return self._check_caught_exception(
  File "/usr/lib/python3.9/site-packages/botocore/retryhandler.py", line 359, in _check_caught_exception
    raise caught_exception
  File "/usr/lib/python3.9/site-packages/botocore/endpoint.py", line 200, in _do_get_response
    http_response = self._send(request)
  File "/usr/lib/python3.9/site-packages/botocore/endpoint.py", line 269, in _send
    return self.http_session.send(request)
  File "/usr/lib/python3.9/site-packages/botocore/httpsession.py", line 342, in send
    raise ProxyConnectionError(proxy_url=proxy_url, error=e)
botocore.exceptions.ProxyConnectionError: Failed to connect to proxy URL: "http://socks5://127.0.0.1:9900"
2021-02-25 13:23:39,639 - MainThread - botocore.retryhandler - DEBUG - Retry needed, action of: 4.350977754810647
2021-02-25 13:23:39,639 - MainThread - botocore.endpoint - DEBUG - Response received to retry, sleeping for 4.350977754810647 seconds
2021-02-25 13:23:43,994 - MainThread - botocore.hooks - DEBUG - Event request-created.ec2.DescribeInstances: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x7f9b68dee7f0>>
2021-02-25 13:23:43,995 - MainThread - botocore.hooks - DEBUG - Event choose-signer.ec2.DescribeInstances: calling handler <function set_operation_specific_signer at 0x7f9b6a14dee0>
2021-02-25 13:23:43,996 - MainThread - botocore.auth - DEBUG - Calculating signature using v4 auth.
2021-02-25 13:23:43,996 - MainThread - botocore.auth - DEBUG - CanonicalRequest:
POST
/

content-type:application/x-www-form-urlencoded; charset=utf-8
host:ec2.us-east-1.amazonaws.com
x-amz-date:20210225T052343Z

content-type;host;x-amz-date
6171eb09865e32b0602af0f7957e26573a51f53caaedff02ff88883cb0275885
2021-02-25 13:23:43,996 - MainThread - botocore.auth - DEBUG - StringToSign:
AWS4-HMAC-SHA256
20210225T052343Z
20210225/us-east-1/ec2/aws4_request
b04be831dfd2226ea0a3c6c334612746f676223a1448897e6572f2d6ad292c7c
2021-02-25 13:23:43,996 - MainThread - botocore.auth - DEBUG - Signature:
b4b1594bbd4653e51cf85a49b3b11e7f8d348613a33b2fbe917996838a9d820e
2021-02-25 13:23:43,997 - MainThread - botocore.endpoint - DEBUG - Sending http request: <AWSPreparedRequest stream_output=False, method=POST, url=https://ec2.us-east-1.amazonaws.com/, headers={'Content-Type': b'application/x-www-form-urlencoded; charset=utf-8', 'User-Agent': b'aws-cli/1.19.5 Python/3.9.2 Linux/5.11.1-zen1-1-zen botocore/1.20.5', 'X-Amz-Date': b'20210225T052343Z', 'Authorization': b'AWS4-HMAC-SHA256 Credential=AKIASNOPEDNGTAGGJ3LJ/20210225/us-east-1/ec2/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=b4b1594bbd4653e51cf85a49b3b11e7f8d348613a33b2fbe917996838a9d820e', 'Content-Length': '43'}>
2021-02-25 13:23:43,997 - MainThread - botocore.httpsession - DEBUG - Certificate path: /usr/lib/python3.9/site-packages/botocore/cacert.pem
2021-02-25 13:23:43,997 - MainThread - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (5): ec2.us-east-1.amazonaws.com:443
2021-02-25 13:23:44,016 - MainThread - botocore.endpoint - DEBUG - Exception received when sending HTTP request.
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 169, in _new_conn
    conn = connection.create_connection(
  File "/usr/lib/python3.9/site-packages/urllib3/util/connection.py", line 73, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/lib/python3.9/socket.py", line 953, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 696, in urlopen
    self._prepare_proxy(conn)
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 964, in _prepare_proxy
    conn.connect()
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 353, in connect
    conn = self._new_conn()
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 181, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <botocore.awsrequest.AWSHTTPSConnection object at 0x7f9b68d6ec40>: Failed to establish a new connection: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/botocore/httpsession.py", line 311, in send
    urllib_response = conn.urlopen(
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "/usr/lib/python3.9/site-packages/urllib3/util/retry.py", line 506, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/lib/python3.9/site-packages/urllib3/packages/six.py", line 734, in reraise
    raise value.with_traceback(tb)
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 696, in urlopen
    self._prepare_proxy(conn)
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 964, in _prepare_proxy
    conn.connect()
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 353, in connect
    conn = self._new_conn()
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 181, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.ProxyError: ('Cannot connect to proxy.', NewConnectionError('<botocore.awsrequest.AWSHTTPSConnection object at 0x7f9b68d6ec40>: Failed to establish a new connection: [Errno -2] Name or service not known'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/botocore/endpoint.py", line 200, in _do_get_response
    http_response = self._send(request)
  File "/usr/lib/python3.9/site-packages/botocore/endpoint.py", line 269, in _send
    return self.http_session.send(request)
  File "/usr/lib/python3.9/site-packages/botocore/httpsession.py", line 342, in send
    raise ProxyConnectionError(proxy_url=proxy_url, error=e)
botocore.exceptions.ProxyConnectionError: Failed to connect to proxy URL: "http://socks5://127.0.0.1:9900"
2021-02-25 13:23:44,017 - MainThread - botocore.hooks - DEBUG - Event needs-retry.ec2.DescribeInstances: calling handler <botocore.retryhandler.RetryHandler object at 0x7f9b68dc6400>
2021-02-25 13:23:44,017 - MainThread - awscli.clidriver - DEBUG - Exception caught in main()
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 169, in _new_conn
    conn = connection.create_connection(
  File "/usr/lib/python3.9/site-packages/urllib3/util/connection.py", line 73, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/lib/python3.9/socket.py", line 953, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 696, in urlopen
    self._prepare_proxy(conn)
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 964, in _prepare_proxy
    conn.connect()
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 353, in connect
    conn = self._new_conn()
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 181, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <botocore.awsrequest.AWSHTTPSConnection object at 0x7f9b68d6ec40>: Failed to establish a new connection: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/botocore/httpsession.py", line 311, in send
    urllib_response = conn.urlopen(
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "/usr/lib/python3.9/site-packages/urllib3/util/retry.py", line 506, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/lib/python3.9/site-packages/urllib3/packages/six.py", line 734, in reraise
    raise value.with_traceback(tb)
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 696, in urlopen
    self._prepare_proxy(conn)
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 964, in _prepare_proxy
    conn.connect()
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 353, in connect
    conn = self._new_conn()
  File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 181, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.ProxyError: ('Cannot connect to proxy.', NewConnectionError('<botocore.awsrequest.AWSHTTPSConnection object at 0x7f9b68d6ec40>: Failed to establish a new connection: [Errno -2] Name or service not known'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/awscli/clidriver.py", line 217, in main
    return command_table[parsed_args.command](remaining, parsed_args)
  File "/usr/lib/python3.9/site-packages/awscli/clidriver.py", line 358, in __call__
    return command_table[parsed_args.operation](remaining, parsed_globals)
  File "/usr/lib/python3.9/site-packages/awscli/clidriver.py", line 527, in __call__
    return self._operation_caller.invoke(
  File "/usr/lib/python3.9/site-packages/awscli/clidriver.py", line 651, in invoke
    self._display_response(operation_name, response, parsed_globals)
  File "/usr/lib/python3.9/site-packages/awscli/clidriver.py", line 671, in _display_response
    formatter(command_name, response)
  File "/usr/lib/python3.9/site-packages/awscli/formatter.py", line 69, in __call__
    response_data = response.build_full_result()
  File "/usr/lib/python3.9/site-packages/botocore/paginate.py", line 449, in build_full_result
    for response in self:
  File "/usr/lib/python3.9/site-packages/botocore/paginate.py", line 255, in __iter__
    response = self._make_request(current_kwargs)
  File "/usr/lib/python3.9/site-packages/botocore/paginate.py", line 332, in _make_request
    return self._method(**current_kwargs)
  File "/usr/lib/python3.9/site-packages/botocore/client.py", line 357, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/usr/lib/python3.9/site-packages/botocore/client.py", line 662, in _make_api_call
    http, parsed_response = self._make_request(
  File "/usr/lib/python3.9/site-packages/botocore/client.py", line 682, in _make_request
    return self._endpoint.make_request(operation_model, request_dict)
  File "/usr/lib/python3.9/site-packages/botocore/endpoint.py", line 102, in make_request
    return self._send_request(request_dict, operation_model)
  File "/usr/lib/python3.9/site-packages/botocore/endpoint.py", line 136, in _send_request
    while self._needs_retry(attempts, operation_model, request_dict,
  File "/usr/lib/python3.9/site-packages/botocore/endpoint.py", line 253, in _needs_retry
    responses = self._event_emitter.emit(
  File "/usr/lib/python3.9/site-packages/botocore/hooks.py", line 356, in emit
    return self._emitter.emit(aliased_event_name, **kwargs)
  File "/usr/lib/python3.9/site-packages/botocore/hooks.py", line 228, in emit
    return self._emit(event_name, kwargs)
  File "/usr/lib/python3.9/site-packages/botocore/hooks.py", line 211, in _emit
    response = handler(**kwargs)
  File "/usr/lib/python3.9/site-packages/botocore/retryhandler.py", line 183, in __call__
    if self._checker(attempts, response, caught_exception):
  File "/usr/lib/python3.9/site-packages/botocore/retryhandler.py", line 250, in __call__
    should_retry = self._should_retry(attempt_number, response,
  File "/usr/lib/python3.9/site-packages/botocore/retryhandler.py", line 277, in _should_retry
    return self._checker(attempt_number, response, caught_exception)
  File "/usr/lib/python3.9/site-packages/botocore/retryhandler.py", line 316, in __call__
    checker_response = checker(attempt_number, response,
  File "/usr/lib/python3.9/site-packages/botocore/retryhandler.py", line 222, in __call__
    return self._check_caught_exception(
  File "/usr/lib/python3.9/site-packages/botocore/retryhandler.py", line 359, in _check_caught_exception
    raise caught_exception
  File "/usr/lib/python3.9/site-packages/botocore/endpoint.py", line 200, in _do_get_response
    http_response = self._send(request)
  File "/usr/lib/python3.9/site-packages/botocore/endpoint.py", line 269, in _send
    return self.http_session.send(request)
  File "/usr/lib/python3.9/site-packages/botocore/httpsession.py", line 342, in send
    raise ProxyConnectionError(proxy_url=proxy_url, error=e)
botocore.exceptions.ProxyConnectionError: Failed to connect to proxy URL: "http://socks5://127.0.0.1:9900"
2021-02-25 13:23:44,018 - MainThread - awscli.clidriver - DEBUG - Exiting with rc 255

Failed to connect to proxy URL: "http://socks5://127.0.0.1:9900"

Additional context
Add any other context about the problem here.

@pickfire pickfire added the needs-triage This issue or PR still needs to be triaged. label Feb 25, 2021
@stobrien89 stobrien89 self-assigned this Feb 25, 2021
@stobrien89 stobrien89 added configuration investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels Feb 25, 2021
@stobrien89
Copy link
Member

Hi @pickfire,

Thanks for writing in! The AWS CLI does not currently support direct use of socks5 proxies. I did come across some 3rd party tooling that may allow this to work, but I unfortunately cannot make any recommendations or guarantees, as they are not AWS products.

@stobrien89 stobrien89 removed the investigating This issue is being investigated and/or work is in progress to resolve the issue. label Feb 25, 2021
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

@kdaily kdaily added the guidance Question that needs advice or information. label Mar 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
configuration guidance Question that needs advice or information.
Projects
None yet
Development

No branches or pull requests

3 participants