Discussion:
[google-appengine] Can't deploy changes in console: error response
django python
2018-11-29 07:11:27 UTC
Permalink
Hi All

I am not able to deploy my django app with GCP. Here is what i am using.

Django==2.1.1 + postgres9.6

gcloud -v

Google Cloud SDK 226.0.0
beta 2018.11.09
bq 2.0.38
core 2018.11.16
docker-credential-gcr
gsutil 4.34
kubectl 2018.09.17GCP


Successfully able to migrate the database in gcloud postgres instance

deploy output

gcloud app deploy

DEBUG: Operation
[operations/build/decorist-dsp/MGEwM2MwNzgtYjQ4MC00N2U1LWE1Y2YtYjc0MDVkMjQ2N2Fi]
not complete. Waiting 1s.
DEBUG: Reading GCS logfile: 206 (read 5 bytes)
DONE
DEBUG: Operation
[operations/build/decorist-dsp/MGEwM2MwNzgtYjQ4MC00N2U1LWE1Y2YtYjc0MDVkMjQ2N2Fi]
complete. Result: {
"response": {
"finishTime": "2018-11-29T06:57:47.716547Z",
"status": "SUCCESS",
"timeout": "600s",
"startTime": "2018-11-29T06:54:49.114013221Z",
"artifacts": {
"images": [

"asia.gcr.io/decorist-dsp/appengine/default.20181129t122432:latest"
]
},
"logsBucket": "staging.decorist-dsp.appspot.com",
"results": {
"images": [
{
"pushTiming": {
"endTime": "2018-11-29T06:57:46.824632425Z",
"startTime": "2018-11-29T06:57:14.495401323Z"
},
"name":
"asia.gcr.io/decorist-dsp/appengine/default.20181129t122432",
"digest":
"sha256:c2293fb7ee8fc9998d5c6777cdedeaf80360408df31375b6532be01d785bf828"
},
{
"pushTiming": {
"endTime": "2018-11-29T06:57:46.824632425Z",
"startTime": "2018-11-29T06:57:14.495401323Z"
},
"name":
"asia.gcr.io/decorist-dsp/appengine/default.20181129t122432:latest",
"digest":
"sha256:c2293fb7ee8fc9998d5c6777cdedeaf80360408df31375b6532be01d785bf828"
}
],
"buildStepImages": [
"",
""
]
},
"createTime": "2018-11-29T06:54:48.470533291Z",
"@type": "type.googleapis.com/google.devtools.cloudbuild.v1.Build",
"timing": {
"PUSH": {
"endTime": "2018-11-29T06:57:46.824665689Z",
"startTime": "2018-11-29T06:57:14.495399545Z"
},
"FETCHSOURCE": {
"endTime": "2018-11-29T06:54:54.928030680Z",
"startTime": "2018-11-29T06:54:50.674392370Z"
},
"BUILD": {
"endTime": "2018-11-29T06:57:14.495384784Z",
"startTime": "2018-11-29T06:54:55.016315542Z"
}
},
"source": {
"storageSource": {
"object":
"asia.gcr.io/decorist-dsp/appengine/default.20181129t122432:latest",
"bucket": "staging.decorist-dsp.appspot.com"
}
},
"options": {
"substitutionOption": "ALLOW_LOOSE",
"logging": "LEGACY"
},
"steps": [
{
"status": "SUCCESS",
"name":
"gcr.io/gcp-runtimes/python/gen-***@sha256:f2bf09d4f76c1e21c46b5d8877357a99dbec3f0a1a176a2085fd95732d9e4924",
"args": [

"--base-image=gcr.io/google-appengine/***@sha256:1bbed7b5511bb582a2a8adf6a111defce8d184987c20d6281ce2bacaf2d4f71d"
],
"env": [
"GAE_APPLICATION_YAML_PATH=app.yaml"
],
"timing": {
"endTime": "2018-11-29T06:54:57.238065066Z",
"startTime": "2018-11-29T06:54:55.016335403Z"
},
"pullTiming": {
"endTime": "2018-11-29T06:54:56.189796219Z",
"startTime": "2018-11-29T06:54:55.016335403Z"
}
},
{
"status": "SUCCESS",
"name":
"gcr.io/cloud-builders/***@sha256:a61422445b245e1d410d53529d807959fee2856b8a1d581091081f92c5e241df",
"args": [
"build",
"-t",

"asia.gcr.io/decorist-dsp/appengine/default.20181129t122432:latest",
"."
],
"env": [
"GAE_APPLICATION_YAML_PATH=app.yaml"
],
"timing": {
"endTime": "2018-11-29T06:57:14.044566954Z",
"startTime": "2018-11-29T06:54:57.238113746Z"
},
"pullTiming": {
"endTime": "2018-11-29T06:55:16.489745251Z",
"startTime": "2018-11-29T06:54:57.238113746Z"
}
}
],
"sourceProvenance": {
"resolvedStorageSource": {
"generation": "1543474485160299",
"object":
"asia.gcr.io/decorist-dsp/appengine/default.20181129t122432:latest",
"bucket": "staging.decorist-dsp.appspot.com"
},
"fileHashes": {

"gs://staging.decorist-dsp.appspot.com/asia.gcr.io/decorist-dsp/appengine/default.20181129t122432:latest#1543474485160299":
{}
}
},
"projectId": "decorist-dsp",
"images": [

"asia.gcr.io/decorist-dsp/appengine/default.20181129t122432:latest"
],
"substitutions": {
"_GAE_APPLICATION_YAML_PATH": "app.yaml",
"_OUTPUT_IMAGE":
"asia.gcr.io/decorist-dsp/appengine/default.20181129t122432:latest"
},
"id": "0a03c078-b480-47e5-a5cf-b7405d2467ab",
"logUrl":
"https://console.cloud.google.com/gcr/builds/0a03c078-b480-47e5-a5cf-b7405d2467ab?project=371136100032"
},
"done": true,
"name":
"operations/build/decorist-dsp/MGEwM2MwNzgtYjQ4MC00N2U1LWE1Y2YtYjc0MDVkMjQ2N2Fi",
"metadata": {
"@type":
"type.googleapis.com/google.devtools.cloudbuild.v1.BuildOperationMetadata",
"build": {
"finishTime": "2018-11-29T06:57:47.716547Z",
"status": "SUCCESS",
"timeout": "600s",
"startTime": "2018-11-29T06:54:49.114013221Z",
"artifacts": {
"images": [

"asia.gcr.io/decorist-dsp/appengine/default.20181129t122432:latest"
]
},
"logsBucket": "staging.decorist-dsp.appspot.com",
"results": {
"images": [
{
"pushTiming": {
"endTime": "2018-11-29T06:57:46.824632425Z",
"startTime": "2018-11-29T06:57:14.495401323Z"
},
"name":
"asia.gcr.io/decorist-dsp/appengine/default.20181129t122432",
"digest":
"sha256:c2293fb7ee8fc9998d5c6777cdedeaf80360408df31375b6532be01d785bf828"
},
{
"pushTiming": {
"endTime": "2018-11-29T06:57:46.824632425Z",
"startTime": "2018-11-29T06:57:14.495401323Z"
},
"name":
"asia.gcr.io/decorist-dsp/appengine/default.20181129t122432:latest",
"digest":
"sha256:c2293fb7ee8fc9998d5c6777cdedeaf80360408df31375b6532be01d785bf828"
}
],
"buildStepImages": [
"",
""
]
},
"id": "0a03c078-b480-47e5-a5cf-b7405d2467ab",
"timing": {
"PUSH": {
"endTime": "2018-11-29T06:57:46.824665689Z",
"startTime": "2018-11-29T06:57:14.495399545Z"
},
"FETCHSOURCE": {
"endTime": "2018-11-29T06:54:54.928030680Z",
"startTime": "2018-11-29T06:54:50.674392370Z"
},
"BUILD": {
"endTime": "2018-11-29T06:57:14.495384784Z",
"startTime": "2018-11-29T06:54:55.016315542Z"
}
},
"source": {
"storageSource": {
"object":
"asia.gcr.io/decorist-dsp/appengine/default.20181129t122432:latest",
"bucket": "staging.decorist-dsp.appspot.com"
}
},
"options": {
"substitutionOption": "ALLOW_LOOSE",
"logging": "LEGACY"
},
"steps": [
{
"status": "SUCCESS",
"name":
"gcr.io/gcp-runtimes/python/gen-***@sha256:f2bf09d4f76c1e21c46b5d8877357a99dbec3f0a1a176a2085fd95732d9e4924",
"args": [

"--base-image=gcr.io/google-appengine/***@sha256:1bbed7b5511bb582a2a8adf6a111defce8d184987c20d6281ce2bacaf2d4f71d"
],
"env": [
"GAE_APPLICATION_YAML_PATH=app.yaml"
],
"timing": {
"endTime": "2018-11-29T06:54:57.238065066Z",
"startTime": "2018-11-29T06:54:55.016335403Z"
},
"pullTiming": {
"endTime": "2018-11-29T06:54:56.189796219Z",
"startTime": "2018-11-29T06:54:55.016335403Z"
}
},
{
"status": "SUCCESS",
"name":
"gcr.io/cloud-builders/***@sha256:a61422445b245e1d410d53529d807959fee2856b8a1d581091081f92c5e241df",
"args": [
"build",
"-t",

"asia.gcr.io/decorist-dsp/appengine/default.20181129t122432:latest",
"."
],
"env": [
"GAE_APPLICATION_YAML_PATH=app.yaml"
],
"timing": {
"endTime": "2018-11-29T06:57:14.044566954Z",
"startTime": "2018-11-29T06:54:57.238113746Z"
},
"pullTiming": {
"endTime": "2018-11-29T06:55:16.489745251Z",
"startTime": "2018-11-29T06:54:57.238113746Z"
}
}
],
"sourceProvenance": {
"resolvedStorageSource": {
"generation": "1543474485160299",
"object":
"asia.gcr.io/decorist-dsp/appengine/default.20181129t122432:latest",
"bucket": "staging.decorist-dsp.appspot.com"
},
"fileHashes": {

"gs://staging.decorist-dsp.appspot.com/asia.gcr.io/decorist-dsp/appengine/default.20181129t122432:latest#1543474485160299":
{}
}
},
"projectId": "decorist-dsp",
"images": [

"asia.gcr.io/decorist-dsp/appengine/default.20181129t122432:latest"
],
"substitutions": {
"_GAE_APPLICATION_YAML_PATH": "app.yaml",
"_OUTPUT_IMAGE":
"asia.gcr.io/decorist-dsp/appengine/default.20181129t122432:latest"
},
"createTime": "2018-11-29T06:54:48.470533291Z",
"logUrl":
"https://console.cloud.google.com/gcr/builds/0a03c078-b480-47e5-a5cf-b7405d2467ab?project=371136100032"
}
}
}
DEBUG: Reading GCS logfile: 416 (no new content; keep polling)
----------------------------------------------------------------------------------------------------------------------------------------------

