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

Unable to run pip install due to SSL cert #629

Open
BolongL opened this issue May 2, 2023 · 2 comments
Open

Unable to run pip install due to SSL cert #629

BolongL opened this issue May 2, 2023 · 2 comments

Comments

@BolongL
Copy link

BolongL commented May 2, 2023

Describe the bug
We were trying to run Codebuild locally with AWS Codebuild agent and we run a SSL certification error.

Logs
A8XK2@W0217826 MINGW64 ~/Downloads/dir/core_test/src (core-275)
$ ./codebuild_build.sh -i public.ecr.aws/codebuild/amazonlinux2-x86_64-standard:3.0 -a /c/Users/A8XK2/Downloads/dir/codebuild_output -b /c/Users/A8XK2/Downloads/dir/core_test/src/pipelines/default/jobs/build-configtemplates.yml
Build Command:

docker run -it -v //var/run/docker.sock:/var/run/docker.sock -e "IMAGE_NAME=public.ecr.aws/codebuild/amazonlinux2-x86_64-standard:3.0" -e "ARTIFACTS=//C/Users/A8XK2/Downloads/dir/codebuild_output" -e "SOURCE=//C/Users/A8XK2/Downloads/dir/core_test/src" -e "BUILDSPEC=//C/Users/A8XK2/Downloads/dir/core_test/src/pipelines/default/jobs/build-configtemplates.yml" -e "INITIATOR=A8XK2" public.ecr.aws/codebuild/local-builds:latest

Removing agent-resources_build_1 ... done
Removing agent-resources_agent_1 ... done
Removing network agent-resources_default
Removing volume agent-resources_source_volume
Removing volume agent-resources_user_volume
Creating network "agent-resources_default" with the default driver
Creating volume "agent-resources_source_volume" with local driver
Creating volume "agent-resources_user_volume" with local driver
Creating agent-resources_agent_1 ... done
Creating agent-resources_build_1 ... done
Attaching to agent-resources_agent_1, agent-resources_build_1
agent_1 | [Container] 2023/05/02 15:21:11 Waiting for agent ping
agent_1 | [Container] 2023/05/02 15:21:11 Waiting for DOWNLOAD_SOURCE
agent_1 | [Container] 2023/05/02 15:21:27 Phase is DOWNLOAD_SOURCE
agent_1 | [Container] 2023/05/02 15:21:27 CODEBUILD_SRC_DIR=/codebuild/output/src198109322/src
agent_1 | [Container] 2023/05/02 15:21:27 yamlDoc
agent_1 | [Container] 2023/05/02 15:21:27 YAML location is /codebuild/output/srcDownload/src/pipelines/default/jobs/build-configtemplates.yml
agent_1 | [Container] 2023/05/02 15:21:27 Processing environment variables
agent_1 | [Container] 2023/05/02 15:21:27 Moving to directory /codebuild/output/src198109322/src
agent_1 | [Container] 2023/05/02 15:21:27 Registering with agent
agent_1 | [Container] 2023/05/02 15:21:27 Phases found in YAML: 1
agent_1 | [Container] 2023/05/02 15:21:27 BUILD: 2 commands
agent_1 | [Container] 2023/05/02 15:21:27 Phase complete: DOWNLOAD_SOURCE State: SUCCEEDED
agent_1 | [Container] 2023/05/02 15:21:27 Phase context status code: Message:
agent_1 | [Container] 2023/05/02 15:21:27 Entering phase INSTALL
agent_1 | [Container] 2023/05/02 15:21:27 Phase complete: INSTALL State: SUCCEEDED
agent_1 | [Container] 2023/05/02 15:21:27 Phase context status code: Message:
agent_1 | [Container] 2023/05/02 15:21:27 Entering phase PRE_BUILD
agent_1 | [Container] 2023/05/02 15:21:27 Phase complete: PRE_BUILD State: SUCCEEDED
agent_1 | [Container] 2023/05/02 15:21:27 Phase context status code: Message:
agent_1 | [Container] 2023/05/02 15:21:27 Entering phase BUILD
agent_1 | [Container] 2023/05/02 15:21:27 Running command pip install -r blackbird/tools/requirements.txt -t blackbird/tools
agent_1 | WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)'))': /simple/jinja2/
agent_1 | WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)'))': /simple/jinja2/
agent_1 | WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)'))': /simple/jinja2/
agent_1 | WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)'))': /simple/jinja2/
agent_1 | WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)'))': /simple/jinja2/
agent_1 | Could not fetch URL https://pypi.org/simple/jinja2/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/jinja2/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)'))) - skipping
agent_1 | ERROR: Could not find a version that satisfies the requirement jinja2==3.0.3 (from versions: none)
agent_1 | ERROR: No matching distribution found for jinja2==3.0.3
agent_1 | Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)'))) - skipping
agent_1 |
agent_1 | [Container] 2023/05/02 15:21:36 Command did not exit successfully pip install -r blackbird/tools/requirements.txt -t blackbird/tools exit status 1
agent_1 | [Container] 2023/05/02 15:21:36 Phase complete: BUILD State: FAILED
agent_1 | [Container] 2023/05/02 15:21:36 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: pip install -r blackbird/tools/requirements.txt -t blackbird/tools. Reason: exit status 1
agent_1 | [Container] 2023/05/02 15:21:36 Entering phase POST_BUILD
agent_1 | [Container] 2023/05/02 15:21:36 Phase complete: POST_BUILD State: SUCCEEDED
agent_1 | [Container] 2023/05/02 15:21:36 Phase context status code: Message:
agent_1 | [Container] 2023/05/02 15:21:36 Expanding base directory path: .
agent_1 | [Container] 2023/05/02 15:21:36 Assembling file list
agent_1 | [Container] 2023/05/02 15:21:36 Expanding .
agent_1 | [Container] 2023/05/02 15:21:36 Expanding file paths for base directory .
agent_1 | [Container] 2023/05/02 15:21:36 Assembling file list
agent_1 | [Container] 2023/05/02 15:21:36 Expanding */
agent_1 | [Container] 2023/05/02 15:21:36 Found 2081 file(s)
agent_1 | [Container] 2023/05/02 15:21:58 Preparing to copy secondary artifacts
agent_1 | [Container] 2023/05/02 15:21:58 No secondary artifacts defined in buildspec
agent_1 | [Container] 2023/05/02 15:21:58 Phase complete: UPLOAD_ARTIFACTS State: SUCCEEDED
agent_1 | [Container] 2023/05/02 15:21:58 Phase context status code: Message:
agent-resources_build_1 exited with code 0
Aborting on container exit...

Platform (please complete the following information):
Windows 10, docker (hyper-v)

Additional context
build-configtemplates.yml:

version: 0.2

phases:
build:
commands:
- pip install -r blackbird/tools/requirements.txt -t blackbird/tools
- python blackbird/tools/render_templates.py --pipeline-name $PIPELINE_NAME --render-manifest-path $RENDER_MANIFEST_PATH
artifacts:
files:
- '**/*'

requirements.txt:
jinja2==3.0.3
argparse==1.4.0

@sridhar562345
Copy link

@BolongL were you able to fix this?

@BolongL
Copy link
Author

BolongL commented May 11, 2023

@BolongL were you able to fix this?

I haven't :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants