Elastic Beanstalk error after migrating from python 3.7 to python3.8.

0

I am using the EB platform: Python 3.7 AL2 version 3.3.11, and all is working fine.

But, the troubleshooting comes when I try to upgrade both to a newer AL2 version (3.3.12) and to a newer Python version (3.8). The error happens on the "[app-deploy] - [StageApplication]":

eb-engine:

022/04/20 11:51:08.170326 [INFO] Executing instruction: StageApplication
2022/04/20 11:51:08.171215 [INFO] extracting /opt/elasticbeanstalk/deployment/app_source_bundle to /var/app/staging/
2022/04/20 11:51:08.171232 [INFO] Running command /bin/sh -c /usr/bin/unzip -q -o /opt/elasticbeanstalk/deployment/app_source_bundle -d /var/app/staging/
2022/04/20 11:51:08.208452 [INFO] finished extracting /opt/elasticbeanstalk/deployment/app_source_bundle to /var/app/staging/ successfully
2022/04/20 11:51:08.212657 [ERROR] An error occurred during execution of command [app-deploy] - [StageApplication]. Stop running the command. Error: chown /var/app/staging/venv/dev/lib/python3.8/collections: no such file or directory 

The error specifically says:

[ERROR] An error occurred during execution of command [app-deploy] - [StageApplication]. Stop running the command. Error: chown /var/app/staging/venv/dev/lib/python3.8/collections: no such file or directory

I don't know why it goes there, instead of /var/app/venv/staging-LQM1lest/lib/python3.8 that is where I think it should go and where it is the virtual environment.

I can assure that the local /venv folder is ignored when deploying (following this related question https://stackoverflow.com/questions/61805345/aws-elastic-beanstalk-chown-pythonpath-error). Said that though, after connecting to the instance by ssh, I can see a venv folder in /var/app/staging/ containing a pyton3.8 sub folder. I am curious to know why this happens and what can I be doing wrong in the process

Thanks in advance!

llpujol
gefragt vor 2 Jahren1670 Aufrufe
1 Antwort
0
Akzeptierte Antwort

Already solved. In my local venv, python 3.8 added symlinks, that are not ignored by .ebignore (that is a bug of awsebcli). The are several workarounds, but the issue is exactly this. see: https://github.com/aws/aws-elastic-beanstalk-cli/issues/69

llpujol
beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen