1

I am current trying to deploy a Flask Application (an API Application) onto Elastic Beanstalk. But I am getting mod_wsgi error.

Here is the error message:

[Fri Jun 01 06:10:49.314023 2018] [:warn] [pid 2801] mod_wsgi: Compiled for Python/3.6.2.
[Fri Jun 01 06:10:49.314039 2018] [:warn] [pid 2801] mod_wsgi: Runtime using Python/3.6.5.
[Fri Jun 01 06:10:49.325648 2018] [mpm_prefork:notice] [pid 2801] AH00163: Apache/2.4.33 (Amazon) mod_wsgi/3.5 Python/3.6.5 configured -- resuming normal operations
[Fri Jun 01 06:10:49.325715 2018] [core:notice] [pid 2801] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Fri Jun 01 06:10:49.409813 2018] [:error] [pid 2806] mod_wsgi (pid=2806): Call to 'site.addsitedir()' failed for '(null)', stopping.
[Fri Jun 01 06:10:49.409893 2018] [:error] [pid 2806] mod_wsgi (pid=2806): Call to 'site.addsitedir()' failed for '/opt/python/run/venv/lib64/python3.6/site-packages:/opt/python/run/venv/lib/python3.6/site-packages'.
[Fri Jun 01 06:10:52.417385 2018] [:error] [pid 2806] mod_wsgi (pid=2806): Call to 'site.addsitedir()' failed for '(null)', stopping.
[Fri Jun 01 06:10:52.417463 2018] [:error] [pid 2806] mod_wsgi (pid=2806): Call to 'site.addsitedir()' failed for '/opt/python/run/venv/lib64/python3.6/site-packages:/opt/python/run/venv/lib/python3.6/site-packages'.


I have tried creating a .ebextension/package.config file and followed the instructions as shown in this link. ( Link: mod_wsgi "Call to 'site.addsitedir()' failed" on AWS Elastic Beanstalk Python 3.6 platform) It seems like the environment is not actually invoking the commands in the .ebextension.

Here is how I uploaded my files and deployed it onto AWS.

  • I compressed the files using the right click function on my mac
  • List item I used the AWS EB Console to upload and deploy the zip file

Am I missing something in this process?

Even after i relaunched the environment and restarted the server, I still get this error.

Can anyone help please, thank you!

cruise_lab
  • 111
  • 1

0 Answers0