=== Unhandled exception === error while Registering a hook

Ouverte
#1,011 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
25/100
Type d'issue
Bug
Clarté
À clarifier
Activité
À l'abandon
Stack technique
docker, python
Domaine
cli, devops

Piste de recherche

Commencez par le point d’entrée cfn submit et l’étape de build Docker affichée dans rpdk.log. Reproduisez l’échec lorsque Docker n’est pas disponible, puis suivez les stack frames docker et requests signalées. Le travail est terminé lorsque la commande submit gère l’absence du socket Docker avec un résultat exploitable au lieu de lever une exception non gérée.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Receiving below error while packaging and registering hook in my env

mycompany-testing-mytesthook % cfn submit --set-default
Starting Docker build. This may take several minutes if the image 'public.ecr.aws/sam/build-python3.7' needs to be pulled first.
=== Unhandled exception ===
Please report this issue to the team.
Issue tracker: github.com/aws-cloudformation/cloudformation-cli/issues
Please include the log file 'rpdk.log'

rdpk.log

[2023-07-13T13:36:01Z] DEBUG - Logging set up successfully
[2023-07-13T13:36:01Z] DEBUG - Running None: Namespace(version=False, subparser_name=None, command=<function init at 0x108b2d080>, verbose=0, force=False, type_name=None, artifact_type=None, endpoint_url=None, region=None, target_schemas=[], profile=None)
[2023-07-13T13:36:01Z] DEBUG - Root directory: /Users/adeliz/mycompany-testing-mytesthook
[2023-07-13T13:36:01Z] WARNING - Initializing new project
[2023-07-13T13:36:01Z] DEBUG - Loading project file '/Users/adeliz/mycompany-testing-mytesthook/.rpdk-config'
[2023-07-13T13:36:42Z] DEBUG - Hook type identifier: MyCompany::Testing::MyTestHook
[2023-07-13T13:39:57Z] DEBUG - Language plugin: python37
[2023-07-13T13:39:57Z] DEBUG - Init started
[2023-07-13T13:39:57Z] DEBUG - Writing settings
[2023-07-13T13:40:21Z] DEBUG - Making folder '/Users/adeliz/mycompany-testing-mytesthook/src/mycompany_testing_mytesthook'
[2023-07-13T13:40:21Z] DEBUG - Writing '/Users/adeliz/mycompany-testing-mytesthook/src/mycompany_testing_mytesthook/init.py'
[2023-07-13T13:40:21Z] DEBUG - Writing '/Users/adeliz/mycompany-testing-mytesthook/.gitignore'
[2023-07-13T13:40:21Z] DEBUG - Writing '/Users/adeliz/mycompany-testing-mytesthook/requirements.txt'
[2023-07-13T13:40:21Z] DEBUG - Writing '/Users/adeliz/mycompany-testing-mytesthook/README.md'
[2023-07-13T13:40:21Z] DEBUG - Writing '/Users/adeliz/mycompany-testing-mytesthook/template.yml'
[2023-07-13T13:40:21Z] DEBUG - Init complete
[2023-07-13T13:40:21Z] DEBUG - Overwriting '/Users/adeliz/mycompany-testing-mytesthook/.rpdk-config'
[2023-07-13T13:40:21Z] DEBUG - Writing Execution Role CloudFormation template: /Users/adeliz/mycompany-testing-mytesthook/hook-role.yaml
[2023-07-13T13:40:21Z] DEBUG - Overwriting '/Users/adeliz/mycompany-testing-mytesthook/hook-role.yaml'
[2023-07-13T13:40:21Z] DEBUG - Hook schema target names: {'AWS::S3::Bucket'}
[2023-07-13T13:40:21Z] DEBUG - Resolving the following type names: {'AWS::S3::Bucket'}
[2023-07-13T13:40:21Z] DEBUG - Retrieving info for following target names: ['AWS::S3::Bucket']
[2023-07-13T13:40:21Z] DEBUG - Retrieving info for type: AWS::S3::Bucket
[2023-07-13T13:40:22Z] DEBUG - Generate started
[2023-07-13T13:40:22Z] DEBUG - Writing file: /Users/adeliz/mycompany-testing-mytesthook/src/mycompany_testing_mytesthook/models.py
[2023-07-13T13:40:22Z] DEBUG - Overwriting '/Users/adeliz/mycompany-testing-mytesthook/src/mycompany_testing_mytesthook/models.py'
[2023-07-13T13:40:22Z] DEBUG - Removing generated models: /Users/adeliz/mycompany-testing-mytesthook/src/mycompany_testing_mytesthook/target_models
[2023-07-13T13:40:22Z] DEBUG - Writing file: /Users/adeliz/mycompany-testing-mytesthook/src/mycompany_testing_mytesthook/target_models/aws_s3_bucket.py
[2023-07-13T13:40:22Z] DEBUG - Overwriting '/Users/adeliz/mycompany-testing-mytesthook/src/mycompany_testing_mytesthook/target_models/aws_s3_bucket.py'
[2023-07-13T13:40:22Z] DEBUG - Generate complete
[2023-07-13T13:40:22Z] DEBUG - Removing generated docs: /Users/adeliz/mycompany-testing-mytesthook/docs
[2023-07-13T13:40:22Z] DEBUG - Writing generated docs
[2023-07-13T13:40:22Z] DEBUG - Finished documenting nested properties
[2023-07-13T13:40:22Z] DEBUG - Writing docs README: /Users/adeliz/mycompany-testing-mytesthook/docs/README.md
[2023-07-13T13:40:22Z] WARNING - Initialized a new project in /Users/adeliz/mycompany-testing-mytesthook
[2023-07-13T13:40:22Z] DEBUG - Finished None
[2023-07-13T13:43:13Z] DEBUG - Logging set up successfully
[2023-07-13T13:43:13Z] DEBUG - Running generate: Namespace(version=False, subparser_name='generate', command=<function generate at 0x1141c72e0>, verbose=0, endpoint_url=None, region=None, local_only=False, target_schemas=[], profile=None)
[2023-07-13T13:43:13Z] DEBUG - Root directory: /Users/adeliz/mycompany-testing-mytesthook
[2023-07-13T13:43:13Z] DEBUG - Loading project file '/Users/adeliz/mycompany-testing-mytesthook/.rpdk-config'
[2023-07-13T13:43:13Z] INFO - Validating your hook specification...
[2023-07-13T13:43:13Z] DEBUG - Rewriting refs in '' (file:///Users/adeliz/mycompany-testing-mytesthook/mycompany-testing-mytesthook.json)
[2023-07-13T13:43:13Z] DEBUG - Writing Execution Role CloudFormation template: /Users/adeliz/mycompany-testing-mytesthook/hook-role.yaml
[2023-07-13T13:43:13Z] DEBUG - Overwriting '/Users/adeliz/mycompany-testing-mytesthook/hook-role.yaml'
[2023-07-13T13:43:13Z] DEBUG - Hook schema target names: {'AWS::S3::Bucket'}
[2023-07-13T13:43:13Z] DEBUG - Resolving the following type names: {'AWS::S3::Bucket'}
[2023-07-13T13:43:13Z] DEBUG - Retrieving info for following target names: ['AWS::S3::Bucket']
[2023-07-13T13:43:13Z] DEBUG - Retrieving info for type: AWS::S3::Bucket
[2023-07-13T13:43:13Z] DEBUG - Generate started
[2023-07-13T13:43:13Z] DEBUG - Writing type configuration resource specification from resource specification: /Users/adeliz/mycompany-testing-mytesthook/mycompany-testing-mytesthook-configuration.json
[2023-07-13T13:43:13Z] DEBUG - Overwriting '/Users/adeliz/mycompany-testing-mytesthook/mycompany-testing-mytesthook-configuration.json'
[2023-07-13T13:43:13Z] DEBUG - Writing file: /Users/adeliz/mycompany-testing-mytesthook/src/mycompany_testing_mytesthook/models.py
[2023-07-13T13:43:13Z] DEBUG - Overwriting '/Users/adeliz/mycompany-testing-mytesthook/src/mycompany_testing_mytesthook/models.py'
[2023-07-13T13:43:13Z] DEBUG - Removing generated models: /Users/adeliz/mycompany-testing-mytesthook/src/mycompany_testing_mytesthook/target_models
[2023-07-13T13:43:13Z] DEBUG - Writing file: /Users/adeliz/mycompany-testing-mytesthook/src/mycompany_testing_mytesthook/target_models/aws_s3_bucket.py
[2023-07-13T13:43:13Z] DEBUG - Overwriting '/Users/adeliz/mycompany-testing-mytesthook/src/mycompany_testing_mytesthook/target_models/aws_s3_bucket.py'
[2023-07-13T13:43:13Z] DEBUG - Generate complete
[2023-07-13T13:43:13Z] DEBUG - Removing generated docs: /Users/adeliz/mycompany-testing-mytesthook/docs
[2023-07-13T13:43:13Z] DEBUG - Writing generated docs
[2023-07-13T13:43:13Z] DEBUG - Finished documenting nested properties
[2023-07-13T13:43:13Z] DEBUG - Writing docs README: /Users/adeliz/mycompany-testing-mytesthook/docs/README.md
[2023-07-13T13:43:13Z] WARNING - Generated files for MyCompany::Testing::MyTestHook
[2023-07-13T13:43:13Z] DEBUG - Finished generate
[2023-07-13T14:09:36Z] DEBUG - Logging set up successfully
[2023-07-13T14:09:36Z] DEBUG - Running submit: Namespace(version=False, subparser_name='submit', command=<function submit at 0x10a930860>, verbose=0, dry_run=True, endpoint_url=None, region=None, set_default=False, profile=None, role_arn=None, use_role=True, use_docker=False, no_docker=False)
[2023-07-13T14:09:36Z] DEBUG - Root directory: /Users/adeliz/mycompany-testing-mytesthook
[2023-07-13T14:09:36Z] DEBUG - Loading project file '/Users/adeliz/mycompany-testing-mytesthook/.rpdk-config'
[2023-07-13T14:09:36Z] INFO - Validating your hook specification...
[2023-07-13T14:09:36Z] DEBUG - Rewriting refs in '' (file:///Users/adeliz/mycompany-testing-mytesthook/mycompany-testing-mytesthook.json)
[2023-07-13T14:09:36Z] DEBUG - inputs not found. Not writing to package.
[2023-07-13T14:09:36Z] DEBUG - Hook schema target names: {'AWS::S3::Bucket'}
[2023-07-13T14:09:36Z] DEBUG - Resolving the following type names: {'AWS::S3::Bucket'}
[2023-07-13T14:09:36Z] DEBUG - Retrieving info for following target names: ['AWS::S3::Bucket']
[2023-07-13T14:09:36Z] DEBUG - Retrieving info for type: AWS::S3::Bucket
[2023-07-13T14:09:37Z] DEBUG - aws-s3-bucket.json found. Writing to package.
[2023-07-13T14:09:37Z] DEBUG - Package started
[2023-07-13T14:09:37Z] DEBUG - Removing '/Users/adeliz/mycompany-testing-mytesthook/build' folder.
[2023-07-13T14:09:37Z] DEBUG - Dependencies build started from '/Users/adeliz/mycompany-testing-mytesthook'
[2023-07-13T14:09:37Z] DEBUG - command is '/bin/bash -c "pip install --no-cache-dir --no-color --disable-pip-version-check --upgrade --requirement /project/requirements.txt --target /project/build"'
[2023-07-13T14:09:37Z] WARNING - Starting Docker build. This may take several minutes if the image 'public.ecr.aws/sam/build-python3.7' needs to be pulled first.
[2023-07-13T14:09:37Z] DEBUG - Trying paths: ['/Users/adeliz/.docker/config.json', '/Users/adeliz/.dockercfg']
[2023-07-13T14:09:37Z] DEBUG - Found file at path: /Users/adeliz/.docker/config.json
[2023-07-13T14:09:37Z] DEBUG - Found 'credsStore' section
[2023-07-13T14:09:37Z] DEBUG - Unhandled exception
Traceback (most recent call last):
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/urllib3/connectionpool.py", line 714, in urlopen
httplib_response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/urllib3/connectionpool.py", line 415, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/urllib3/connection.py", line 244, in request
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1286, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1332, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1281, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1041, in _send_output
self.send(msg)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 979, in send
self.connect()
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/docker/transport/unixconn.py", line 27, in connect
sock.connect(self.unix_socket)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/requests/adapters.py", line 486, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/urllib3/connectionpool.py", line 798, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/urllib3/util/retry.py", line 550, in increment
raise six.reraise(type(error), error, _stacktrace)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/urllib3/packages/six.py", line 769, in reraise
raise value.with_traceback(tb)
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/urllib3/connectionpool.py", line 714, in urlopen
httplib_response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/urllib3/connectionpool.py", line 415, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/urllib3/connection.py", line 244, in request
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1286, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1332, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1281, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1041, in _send_output
self.send(msg)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 979, in send
self.connect()
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/docker/transport/unixconn.py", line 27, in connect
sock.connect(self.unix_socket)
urllib3.exceptions.ProtocolError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/docker/api/client.py", line 214, in _retrieve_server_version
return self.version(api_version=False)["ApiVersion"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/docker/api/daemon.py", line 181, in version
return self._result(self._get(url), json=True)
^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/docker/utils/decorators.py", line 46, in inner
return f(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/docker/api/client.py", line 237, in _get
return self.get(url, **self._set_request_timeout(kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/requests/sessions.py", line 602, in get
return self.request("GET", url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/requests/adapters.py", line 501, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/rpdk/core/cli.py", line 100, in main
args.command(args)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/rpdk/core/submit.py", line 19, in submit
project.submit(
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/rpdk/core/project.py", line 647, in submit
self._add_hooks_content_to_zip(
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/rpdk/core/project.py", line 734, in _add_hooks_content_to_zip
self._plugin.package(self, zip_file)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/rpdk/python/codegen.py", line 291, in package
self._build(project.root)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/rpdk/python/codegen.py", line 308, in _build
self._docker_build(base_path)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/rpdk/python/codegen.py", line 368, in _docker_build
docker_client = docker.from_env()
^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/docker/client.py", line 96, in from_env
return cls(
^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/docker/client.py", line 45, in init
self.api = APIClient(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/docker/api/client.py", line 197, in init
self._version = self._retrieve_server_version()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/docker/api/client.py", line 221, in _retrieve_server_version
raise DockerException(
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
[2023-07-13T14:10:34Z] DEBUG - Logging set up successfully
[2023-07-13T14:10:34Z] DEBUG - Running submit: Namespace(version=False, subparser_name='submit', command=<function submit at 0x10922c860>, verbose=0, dry_run=False, endpoint_url=None, region=None, set_default=True, profile=None, role_arn=None, use_role=True, use_docker=False, no_docker=False)
[2023-07-13T14:10:34Z] DEBUG - Root directory: /Users/adeliz/mycompany-testing-mytesthook
[2023-07-13T14:10:34Z] DEBUG - Loading project file '/Users/adeliz/mycompany-testing-mytesthook/.rpdk-config'
[2023-07-13T14:10:34Z] INFO - Validating your hook specification...
[2023-07-13T14:10:34Z] DEBUG - Rewriting refs in '' (file:///Users/adeliz/mycompany-testing-mytesthook/mycompany-testing-mytesthook.json)
[2023-07-13T14:10:34Z] DEBUG - inputs not found. Not writing to package.
[2023-07-13T14:10:34Z] DEBUG - Hook schema target names: {'AWS::S3::Bucket'}
[2023-07-13T14:10:34Z] DEBUG - Resolving the following type names: {'AWS::S3::Bucket'}
[2023-07-13T14:10:34Z] DEBUG - Retrieving info for following target names: ['AWS::S3::Bucket']
[2023-07-13T14:10:34Z] DEBUG - Retrieving info for type: AWS::S3::Bucket
[2023-07-13T14:10:34Z] DEBUG - aws-s3-bucket.json found. Writing to package.
[2023-07-13T14:10:34Z] DEBUG - Package started
[2023-07-13T14:10:34Z] DEBUG - Removing '/Users/adeliz/mycompany-testing-mytesthook/build' folder.
[2023-07-13T14:10:34Z] DEBUG - Dependencies build started from '/Users/adeliz/mycompany-testing-mytesthook'
[2023-07-13T14:10:34Z] DEBUG - command is '/bin/bash -c "pip install --no-cache-dir --no-color --disable-pip-version-check --upgrade --requirement /project/requirements.txt --target /project/build"'
[2023-07-13T14:10:34Z] WARNING - Starting Docker build. This may take several minutes if the image 'public.ecr.aws/sam/build-python3.7' needs to be pulled first.
[2023-07-13T14:10:34Z] DEBUG - Trying paths: ['/Users/adeliz/.docker/config.json', '/Users/adeliz/.dockercfg']
[2023-07-13T14:10:34Z] DEBUG - Found file at path: /Users/adeliz/.docker/config.json
[2023-07-13T14:10:34Z] DEBUG - Found 'credsStore' section
[2023-07-13T14:10:34Z] DEBUG - Unhandled exception
Traceback (most recent call last):
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/urllib3/connectionpool.py", line 714, in urlopen
httplib_response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/urllib3/connectionpool.py", line 415, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/urllib3/connection.py", line 244, in request
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1286, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1332, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1281, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1041, in _send_output
self.send(msg)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 979, in send
self.connect()
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/docker/transport/unixconn.py", line 27, in connect
sock.connect(self.unix_socket)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/requests/adapters.py", line 486, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/urllib3/connectionpool.py", line 798, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/urllib3/util/retry.py", line 550, in increment
raise six.reraise(type(error), error, _stacktrace)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/urllib3/packages/six.py", line 769, in reraise
raise value.with_traceback(tb)
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/urllib3/connectionpool.py", line 714, in urlopen
httplib_response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/urllib3/connectionpool.py", line 415, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/urllib3/connection.py", line 244, in request
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1286, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1332, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1281, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1041, in _send_output
self.send(msg)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 979, in send
self.connect()
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/docker/transport/unixconn.py", line 27, in connect
sock.connect(self.unix_socket)
urllib3.exceptions.ProtocolError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/docker/api/client.py", line 214, in _retrieve_server_version
return self.version(api_version=False)["ApiVersion"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/docker/api/daemon.py", line 181, in version
return self._result(self._get(url), json=True)
^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/docker/utils/decorators.py", line 46, in inner
return f(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/docker/api/client.py", line 237, in _get
return self.get(url, **self._set_request_timeout(kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/requests/sessions.py", line 602, in get
return self.request("GET", url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/requests/adapters.py", line 501, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/rpdk/core/cli.py", line 100, in main
args.command(args)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/rpdk/core/submit.py", line 19, in submit
project.submit(
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/rpdk/core/project.py", line 647, in submit
self._add_hooks_content_to_zip(
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/rpdk/core/project.py", line 734, in _add_hooks_content_to_zip
self._plugin.package(self, zip_file)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/rpdk/python/codegen.py", line 291, in package
self._build(project.root)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/rpdk/python/codegen.py", line 308, in _build
self._docker_build(base_path)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/rpdk/python/codegen.py", line 368, in _docker_build
docker_client = docker.from_env()
^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/docker/client.py", line 96, in from_env
return cls(
^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/docker/client.py", line 45, in init
self.api = APIClient(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/docker/api/client.py", line 197, in init
self._version = self._retrieve_server_version()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/docker/api/client.py", line 221, in _retrieve_server_version
raise DockerException(
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
[2023-07-13T14:14:54Z] DEBUG - Logging set up successfully
[2023-07-13T14:14:54Z] DEBUG - Running submit: Namespace(version=False, subparser_name='submit', command=<function submit at 0x106810860>, verbose=0, dry_run=True, endpoint_url=None, region=None, set_default=False, profile=None, role_arn=None, use_role=True, use_docker=False, no_docker=False)
[2023-07-13T14:14:54Z] DEBUG - Root directory: /Users/adeliz/mycompany-testing-mytesthook
[2023-07-13T14:14:54Z] DEBUG - Loading project file '/Users/adeliz/mycompany-testing-mytesthook/.rpdk-config'
[2023-07-13T14:14:54Z] INFO - Validating your hook specification...
[2023-07-13T14:14:54Z] DEBUG - Rewriting refs in '' (file:///Users/adeliz/mycompany-testing-mytesthook/mycompany-testing-mytesthook.json)
[2023-07-13T14:14:54Z] DEBUG - inputs not found. Not writing to package.
[2023-07-13T14:14:54Z] DEBUG - Hook schema target names: {'AWS::S3::Bucket'}
[2023-07-13T14:14:54Z] DEBUG - Resolving the following type names: {'AWS::S3::Bucket'}
[2023-07-13T14:14:54Z] DEBUG - Retrieving info for following target names: ['AWS::S3::Bucket']
[2023-07-13T14:14:54Z] DEBUG - Retrieving info for type: AWS::S3::Bucket
[2023-07-13T14:14:55Z] DEBUG - aws-s3-bucket.json found. Writing to package.
[2023-07-13T14:14:55Z] DEBUG - Package started
[2023-07-13T14:14:55Z] DEBUG - Removing '/Users/adeliz/mycompany-testing-mytesthook/build' folder.
[2023-07-13T14:14:55Z] DEBUG - Dependencies build started from '/Users/adeliz/mycompany-testing-mytesthook'
[2023-07-13T14:14:55Z] DEBUG - command is '/bin/bash -c "pip install --no-cache-dir --no-color --disable-pip-version-check --upgrade --requirement /project/requirements.txt --target /project/build"'
[2023-07-13T14:14:55Z] WARNING - Starting Docker build. This may take several minutes if the image 'public.ecr.aws/sam/build-python3.7' needs to be pulled first.
[2023-07-13T14:14:55Z] DEBUG - Trying paths: ['/Users/adeliz/.docker/config.json', '/Users/adeliz/.dockercfg']
[2023-07-13T14:14:55Z] DEBUG - Found file at path: /Users/adeliz/.docker/config.json
[2023-07-13T14:14:55Z] DEBUG - Found 'credsStore' section
[2023-07-13T14:14:55Z] DEBUG - Unhandled exception
Traceback (most recent call last):
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/urllib3/connectionpool.py", line 714, in urlopen
httplib_response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/urllib3/connectionpool.py", line 415, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/urllib3/connection.py", line 244, in request
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1286, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1332, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1281, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1041, in _send_output
self.send(msg)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 979, in send
self.connect()
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/docker/transport/unixconn.py", line 27, in connect
sock.connect(self.unix_socket)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/requests/adapters.py", line 486, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/urllib3/connectionpool.py", line 798, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/urllib3/util/retry.py", line 550, in increment
raise six.reraise(type(error), error, _stacktrace)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/urllib3/packages/six.py", line 769, in reraise
raise value.with_traceback(tb)
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/urllib3/connectionpool.py", line 714, in urlopen
httplib_response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/urllib3/connectionpool.py", line 415, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/urllib3/connection.py", line 244, in request
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1286, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1332, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1281, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1041, in _send_output
self.send(msg)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 979, in send
self.connect()
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/docker/transport/unixconn.py", line 27, in connect
sock.connect(self.unix_socket)
urllib3.exceptions.ProtocolError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/docker/api/client.py", line 214, in _retrieve_server_version
return self.version(api_version=False)["ApiVersion"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/docker/api/daemon.py", line 181, in version
return self._result(self._get(url), json=True)
^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/docker/utils/decorators.py", line 46, in inner
return f(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/docker/api/client.py", line 237, in _get
return self.get(url, **self._set_request_timeout(kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/requests/sessions.py", line 602, in get
return self.request("GET", url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/adeliz/Library/Python/3.11/lib/python/site-packages/requests/adapters.py", line 501, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/rpdk/core/cli.py", line 100, in main
args.command(args)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/rpdk/core/submit.py", line 19, in submit
project.submit(
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/rpdk/core/project.py", line 647, in submit
self._add_hooks_content_to_zip(
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/rpdk/core/project.py", line 734, in _add_hooks_content_to_zip
self._plugin.package(self, zip_file)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/rpdk/python/codegen.py", line 291, in package
self._build(project.root)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/rpdk/python/codegen.py", line 308, in _build
self._docker_build(base_path)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/rpdk/python/codegen.py", line 368, in _docker_build
docker_client = docker.from_env()
^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/docker/client.py", line 96, in from_env
return cls(
^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/docker/client.py", line 45, in init
self.api = APIClient(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/docker/api/client.py", line 197, in init
self._version = self._retrieve_server_version()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/docker/api/client.py", line 221, in _retrieve_server_version
raise DockerException(
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

Langage dominant
Python
Étoiles
336
Forks
173
Métriques de merge des PR
Aucune PR mergée en 30 j

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de aws-cloudformation/cloudformation-cli

Toutes les issues de aws-cloudformation/cloudformation-cli

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.