odo push fails to fetch package for python related components

Created on 23 Feb 2021  ยท  3Comments  ยท  Source: openshift/odo

/kind bug

What versions of software are you using?

Operating System:
Fedora 32

Output of odo version:
odo v2.0.5 (2180507a4)

How did you run odo exactly?

Used minikube.
Create a new directory and run the following from it -

odo create python-django --starter
odo push

Actual behavior

โžœ  empty_dir odo create python-django --starter                   
Devfile Object Validation
 โœ“  Checking devfile existence [57264ns]
 โœ“  Creating a devfile component from registry: DefaultDevfileRegistry [86518ns]
Validation
 โœ“  Validating if devfile name is correct [90655ns]

Starter Project
 โœ“  Downloading starter project django-example from https://github.com/odo-devfiles/python-django-ex [1s]

Please use `odo push` command to create the component with source deployed
โžœ  empty_dir odo push                          

Validation
 โœ“  Validating the devfile [45075ns]

Creating Kubernetes resources for component python-django
 โœ“  Waiting for component to start [28s]
 โœ“  Waiting for component to start [7ms]
 โš   Unable to create ingress, missing host information for Endpoint web, please check instructions on URL creation (refer `odo url create --help`)


Applying URL changes
 โœ“  URLs are synced with the cluster, no changes are required.

Syncing to component python-django
 โœ“  Checking files for pushing [356462ns]
 โœ“  Syncing files to the component [119ms]

Executing devfile commands for component python-django
 โœ“  Waiting for component to start [2ms]
 โœ—  Executing pip-install-requirements command "pip install --user -r requirements.txt" [11s]
 โœ—  Failed to start component with name python-django. Error: Failed to create the component: command execution failed: unable to execute the run command: unable to exec command [/bin/sh -c pip install --user -r requirements.txt]: 
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f8c7ac938d0>: Failed to establish a new connection: [Errno 111] Connection refused')': /simple/django/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f8c7a9b1810>: Failed to establish a new connection: [Errno 111] Connection refused')': /simple/django/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f8c7a9b1a50>: Failed to establish a new connection: [Errno 111] Connection refused')': /simple/django/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f8c7a9b1c90>: Failed to establish a new connection: [Errno 111] Connection refused')': /simple/django/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f8c7a9b1ed0>: Failed to establish a new connection: [Errno 111] Connection refused')': /simple/django/
ERROR: Could not find a version that satisfies the requirement Django==3.1 (from -r requirements.txt (line 1)) (from versions: none)
ERROR: No matching distribution found for Django==3.1 (from -r requirements.txt (line 1))
: error while streaming command: command terminated with exit code 1

Expected behavior

Should be able to fetch django from pypi and execute a successful odo push. Even with this failure, it does push the component.

Any logs, error output, etc?

kinbug

All 3 comments

Works for me. I'm on minishift:

$ odo push

Validation
 โœ“  Validating the devfile [141816ns]

Creating Kubernetes resources for component python-django
 โœ“  Waiting for component to start [48s]
 โœ“  Waiting for component to start [313ms]

Applying URL changes
 โœ“  URL web: http://web-python-django-myproject.192.168.42.126.nip.io/ created

Syncing to component python-django
 โœ“  Checking files for pushing [945366ns]
 โœ“  Syncing files to the component [7s]

Executing devfile commands for component python-django
 โœ“  Waiting for component to start [613ms]
 โœ“  Executing pip-install-requirements command "pip install --user -r requirements.txt" [13s]
 โœ“  Executing run-app command "python manage.py runserver 0.0.0.0:8000" [3s]

Pushing devfile component python-django
 โœ“  Changes successfully pushed to component

Looks like you're having connectivity problems with pip trying to download your dependencies (Failed to establish a new connection):

unable to exec command [/bin/sh -c pip install --user -r requirements.txt]: 
...
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f8c7a9b1ed0>: Failed to establish a new connection: [Errno 111] Connection refused')': /simple/django/

Are you using a proxy? Is your minikube installed and configured correctly?

I think my system's minikube might be at a fault here. I ran the same thing from another machine and it worked. Closing this issue.

Was this page helpful?
0 / 5 - 0 ratings