DEBUG: Converted YAML to JSON: "{
"betaSettings": {
"cloud_sql_instances": "decorist-dsp us-east1 postgresql-users-dev",
"module_yaml_path": "app.yaml",
"vm_runtime": "python"
},
"entrypoint": {
"shell": "gunicorn --preload -b :$PORT dj_main.wsgi"
},
"env": "flex",
"envVariables": {
"ALLOWED_HOST": "*",
"DB_HOST": "/cloudsql/decorist-dsp:us-east1:postgresql-users-dev",
"DB_NAME": "user_api_dev",
"DB_PASSWORD": "drtny23_",
"DB_PORT": "5432",
"DB_USER": "db_user",
"DEBUG": "True",
"SECRET_KEY": "+lzdjn1tsuei=#@8%5doa8hjxc0au3847k5*tq1^*(^(lapn6x",
"STATIC_URL": "https://storage.googleapis.com/dsp-users/static/"
},
"handlers": [
{
"securityLevel": "SECURE_OPTIONAL",
"staticFiles": {
"path": "static/\\1",
"uploadPathRegex": "static/.*"
},
"urlRegex": "/static/(.*)"
}
],
"runtime": "vm"
}"
DEBUG: Operation
[apps/decorist-dsp/operations/aa030512-6dca-4899-abef-59fad4af0884] not
complete. Waiting to retry.
Updating service [default] (this may take several minutes)...⠛DEBUG:
Operation
[apps/decorist-dsp/operations/aa030512-6dca-4899-abef-59fad4af0884] not
complete. Waiting to retry.
Updating service [default] (this may take several minutes)...â ¹DEBUG:
Operation
[apps/decorist-dsp/operations/aa030512-6dca-4899-abef-59fad4af0884]
complete. Result: {
"metadata": {
"user": "***@gmail.com",
"target":
"apps/decorist-dsp/services/default/versions/20181129t122432",
"@type":
"type.googleapis.com/google.appengine.v1.OperationMetadataV1",
"insertTime": "2018-11-29T06:57:50.940Z",
"method": "google.appengine.v1.Versions.CreateVersion"
},
"done": true,
"name":
"apps/decorist-dsp/operations/aa030512-6dca-4899-abef-59fad4af0884",
"error": {
"message": "An internal error occurred during deployment.",
"code": 13
}
}
Updating service [default] (this may take several minutes)...failed.

