Can't deploy changes in console: error response 13: An internal error occurred

111 views
Skip to first unread message

django python

unread,
Nov 29, 2018, 8:26:42 PM11/29/18
to Google App Engine
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": [
            ]
        }, 
        "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"
                    }, 
                    "digest": "sha256:c2293fb7ee8fc9998d5c6777cdedeaf80360408df31375b6532be01d785bf828"
                }
            ], 
            "buildStepImages": [
                "", 
                ""
            ]
        }, 
        "createTime": "2018-11-29T06:54:48.470533291Z", 
        "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": {
                "bucket": "staging.decorist-dsp.appspot.com"
            }
        }, 
        "options": {
            "substitutionOption": "ALLOW_LOOSE", 
            "logging": "LEGACY"
        }, 
        "steps": [
            {
                "status": "SUCCESS", 
                "args": [
                ], 
                "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", 
                "args": [
                    "build", 
                    "-t", 
                    "."
                ], 
                "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", 
                "bucket": "staging.decorist-dsp.appspot.com"
            }, 
            "fileHashes": {
            }
        }, 
        "projectId": "decorist-dsp", 
        "images": [
        ], 
        "substitutions": {
            "_GAE_APPLICATION_YAML_PATH": "app.yaml", 
        }, 
        "id": "0a03c078-b480-47e5-a5cf-b7405d2467ab", 
    }, 
    "done": true, 
    "name": "operations/build/decorist-dsp/MGEwM2MwNzgtYjQ4MC00N2U1LWE1Y2YtYjc0MDVkMjQ2N2Fi", 
    "metadata": {
        "build": {
            "finishTime": "2018-11-29T06:57:47.716547Z", 
            "status": "SUCCESS", 
            "timeout": "600s", 
            "startTime": "2018-11-29T06:54:49.114013221Z", 
            "artifacts": {
                "images": [
                ]
            }, 
            "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", 
                    "args": [
                    ], 
                    "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", 
                    "args": [
                        "build", 
                        "-t", 
                        "."
                    ], 
                    "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": {
                }
            }, 
            "projectId": "decorist-dsp", 
            "images": [
            ], 
            "substitutions": {
                "_GAE_APPLICATION_YAML_PATH": "app.yaml", 
            }, 
            "createTime": "2018-11-29T06:54:48.470533291Z", 
        }
    }
}
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", 
  }, 
  "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": "djangob...@gmail.com", 
        "target": "apps/decorist-dsp/services/default/versions/20181129t122432", 
        "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

George (Cloud Platform Support)

unread,
Nov 30, 2018, 1:40:04 PM11/30/18
to google-a...@googlegroups.com
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.

django python

unread,
Dec 1, 2018, 9:58:40 PM12/1/18
to google-a...@googlegroups.com
Thanks for the information about public tracker. Here is the issue.


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.



--
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-appengi...@googlegroups.com.
To post to this group, send email to google-a...@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.

George (Cloud Platform Support)

unread,
Dec 3, 2018, 4:18:37 PM12/3/18
to Google App Engine
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. 
Reply all
Reply to author
Forward
0 new messages