I just completed a gcloud components update on my local machine and got several new errors when deploying my application. I was able to fix most of these new errors with a few minutes of troubleshooting (I understand that the gcloud preview app command is still 'preview', so I expect some changes here.)
I am now getting an error (bug?) that I can't seem to fix.
ERROR: (gcloud.preview.app.deploy) Error Response: [400]
version.automatic_scaling.min_pending_latency (nanos: 300000000),
must be in the range [0.010000s,15.000000s].
So, correct me if I'm wrong, but I'm pretty sure 300000000 nanos falls in the acceptable range as defined in the error.
These are the relevant sections of my app.yaml
module: api
runtime: php55
api_version: 1
threadsafe: true
instance_class: F2
automatic_scaling:
min_idle_instances: automatic
max_idle_instances: automatic
min_pending_latency: 300ms
max_pending_latency: 1s
I just tried the 300ms config on my app, but updating using the GAE SDK's appcfg.py - no issue, which supports your suspicion of a bug in the gcloud preview CLI. You might want to file an issue with the Google Cloud SDK Issue Tracker.
As a workaround you could either:
check this #klenwell's answer to this Q&A for the new location of
appcfg.py in the Google Cloud SDK:
With Google App Engine, why do I now get "command not found" when running the appcfg.py command on my local machine?
use the GAE SDK's appcfg.py to update your app.
Related
There are many answers to this question already, but they no longer work here in January 2021. All those answers come in 3 flavors:
Set local machine timeout with something like gcloud config set app/cloud_build_timeout 1600 then deploy with gcloud app deploy ...
Use a cloudbuild.yaml file instead with timeout: 1600s bits in the gcloud app deploy buildstep and the global configuration, then deploy with gcloud builds submit ...
Per google's own docs, don't set timeout: 1600s in the cloudbuild file, but rather do a mashup of the previous 2 flavors with a build step including args: ['-c', 'gcloud config set app/cloud_build_timeout 1600 && gcloud app deploy']
None of them have any impact on the app deploy build - it's stuck at 10mins. When using gcloud builds submit, it results in 2 Cloud Builds being kicked off: one for the cloudbuild.yaml, and one for the app engine deployment using buildpack. The above solutions can impact the first build, but once that first build kicks off the second build (gcloud app deploy, you can see at https://console.cloud.google.com/cloud-build in the Execution Details tab that the Timeout is still 10m.
IMO, solutions 2-3 are hacks since 1 doesn't work, but now that 2-3 don't work either, I'm looking for another hack. Does anyone have a solution which works in 2021? Since my app is using GAE Standard Environment, I can't prebuild an image - I'm stuck with Buildpack building my ruby app and pulling all the Gems every time, and this runs out the seemingly immutable 10m clock.
You cannot change the timeout property in App Engine standard and it's always 10min. The workaround is to use App Engine flex and this way you can use the gcloud config set app/cloud_build_timeout TIME_SECONDS.
There is a feature request to enable timeout edit for App Engine standard but seems still in progress.
We have a service hosted in gcloud that is not actively developed and we have not deployed for a few weeks.
On deployment we now get the error ERROR: gcloud crashed (TypeError): unorderable types: NoneType() > int() and the deployment fails.
We get the exact same results even if we run the last deployed version through CI.
This is my app.yaml
runtime: aspnetcore
env: flex
threadsafe: true
service: myapp
manual_scaling:
instances: 1
env_variables:
service_name: myapp
AWS_ACCESS_KEY_ID: {{AWS_ACCESS_KEY_ID}}
AWS_SECRET_ACCESS_KEY: {{AWS_SECRET_ACCESS_KEY}}
AWS_REGION: eu-west-1
This is very unclear to me as it's not obvious what the deployment would need ordering. Is there something I am missing in interperating this error message?
Check if you have Python 3.5 installed on the same build agent. The gcloud SDK has a dependency of Python 2.7, also advisable to set the CLOUDSDK_PYTHON environment variable to the path of your Python 2.7 installation location.
A workaround that worked for me:
Instead of gcloud app deploy ... try gcloud beta app deploy ...
You may be prompted to install the beta components (allow this)
If adding 'beta' results in a successful deployment, try again without it.
It seems like something was corrupt and using the 'beta' deployment command un-corrupted things. Your mileage may vary.
All of a sudden having issues with deploying to GCP using gcloud app deploy.
Created a brand new project and tried to upload a sample hello-world app from GCP, but still get the following error:
ERROR: (gcloud.app.deploy) Error Response: [3] Docker image us.gcr.io/gcp-test-8710371/appengine/default.20181106t173450:latest was either not found, or is not in Docker V2 format. Please visit https://cloud.google.com/container-registry/docs/ui
app.yaml:
runtime: nodejs
env: flex
manual_scaling:
instances: 1
resources:
cpu: 1
memory_gb: 0.5
disk_size_gb: 10
SDK: Google Cloud SDK 224.0.0
I've checked the container registry, and nothing is created there.
Also, tried enabling/disabling APIs like in this post, but with no result.
An example Python app uploads fine with no problems.
Appears it was an issue on GCP's side. The error is no longer occuring, so I assume it was resolved.
There was an issue affecting the Flex deployments. The issue was fixed on 07/11 at aproximately 00:40 UTC. As #isharko pointed out, Flex deployments should be working normally now.
There's also a public issue on GCP's issue tracker about this. If new relevant information surfaces, it'll likely be posted there.
All of a sudden having issues with deploying to GCP using gcloud app deploy.
Created a brand new project and tried to upload a sample hello-world app from GCP, but still get the following error:
ERROR: (gcloud.app.deploy) Error Response: [3] Docker image us.gcr.io/gcp-test-8710371/appengine/default.20181106t173450:latest was either not found, or is not in Docker V2 format. Please visit https://cloud.google.com/container-registry/docs/ui
app.yaml:
runtime: nodejs
env: flex
manual_scaling:
instances: 1
resources:
cpu: 1
memory_gb: 0.5
disk_size_gb: 10
SDK: Google Cloud SDK 224.0.0
I've checked the container registry, and nothing is created there.
Also, tried enabling/disabling APIs like in this post, but with no result.
An example Python app uploads fine with no problems.
Appears it was an issue on GCP's side. The error is no longer occuring, so I assume it was resolved.
There was an issue affecting the Flex deployments. The issue was fixed on 07/11 at aproximately 00:40 UTC. As #isharko pointed out, Flex deployments should be working normally now.
There's also a public issue on GCP's issue tracker about this. If new relevant information surfaces, it'll likely be posted there.
I have run gcloud app deploy many times over the past 12 hours. When I run gcloud app browse my browser opens up https://mysite.appspot.com with some old version of my app from hours ago. I Can't even tell which at this point. However, if I visit http://mysite.appspot.com (wihout TLS) I get my new, expected version.
I've restarted the versions with the GCP console but have had no success in seeing my latest version at https://mysite.appspot.com. The console even says that the proper version is serving with 100% allocation, and indeed it is, over at http but not at https.
my app.yaml has only these 2 lines per the documentation
env: flex
runtime: nodejs
What am I doing wrong?