DEBUG: (gcloud.app.deploy) Error Response: [13] An internal error occurred
during deployment.

app.yml

runtime: python

# the PROJECT-DIRECTORY is the one with settings.py and wsgi.py
entrypoint: gunicorn --preload -b :$PORT dj_main.wsgi # specific to a
GUnicorn HTTP server deployment
env: flex # for Google Cloud Flexible App Engine

# any environment variables you want to pass to your application.
# accessible through os.environ['VARIABLE_NAME']
env_variables:
# the secret key used for the Django app (from
PROJECT-DIRECTORY/settings.py)
SECRET_KEY: 'my-secret-key'
DEBUG: 'True' # always False for deployment

# everything after /cloudsql/ can be found by entering >> gcloud sql
instances describe DATABASE-NAME << in your Terminal
# the DATABASE-NAME is the name you gave your project's PostgreSQL database
# the second line from the describe output called connectionName can be
copied and pasted after /cloudsql/
ALLOWED_HOST: "*"
DB_HOST: '/cloudsql/myconnection'
DB_PORT: '5432' # PostgreSQL port
DB_NAME: 'my-db'
DB_USER: 'my-db-user' # either 'postgres' (default) or one you created on
the PostgreSQL instance page
DB_PASSWORD: ''
STATIC_URL: 'https://storage.googleapis.com/dsp-users/static/' # this is
the url that you sync static files to

