Hello Adam, Thanks to your hint I started thinking about alternative solutions, and I have figured out that I had a slightly older Google Cloud SDK version (138.0.0). After updating to the newest one (141.0.0), the deployment worked. Thanks for the help.
Best, Tas On Friday, January 27, 2017 at 9:55:29 PM UTC+1, Adam (Cloud Platform Support) wrote: > > I was referring to your local files. There's no reason to try to discover > them on the instance. If you're on Windows, the equivalent commands are echo > %cd%, dir, and dir mysite/ from inside the directory containing your > app.yaml. > > It seems like the files are missing or unreadable, so I'd like to verify > they are actually there. If you're on Windows it could also be a > permissions issue - try from a folder under C:\Users\<your_username> > instead of C:\_Downloads. It can also help to know which version of > Windows you're on. > > On Wednesday, January 25, 2017 at 5:17:44 AM UTC-5, Tas Sóti wrote: >> >> I have just noticed that I get the following warning during the >> deployment: >> WARNING: Could not generate [source-context.json]: Could not list remote >> URLs from source directory: C:\_Downloads\django_cloudsql >> >> On more thing, the sample is not completely unchanged. I commented out >> the following two lines from *app.yaml*: >> beta_settings: >> cloud_sql_instances: <your-cloudsql-connection-string> >> >> However, I do not think this is connected to the problem in any way. >> >> On Wednesday, January 25, 2017 at 11:04:21 AM UTC+1, Tas Sóti wrote: >>> >>> Hello Adam, >>> >>> Thank you for your efforts. Do you mean to have these outputs from the >>> server (so connecting to the instance through SSH)? Unfortunately, I cannot >>> find the deployment folder on the instance. Could you point me to the right >>> path? >>> Or you mean to have these information from my local drive? I am using >>> Windows, so I cannot give you those outputs. However, I use the unchanged >>> app folder/files directly downloaded from GitHub. >>> >>> Thank you in advance. >>> >>> On Tuesday, January 24, 2017 at 9:37:05 PM UTC+1, Adam (Cloud Platform >>> Support) wrote: >>>> >>>> I went through the tutorial again and it deploys fine for me without >>>> any modifications to entrypoint. There is no reason to manually edit >>>> this, or discover the path where the app gets deployed on the VM, as this >>>> is indeed handled by the runtime. >>>> >>>> It appears the mysite/ directory and contents are not being deployed >>>> with the app. Can share the output of 'pwd', 'ls' and 'ls mysite/' >>>> from inside the directory containing your app.yaml? >>>> >>>> On Monday, January 23, 2017 at 12:39:55 PM UTC-5, Tas Sóti wrote: >>>>> >>>>> I have difficulties deploying the sample app (GitHub >>>>> <https://github.com/GoogleCloudPlatform/python-docs-samples/tree/master/appengine/flexible/django_cloudsql>) >>>>> >>>>> to the App Engine Flexible Environment based on this official tutorial >>>>> <https://cloud.google.com/python/django/flexible-environment>. I get >>>>> the following error message: >>>>> >>>>> Updating service [default]...failed. >>>>> ERROR: (gcloud.app.deploy) Error Response: [9] >>>>> Application startup error: >>>>> [2017-01-21 17:01:14 +0000] [5] [INFO] Starting gunicorn 19.6.0 >>>>> [2017-01-21 17:01:14 +0000] [5] [INFO] Listening at: http://0.0.0.0:8080 >>>>> (5) >>>>> [2017-01-21 17:01:14 +0000] [5] [INFO] Using worker: sync >>>>> [2017-01-21 17:01:14 +0000] [8] [INFO] Booting worker with pid: 8 >>>>> [2017-01-21 17:01:14 +0000] [8] [ERROR] Exception in worker process >>>>> Traceback (most recent call last): >>>>> File "/env/lib/python3.5/site-packages/gunicorn/arbiter.py", line 557, >>>>> in spawn_worker >>>>> worker.init_process() >>>>> File "/env/lib/python3.5/site-packages/gunicorn/workers/base.py", line >>>>> 126, in init_process >>>>> self.load_wsgi() >>>>> File "/env/lib/python3.5/site-packages/gunicorn/workers/base.py", line >>>>> 136, in load_wsgi >>>>> self.wsgi = self.app.wsgi() >>>>> File "/env/lib/python3.5/site-packages/gunicorn/app/base.py", line 67, >>>>> in wsgi >>>>> self.callable = self.load() >>>>> File "/env/lib/python3.5/site-packages/gunicorn/app/wsgiapp.py", line >>>>> 65, in load >>>>> return self.load_wsgiapp() >>>>> File "/env/lib/python3.5/site-packages/gunicorn/app/wsgiapp.py", line >>>>> 52, in load_wsgiapp >>>>> return util.import_app(self.app_uri) >>>>> File "/env/lib/python3.5/site-packages/gunicorn/util.py", line 357, in >>>>> import_app >>>>> __import__(module) >>>>> ImportError: No module named 'mysite' >>>>> [2017-01-21 17:01:14 +0000] [8] [INFO] Worker exiting (pid: 8) >>>>> [2017-01-21 17:01:14 +0000] [5] [INFO] Shutting down: Master >>>>> [2017-01-21 17:01:14 +0000] [5] [INFO] Reason: Worker failed to boot. >>>>> >>>>> >>>>> app.yaml >>>>> # [START runtime] >>>>> runtime: python >>>>> env: flex >>>>> entrypoint: gunicorn -b :$PORT mysite.wsgi >>>>> >>>>> beta_settings: >>>>> cloud_sql_instances: <your-cloudsql-connection-string> >>>>> >>>>> runtime_config: >>>>> python_version: 3 >>>>> # [END runtime] >>>>> >>>>> As far as I figured it out, the problem is that gunicorn cannot find >>>>> the app. To my understanding, the entry point should something like this: >>>>> entrypoint: gunicorn --chdir=/path/to/the/app -b :$PORT mysite.wsgi >>>>> >>>>> However, I do not know where the app gets deployed on the virtual >>>>> machine. Additionally, I would expect the App Engine to sort this out on >>>>> its own. >>>>> You can find my Stackoverflow question here: >>>>> http://stackoverflow.com/questions/41782396/deploying-a-django-app-to-app-engine-flexible-environment/41783614 >>>>> . >>>>> >>>>> Any help is appreciated. >>>>> >>>> -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-appengine. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/0c653b09-6be6-407a-bf4d-fe344859f2a8%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
