I am trying to setup my project with jhipster gae
Using JHipster version installed locally in current project's node_modules
Executing jhipster:gae
Options: from-cli: true
Welcome to Google App Engine Generator (Beta)
WARNING! This sub-generator is still in development, please report bugs on Github
Installing App Engine Java SDK
... Running: gcloud components install app-engine-java --quiet
All components are up to date.
? Google Cloud Project ID quinoa-219713
This project already has an App Engine location set, using location "europe-west3"
? Google App Engine Service Name quinoa
? Google App Engine Instance Class B8 - 4.8GHz, 1GB, Basic or Manual Scaling
? Basic or Manual Scaling manual
? How many instances to run ? 1
? Google Cloud SQL Instance Name coco
? Google Cloud SQL User Name root
? Google Cloud SQL Password [hidden]
? Google Cloud SQL Database Name coco
Creating New Cloud SQL Instance
... Running: gcloud sql instances create "coco" --region='europe-west3' --project=quinoa-219713
ERROR: (gcloud.sql.instances.describe) HTTPError 404: The Cloud SQL instance does not exist.
child_process.js:644
throw err;
^
Error: Command failed: gcloud sql instances describe jhipster --format="value(connectionName)" --project="quinoa-219713"
ERROR: (gcloud.sql.instances.describe) HTTPError 404: The Cloud SQL instance does not exist.
at checkExecSyncError (child_process.js:601:13)
at execSync (child_process.js:641:13)
at exec (/Users/cmk/workspace/quinoa/node_modules/generator-jhipster/generators/gae/index.js:568:52)
at ChildProcess.exithandler (child_process.js:267:7)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
Any idea why I am doing wrong ?
Related
I am trying to deploy the nodejs app to Azure but I am getting the below error.
2021-07-08T10:22:38.234570707Z
/home/site/wwwroot/node_modules/.bin/npm: 1:
/home/site/wwwroot/node_modules/.bin/npm: ../npm/bin/npm-cli.js: not
found
2021-07-08T10:22:38.244796509Z npm info lifecycle express-typescript-starter#0.1.0~start: Failed to exec start script
This is the output I am seeing application logs on Azure.
App Service is the free plan with Node 14 as a runtime environment running on Linux. I have verified all the files, everything looking good.
Even I checked node modules as well. The folder is there but the error-specific file i.e inside node_module npm/bin/npm-cli.js. It is not there.
But it's not on my local as well and there it's working fine.
I am deploying through Github action.
I am using python google app engine
could you tell me, how i can run python3 google app engine with ndb on local system?
Help me
https://cloud.google.com/appengine/docs/standard/python3
Please try this
Go to service account https://cloud.google.com/docs/authentication/getting-started
create json file
and add install this pip
$ pip install google-cloud-ndb
now open linux terminal
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/credentials.json"
if window then open command prompt
set GOOGLE_APPLICATION_CREDENTIALS=C:\path\to\credentials.json
run this code in python3 in your terminal/command prompt
from google.cloud import ndb
client = ndb.Client()
with client.context():
contact1 = Contact(name="John Smith",
phone="555 617 8993",
email="john.smith#gmail.com")
contact1.put()
see this result in your datastore.. Google console
App Engine is a Serverless service provided by Google Cloud Platform where you can deploy your applications and configure Cloud resources like instances' CPU, memory, scaling method, etc. This will provide you the architecture to run your app.
This service is not meant to be used on local environments. Instead, it is a great option to host an application that (ideally) has been tested on local environments.
Let's say: You don't run a Django application with Datastore dependencies using App Engine locally, You run a Django application with Datastore (and other) dependencies locally and then deploy it to App Engine once it is ready.
Most GCP services have their Client libraries so we can interact with them via code, even on local environments. The ndb you asked belongs to the Google Cloud Datastore and can be installed in Python environments with:
pip install google-cloud-ndb
After installing it, you will be ready to interact with Datastore locally. Please find details about setting up credentials and code snippets in the Datastore Python Client Library reference.
Hope this is helpful! :)
You can simply create emulator instance of the datastore on your local:
gcloud beta emulators datastore start --project test --host-port "0.0.0.0:8002" --no-store-on-disk --consistency=1
And then use it in the code in main app file:
from google.cloud import ndb
def get_ndb_client(namespace):
if config.ENVIRONMENT != ENVIRONMENTS.LOCAL:
# production
db = ndb.Client(namespace=namespace)
else:
# localhost
import mock
credentials = mock.Mock(spec=google.auth.credentials.Credentials)
db = ndb.Client(project="test", credentials=credentials, namespace=namespace)
return db
ndb_client = get_ndb_client("ns1")
I have an app I am trying to deploy through azure's DevOps pipeline. I have successfully deployed apps before, and the first build of this app deployed fine. However all subsequent builds have been failing at the deployment step. They seem to be specifically failing at the "Deploy Azure App Service" step, generating a ERROR_NOT_ENOUGH_DISK_SPACE error code.
The deployment terminal output shows the following errors:
Got connection details for Azure App Service:'MMOMarketTracker'
[command]"C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb:sync -source:package='D:\a\r1\a\_MMMarketTracker\build\build.zip' -dest:contentPath='MMOMarketTracker',ComputerName='https://mmomarkettracker.scm.azurewebsites.net:443/msdeploy.axd?site=MMOMarketTracker',UserName='$MMOMarketTracker',Password='***',AuthType='Basic' -enableRule:AppOffline -enableRule:DoNotDeleteRule -userAgent:VSTS_ba2ca09f-578d-4893-99ac-412c3f26fde5_release_1_9_9_1
2018-11-22T21:02:35.2302461Z Info: Using ID 'e7a243b1-97df-4ec2-b8d9-c679c2e35512' for connections to the remote server.
Info: Adding directory (MMOMarketTracker\s\.git\objects\15).
Error: C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe failed with return code: 4294967295
at ChildProcess.<anonymous> (D:\a\_tasks\AzureRmWebAppDeployment_497d490f-eea7-4f2b-ab94-48d9c1acdcb1\3.4.16\node_modules\vsts-task-lib\toolrunner.js:568:30)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:886:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
[command]"C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb:sync -source:package='D:\a\r1\a\_MMMarketTracker\build\build.zip' -dest:contentPath='MMOMarketTracker',ComputerName='https://mmomarkettracker.scm.azurewebsites.net:443/msdeploy.axd?site=MMOMarketTracker',UserName='$MMOMarketTracker',Password='***',AuthType='Basic' -enableRule:AppOffline -enableRule:DoNotDeleteRule -userAgent:VSTS_ba2ca09f-578d-4893-99ac-412c3f26fde5_release_1_9_9_1
Info: Using ID '201db2e8-ee9f-4e39-9a29-2187cb7056bd' for connections to the remote server.
Info: Adding directory (MMOMarketTracker\s\.git\objects\15).
##[error]Failed to deploy web package to App Service.
##[error]Error Code: ERROR_NOT_ENOUGH_DISK_SPACE
More Information: Web Deploy detected insufficient space on disk. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_NOT_ENOUGH_DISK_SPACE.
Error: The error code was 0x80070070.
Error: There is not enough space on the disk.
at Microsoft.Web.Deployment.NativeMethods.RaiseIOExceptionFromErrorCode(Win32ErrorCode errorCode, String maybeFullPath)
at Microsoft.Web.Deployment.DirectoryEx.CreateDirectory(String path)
at Microsoft.Web.Deployment.DirPathProviderBase.CreateDirectory(String fullPath, DeploymentObject source)
at Microsoft.Web.Deployment.DirPathProviderBase.Add(DeploymentObject source, Boolean whatIf)
Error count: 1.
##[error]Error: C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe failed with return code: 4294967295
The first error seems to be caused by the remote server failing to add a git object. This error will usually occur 2-3 times each deployment, and will result in the "Retrying to to deploy the package" message shown.
The second error will happen once and will end the deployment. I have been to the link the error recommends and there is no help section for this type of error.
I downloaded the build file and it is only 49.3 MB large, and the Microsoft servers have a 10GB size for deployments. I am running on a hosted build agent, not a private one.
Other questions I found online similar to this are mostly unanswered. Some have been updated later to say the deployment started working for seemingly no reason.
Any help would be appreciated.
For anyone else who gets the same problem, I basically had too many other apps taking up space on my azure account. The article Brendan Green linked explains this.
(https://blogs.msdn.microsoft.com/puneetgupta/2017/06/06/azure-app-service-what-is-taking-my-disk-space-for-my-azure-web-app/)
By going to the Quotas page on any of your azure apps (in the azure portal) you can see how much space you have left.
This happens when you're out of staging slots in your pricing tier. So, a workout solution is to upgrade your pricing tier to acquire more staging slots.
The staging slots are used for testing and deployments before swapping them into production and it does not associate with your file system disk space.
You may be able to reclaim disk space by triggering the build agent cleanup process.
App Engine deploy fails with this error
Copying files to Google Cloud Storage...
Synchronizing files to [gs://staging.john-slowmo-droid-1116.appspot.com/].
Updating module [default]...failed.
ERROR: (gcloud.preview.app.deploy) Error Response: [400] Invalid character in filename: node_modules/es5-ext/array/#/##iterator/implement.js
This behavior did not happen before the second to latest gcloud update. Tried in gcloud sdk 0.9.86 and 0.9.87.
I am currently attempting to get an Sqlite database in a node app hosted on Azure Websites.
I've listed Sqlite3 in my dependencies field of package.json:
"sqlite3": "^3.0.8"
When I deploy, I see the following during install:
remote: [sqlite3] Success: "D:\home\site\wwwroot\node_modules\sqlite3\lib\binding\node-v11-win32-ia32\node_sqlite3.node" is installed via remote
However, every request returns a 500 error, so I checked out the app log.
When I look at the application log, I see the following error each deploy:
Mon Jun 29 2015 17:13:51 GMT+0000 (Coordinated Universal Time): Unaught exception: Error: Cannot find module 'D:\home\site\wwwroot\node_modules\sqlite3\lib\binding\node-v14-win32-ia32\node_sqlite3.node
If you notice, when running the application it looks for node_modules\sqlite3\lib\binding\node-v14-win32-ia32\node_sqlite3.node
but it installed to node_modules\sqlite3\lib\binding\node-v11-win32-ia32\node_sqlite3.node. I don't understand enough about servers in general, or even node's environment to figure out how to get it pointed to the right location or the other version installed. It appears as though Azure has one machine building the code and another machine running the code, where they have different specs.
Try to set the Node JS version to 0.12.0.
This can be done from the Azure portal with the following steps:
Select the website
Select "Settings" and then "Application Settings"
Then under "App settings" change the value of "WEBSITE_NODE_DEFAULT_VERSION" to "0.12.0"