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

オープン
#1,011 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
docker, python
領域
cli, devops

調査の方向性

cfn submit のエントリポイントと、rpdk.log に示されている Docker のビルド手順から始めます。Docker が利用できない状態で失敗を再現し、報告された docker と requests のスタックフレームを追跡します。submit コマンドが Docker ソケットの欠落を、未処理の例外ではなく、対処可能な結果として処理できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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'))

主要言語
Python
スター
336
フォーク
173
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

aws-cloudformation/cloudformation-cli のほかの issue

aws-cloudformation/cloudformation-cli の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。