0

I have followed through the steps in google cloud platform guide, but still getting permission error. which says the caller does not have the permission. pls what am I doing wrong. this is the out of command gcloud config list

region = us-central1
zone = us-central1-f
[core]
account = <gmail-account>
disable_usage_reporting = True
project = <project-id>
Your active configuration is: [default]

this is the error it raised

ERROR: (gcloud.app.deploy) Error Response: [13] Flex operation projects/<project-id>/regions/europe-west1/operations/error [INTERNAL]: An internal error occurred while processing task /appengine-flex-v1/insert_flex_deployment/flex_create_resources>2020-07-28T15:45:31.962Z49210.jv.11: Deployment Manager operation <project-id>/operation-... errors: [code: "RESOURCE_ERROR"
location: "/deployments/aef-default-..../resources/aef-default-...."
message: "{\"ResourceType\":\"compute.beta.regionAutoscaler\",
\"ResourceErrorCode\":\"403\",
\"ResourceErrorMessage\":{\"code\":403,
\"message\":\"The caller does not have permission\",
\"status\":\"PERMISSION_DENIED\",
\"statusMessage\":\"Forbidden\",
\"requestPath\":\"https://compute.googleapis.com/compute/beta/projects/<project-id>/regions/europe-west1/autoscalers\",
\"httpMethod\":\"POST\"}}"
lvingstone
  • 171
  • 8

1 Answers1

1

Please check your project quotas usually this error is raised when your project doesn't have enough IPs or VMs (App engine Flex uses Compute Engine VMs) and the scaling strategy on your app.yaml is exceeding the quotas.

Please try to add one of the following blocks in your app.yaml file

For automatic scaling

automatic_scaling:
    min_num_instances: 1
    max_num_instances: 2

For manual scaling

manual_scaling:
   instances: 2

To avoid exhaust these quotas please, delete/stop the App Engine service versions that you don't need.

For more information about scaling strategies please check this reference guide

For example: Every VM takes 1 IP and your project have a quota of 4.

If your app engine service has 3 VMs running (3 IPs used), in the next deploy you only has 1 IP available, if your min_instances or instances in your app.yaml file is greater than 1, the deploy will fails.

This is because is not possible allocate more than 4 IPs on your project, and App engine first turn on the new instances and after shutdown the old instances, this is to avoid a service interruption

If you need increase this resource quotas it is necessary to contact a GCP sales rep.

Jan Hernandez
  • 4,414
  • 2
  • 12
  • 18
  • if I check my project qouta, how do i know that ips and vms is not enough? – lvingstone Jul 28 '20 at 17:37
  • @EmekaVictorLivingstone for example every vm takes 1 ip and your project have a quota of 4. if your app engine service has 3 VMs running (3 ips used), in the next deploy you only has 1ip available, if your `min_instances` or `instances` in your app.yaml file is greater than 1 the deploy will fails. This is because is not possible allocate more than 4 IPs on your project, and App engine first turn on the new instances and after shutdown the old instances, this is to avoid a service interruption. – Jan Hernandez Jul 28 '20 at 19:05
  • @EmekaVictorLivingstone if this answer was useful for you please do not forget to up vote an accept the answer – Jan Hernandez Jul 28 '20 at 19:11
  • @ thanks. it was successful deployed. but I got another error, when I ran gcloud app browse. server error(500) – lvingstone Jul 29 '20 at 19:06
  • @lvingstone i think that you need open a new question for the new issue in order to have better visibility for people that are finding information about same issue – Jan Hernandez Jul 30 '20 at 13:18
  • check this link https://stackoverflow.com/questions/63177625/bad-request400-django-postgresql-page-error-in-gcp – lvingstone Jul 30 '20 at 16:40