-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
google_app_engine_standard_app_version ModuleNotFoundError: No module named 'hello_world.wsgi'" #5192
Comments
@jjorissen52 do you have |
@jjorissen52 from your screenshot, it seems you did not include the app.yml from hello_world.zip. Was that on purpose? Why? You might want to take a look at the sample https://github.com/GoogleCloudPlatform/python-docs-samples/tree/master/appengine/standard_python37/django Please try to rerun |
It could very well not be a bug with Terraform, but I spent quite some time on this and came up dry. A minimum working example be greatly appreciated! I did not include the app.yaml file in the screenshot because it was added afterwards when I was trying to see if it works with
This is that same app created with And this is it using Same directory being zipped and uploaded, two different ways of deploying, but I can't make the terraform one work. Does |
going to @ you here @edwardmedia since I did not do so in my previous comment #5192 (comment) |
@jjorissen52 your files inside the zip don't have exec permissions. Can you update that? Let me know if this helps. Thanks |
same problem for me in similar situation. Seems appengine is not able to load modules if deployed from terraform with a zip bucket as source.
gcloud app deploy use this way to deploy app |
@llicour the original issue was likely what I stated earlier. For yours, it may or may not be the same. Could you create a separate issue so that helps us to track? Please also post your terraform config and state how to repro the issue. |
@llicour I don't see your reply. Is there anything more I can assist? |
@llicour I am closing this issue. Please feel free to reopen it if you need further assistance |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
Community Note
Terraform Version
Affected Resource(s)
Terraform Configuration Files
Debug Output
Terraform creates version successfully, but the resulting App Engine instances are incapable of launching the wsgi server. The below image says that it cannot find the wsgi module
But the source for the application shows that it's there.
Expected Behavior
When I visit the app engine deployment, I should see the DisallowedHost Django debug page, which indicates that a Django app is running.
Actual Behavior
I get 502 bad gateway from NGINX.
Steps to Reproduce
pip install Django gunicorn
django-admin startproject hello_world
cd hello_world && gunicorn hello_world.wsgi # application starts
^c # stop gunicorn
echo -e "Django\ngunicorn" > requirements.txt # add requirements file
terraform apply
Important Factoids
If I add the below
app.yaml
and rungcloud app deploy
in thehello_world
Django app created above, the app works as expected (shows "DisallowedHost" screen, as it should).The text was updated successfully, but these errors were encountered: