I followed this excellent tutorial on Getting Started with Node.js but get the following error when running the last command gcloud preview app deploy .:
/Users/me/Google Drive/appengine-nodejs-quickstart> gcloud preview app deploy .
Updating module [default] from file [/Users/me/Google Drive/appengine-nodejs-quickstart/app.yaml]
08:51 PM Host: appengine.google.com
Error 400: --- begin server output ---
Failed Project Preparation (app_id='s~foo-bar-123'). Failed to enable APIs.
--- end server output ---
ERROR: (gcloud.preview.app.deploy) Command failed with error code [1]
I was able to run the app locally just fine using gcloud preview app run .. I checked and I do have Billing enabled for the project and some default APIs are enabled. Here's the results from docker version if it helps:
Client version: 1.3.2
Client API version: 1.15
Go version (client): go1.3.3
Git commit (client): 39fa2fa
OS/Arch (client): darwin/amd64
Any ideas what could be the issue?
I'm an engineer on the managed vms team and have looked into the issue. I believe the problem is we have changed our terms of service and you need to accept the before you can continue to use the product. Obviously, our messaging in this case is bad and needs to be fixed.
For now you need to go to cloud.google.com/console, select your project, and accept the new terms of service.
Related
I have a 2.x python app and some 3.x python app which are running on google app engine.
Recently, I had updated the 2.x app without any issue. Now, when I'm trying to deploy an update for a 3.x python app, I'm getting an error "Error Response: [7] Failed to create cloud build: Permission denied on"
Services to deploy:
descriptor: [C:\Users\artha\Documents\gae billApp\CbicNtfnAndAutoMailer\app.yaml]
source: [C:\Users\artha\Documents\gae billApp\CbicNtfnAndAutoMailer]
target project: [cbicntfnandautomailer]
target service: [default]
target version: [1]
target url: [https://cbicntfnandautomailer.appspot.com]
target service account: [App Engine default service account]
Do you want to continue (Y/n)? Y
Beginning deployment of service [default]...
#============================================================#
#= Uploading 0 files to Google Cloud Storage =#
#============================================================#
File upload done.
Updating service [default]...failed.
ERROR: (gcloud.app.deploy) Error Response: [7] Failed to create cloud build: Permission denied on 'locations/asia-south1' (or it may not exist)..
Previously, I did not face any issue.
gcloud app describe shows me
authDomain: gmail.com
codeBucket: staging.cbicntfnandautomailer.appspot.com
databaseType: CLOUD_DATASTORE_COMPATIBILITY
defaultBucket: cbicntfnandautomailer.appspot.com
defaultHostname: cbicntfnandautomailer.appspot.com
featureSettings:
splitHealthChecks: true
useContainerOptimizedOs: true
gcrDomain: asia.gcr.io
id: cbicntfnandautomailer
locationId: asia-south1
name: apps/cbicntfnandautomailer
serviceAccount: cbicntfnandautomailer#appspot.gserviceaccount.com
servingStatus: SERVING
I have also tried disabling and re-enabling cloud build, but to no avail...
Can you please advice how to resolve the issue, thanks!!!
EDIT: As a workaround, created a seperate project and deployed there to resolve the issue, but the root cause still remains unknown!!
Check if you reached the limit of build-triggers allowed per region:
Cloud build limits
Folks
I am trying to deploy a simple node.js app onto appengine. Every time I deploy the same using gcloud deploy, I get these warning and errors in the logs. I am using the config module in node.js also to load some general environment variables I need. Any pointers apprecaited if others have come across similar runtime issues? here is log when I execute the command:
gcloud app deploy app.yaml
No cached base image found for entry
us.gcr.io/.../app-engine-build-cache/node-cache:f0sdafsadasdfsadfasfasdfasdf
Step #1 - "builder": INFO Cache miss on local cache for us.gcr.io/.../app-engine-build-cache/node-cache:f0sdafsadasdfsadfasfasdfasdf
....
later....
...
Step #1 - "builder": ERROR Error during upload of: us.gcr.io/.../app-engine-build-cache/node-cache:f0sdafsadasdfsadfasfasdfasdf
Finally my deploy fails
File upload done.
Updating service [myservice name]...failed.
ERROR: (gcloud.app.deploy) Error Response: [9] Cloud build <number> status: FAILURE. Check the build log for errors: https://console.cloud.google.com/gcr/builds/<my build number>
I am using
$gcloud version
Google Cloud SDK 214.0.0
bq 2.0.34
core 2018.08.24
gsutil 4.33
$ npm --version
6.3.0
thanks for any pointers where things might be going wrong.
Quick: where can I find the deployment logs for a node deploy which fails?
Setup: windows 10 box developing a node.js website. the website runs locally, and has deployed successfully with the same package stack (body-parser, express, firebase, firebase-tools, path, pug)
Google Cloud SDK 134.0.0
app-engine-python 1.9.40
bq 2.0.24
bq-win 2.0.24
core 2016.11.07
core-win 2016.11.07
gcloud
gsutil 4.22
gsutil-win 4.20
windows-ssh-tools 2016.05.13
The last few lines of the deploy output shows a core dump and timeout ends the deploy and how the latest gcloud update gacked up the logging output.
[91mnpm[0m[91m WARN using --force I sure hope you know what you are doing.
[0m
> group-coms#0.0.1 install /app
> npm install --force
[91mAborted (core dumped)
ERROR: (gcloud.app.deploy) Error Response: [4] DEADLINE_EXCEEDED
Oh yes, when it failed earlier today, I moved the folder to the root of the drive testing the 'too long a path' theory and it deployed successfully a couple of times. I haven't added or renamed any files since then, I have tried reloading all the node_modules to no avail.
# [START app_yaml]
runtime: nodejs
vm: true
# [END app_yaml]
I changed the yamal file to comply with upgrading#appyaml_changes and the deploy completed successfuly... I would still like to know more about how I can monitor the build process..
I'm using Windows 7x64, gcloud installed version
Google Cloud SDK 0.9.71
app 2015.07.24
app-engine-java 1.9.24
app-engine-python 1.9.24
app-engine-python-extras 1.9.21
bq 2.0.18
bq-win 2.0.18
core 2015.07.24
core-win 2015.07.24
gcloud 2015.07.24
gsutil 4.13
gsutil-win 4.13
preview 2015.07.24
windows-ssh-tools 2015.06.02
I'm trying to run on preview and deploy the tutorial example from here. Note that app.yaml from this example has "nodejs" set as runtime.
After running command
gcloud preview app run --host localhost:8080 app.yaml
I get
RuntimeError: Unknown runtime 'nodejs'; supported runtimes are 'custom', 'go', 'java', 'java7', 'php', 'php55', 'python, 'python27', 'vm'.
If I put "vm" for runtime it wants to use docker, which doesn't work for me either and I wanted to use the option to do this without docker anyhow.
If I put "custom" for runtime in yaml file I get:
ValueError: The --custom_entrypoint flag must be set for custom runtimes
Example given in the help output for this switch is the following
--custom_entrypoint="gunicorn -b localhost:{port} mymodule:application"
I tried with this, best guess
gcloud preview app run --custom_entrypoint="nodejs -b localhost:{8080} mymodule:application" app.yaml
and got this
ERROR: Argument [--custom_entrypoint=nodejs -b localhost:{8080} mymodule:application] is not a valid deployable file.
ERROR: (gcloud.preview.app.run) Errors occurred while parsing the App Engine app configuration.
Thanks for your time.
The gcloud command seems to be undergoing some changes, so this question seems no longer valid, since we're meant to run dev_appserver.py instead of gcloud to run devserver processes; you can also just straight-up run the node server, or even use docker to build the image from your dockerfile and run that as a container.
If running from dev_appserver.py, make sure you have runtime: custom and a Dockerfile sourcing FROMgcr.io/google_appengine/nodejs, since dev_appserver.py currently raises:
RuntimeError: Unknown runtime 'nodejs'; supported runtimes are 'custom', 'go', 'java', 'java-compat', 'java7', 'php55', 'python', 'python-compat', 'python27'.
I'm using a Node Express app with App Engine. Everything's been deploying fine, but I must have had an interrupted deployment because now when I try to deploy using this:
gcloud preview app deploy .
I get this:
Error 409: --- begin server output ---
Another transaction by user <username> is already in progress for app:
s~<appId>, version: 1. That user can undo the transaction with "appcfg
rollback".
--- end server output ---
ERROR: (gcloud.preview.app.deploy) Command failed with error code [1]
I can't find an appcfg file to rollback, nor any documentation about this issue for a node app.
You can use gcloud preview app deploy . --force
which will implicitly do a rollback (to clear the deploy lock) before attempting the deployment.
Use the appcfg.py rollback command.
Here, create a file as app.yaml and a directory WEB-INF in which there will be two files named as web.xml and appengine-web.xml.