iris-web icon indicating copy to clipboard operation
iris-web copied to clipboard

'SSLError(SSLZeroReturnError during "docker compose build" (pip3 install -r requirements.txt)

Open dciftci opened this issue 1 year ago • 3 comments

Hi Team,

I am currently stucked and having this error when I do execite docker compose build. I have a proxy settings and for testing purposes; I am successfully execute pip3 install -r requirements.txt in /iris-web/source - I installed all the dependencies.

But when I do execute build command, got this SSL/TLS error. I am trying to provision this VM under corporate proxy. Could you pleaes assist me about this issues? What should i do?

PS: I tried to create pip.conf and add our proxy there but did not fix it.

Building app [+] Building 10.3s (10/29) docker:default => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 2.37kB 0.0s => [internal] load metadata for docker.io/library/python:3.9 0.9s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [internal] load build context 0.0s => => transferring context: 90.03kB 0.0s => CACHED [compile-image 1/6] FROM docker.io/library/python:3.9@sha256:3b199ecfbdb57cf390ef4af18d3c0ea630ade330c5b1eaf7aa37971ce304cc03 0.0s => CACHED [compile-image 2/6] RUN apt-get update 0.0s => CACHED [compile-image 3/6] RUN python -m venv /opt/venv 0.0s => CACHED [compile-image 4/6] COPY source/dependencies /dependencies 0.0s => CACHED [compile-image 5/6] COPY source/requirements.txt / 0.0s => ERROR [compile-image 6/6] RUN pip3 install -r requirements.txt 9.2s

> [compile-image 6/6] RUN pip3 install -r requirements.txt:
0.717 Processing /dependencies/docx_generator-0.8.0-py3-none-any.whl
0.729 Processing /dependencies/iris_interface-1.2.0-py3-none-any.whl
0.737 Processing /dependencies/evtx2splunk-2.0.1-py3-none-any.whl
0.744 Processing /dependencies/iris_evtx-1.2.0-py3-none-any.whl
0.751 Processing /dependencies/iris_check_module-1.0.1-py3-none-any.whl 0.759 Processing /dependencies/iris_vt_module-1.2.1-py3-none-any.whl 0.766 Processing /dependencies/iris_misp_module-1.3.0-py3-none-any.whl 0.773 Processing /dependencies/iris_webhooks_module-1.0.4-py3-none-any.whl 0.781 Processing /dependencies/iris_intelowl_module-0.1.0-py3-none-any.whl 0.853 WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed ( EOF) (_ssl.c:1133)'))': /simple/azure-identity/ 1.452 WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed ( EOF) (_ssl.c:1133)'))': /simple/azure-identity/ 2.531 WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed ( EOF) (_ssl.c:1133)'))': /simple/azure-identity/ 4.589 WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed ( EOF) (_ssl.c:1133)'))': /simple/azure-identity/ 8.673 WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed ( EOF) (_ssl.c:1133)'))': /simple/azure-identity/ 8.759 Could not fetch URL https://pypi.org/simple/azure-identity/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded wi th url: /simple/azure-identity/ (Caused by SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1133)'))) - skipping 8.760 ERROR: Could not find a version that satisfies the requirement azure-identity==1.10.0 (from versions: none) 8.761 ERROR: No matching distribution found for azure-identity==1.10.0 8.855 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: /si mple/pip/ (Caused by SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1133)'))) - skipping

Dockerfile:33

31 | COPY source/requirements.txt / 32 |
33 | >>> RUN pip3 install -r requirements.txt 34 |
35 | ############### ERROR: failed to solve: process "/bin/sh -c pip3 install -r requirements.txt" did not complete successfully: exit code: 1 ERROR: Service 'app' failed to build : Build failed

dciftci avatar Jul 05 '24 13:07 dciftci

had a same problem here anyone know to solve this??

kebonn avatar Jul 05 '24 15:07 kebonn

Are your proxy environment variables set? Additionally- may need to add your proxy certificate chain (if they rewrite SSL) to your certifi.pem file!

lowlandghost avatar Jul 05 '24 20:07 lowlandghost

I guess the problem is related to specific python / pip proxy settings. I was able to fix it by bypassing the proxy settings and able to execute docker compose built successfully. But still no idea how to fix proxy things for pip/pthon step.

dciftci avatar Jul 08 '24 08:07 dciftci

I'm closing this issue since the containers are now shipped prebuilt.

whikernel avatar Sep 24 '24 14:09 whikernel