handlers:
- url: /static
static_dir: static

beta_settings:
# from command >> gcloud sql instances describe DATABASE-NAME <<
cloud_sql_instances: "my own instance"

runtime_config:
python_version: 3 # enter your Python version BASE ONLY here. Enter 2 for
2.7.9 or 3 for 3.6.4
--
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 google-appengine+***@googlegroups.com.
To post to this group, send email to google-***@googlegroups.com.
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/9b0acea4-7756-47e9-a4a0-368f6e0507eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
'George (Cloud Platform Support)' via Google App Engine
2018-11-30 18:40:04 UTC
Permalink
The best place to report this issue is the Public Issue Tracker, where you
can be sure your posting will get deserved attention, and developments or
solutions are all on thread.

Your Cloud SDK seems to be up-to-date. Running gcloud components update may
be still be worthwhile.

We need the full --verbosity output: gcloud app deploy --verbosity=debug
--no-user-output-enabled.

Does this error happen each time you attempt deployment? Has deployment
ever succeeded for your image.
--
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 google-appengine+***@googlegroups.com.
To post to this group, send email to google-***@googlegroups.com.
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/98160a90-c1c5-4b13-bdfd-666b5bbcd729%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
django python
2018-12-02 01:37:35 UTC
Permalink
Thanks for the information about public tracker. Here is the issue.

https://issuetracker.google.com/issues/120306089

Yes it happen every time. First i deployed with wrong info to app.yaml then
i deployed a single plan html saying hellow world which i was able to see
but then I tried to deploy django app I am facing the same problem.



On Sat, Dec 1, 2018 at 12:10 AM 'George (Cloud Platform Support)' via
Post by 'George (Cloud Platform Support)' via Google App Engine
The best place to report this issue is the Public Issue Tracker, where you
can be sure your posting will get deserved attention, and developments or
solutions are all on thread.
Your Cloud SDK seems to be up-to-date. Running gcloud components update
may be still be worthwhile.
We need the full --verbosity output: gcloud app deploy --verbosity=debug
--no-user-output-enabled.
Does this error happen each time you attempt deployment? Has deployment
ever succeeded for your image.
--
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
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/98160a90-c1c5-4b13-bdfd-666b5bbcd729%40googlegroups.com
<https://groups.google.com/d/msgid/google-appengine/98160a90-c1c5-4b13-bdfd-666b5bbcd729%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
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 google-appengine+***@googlegroups.com.
To post to this group, send email to google-***@googlegroups.com.
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/CAOjr%2BRE%3D%2ByrPUBBJApTtm-D4vokqhwPKXapOzE0n7MwbSyoXKA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
'George (Cloud Platform Support)' via Google App Engine
2018-12-03 21:18:37 UTC
Permalink
It is still better to report directly in the public issue you link to,
where information may be kept confidential, and help is assured. If hello
world deployed successfully, while your Django app failed, the issue seems
to be associated with your app, not Cloud Platform.
--
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 google-appengine+***@googlegroups.com.
To post to this group, send email to google-***@googlegroups.com.
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/c3da2b22-f504-4c65-badf-40e2d9867c72%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...