i create simple hello world app using this tutorial
https://cloud.google.com/appengine/docs/flexible/python/hello-world
and im trying deploy app using console
gcloud config set project [myId]
gcloud config set account xxxx#gmail.com
cloud preview app deploy app.yaml
in the end console write error
Error Response: [13] Timed out when starting VMs. It's possible that
the application code is unhealthy. (0/2 ready, 2 still deploying).
This error means that your application failed to start up correctly ("It's possible that the application code is unhealthy.").
Managed VMs rely on your application responding to "health checks" in order to determine when to send traffic to that version of your application. These "health checks" are an HTTP endpoint that the Managed VM infrastructure will check frequently for an "all good" response.
The getting-started tutorial contains working code, so it's possible that you introduced a typo or error in the file structure. Check http://console.developers.google.com/ and navigate to the "Logging" section to check your application logs for clues as to what the issue might be.
Related
I have a Django application deployed on Google App Engine standard environment. I am interested in server side rendering of my JS frontend. Can I use node.js alongside Django on the same GAE? Maybe as microservice?
What you can do is to deploy each of your app as a separate service in App Engine and they will work independently as a microservice. To do so, make sure to set a service name for each of the app.yaml file of your apps:
service: service-name
Afterwards, you can communicate between your services through an HTTP invocation, such as a user request or a RESTful API call. Code in one service can't directly call code in another service.
Refer to this link for additional information about communicating between your services.
I have come across articles that talk about integrating python and Node but I personally haven't done it or seen it done on GAE.
If I were to take a stab, I think you would be looking at something like
Have the python app as a service (say it's available on python_service.myapp.appspot.com
Have your Node.js as your default service available on myapp.appspot.com
Your Nodejs will have a route and when this route is invoked, you make an http request to the python service, wait for a response and then your Nodejs app returns that response.
Our App, https://nocommandline.com is an Electron App (combo of Node.js & Vue.js) If you purchase a license and try to validate it, we make a call server side and our server side is Python based. It's not exactly the same thing you're looking at (since our App is not web-based) but this gives you an idea of what I was trying to describe.
I’ve recently tested and deployed a flask app as the minusthemiddleman website. All of the functions tested and worked in the sandbox by multiple testing methods before deployment to nginx and uwsgi in production. For some reason page 2 of the search function causes a resource problem in app as deployed. I’ve had a chance to monitor the redis directly using $redis-cli monitor and check my pip list to make everything is installed in production correctly.
The specific error is:
Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
Does anybody have ideas as to why this is malfunctioning? Thanks,
I have been looking for a great way to deploy my Django application and I found Google App Engine Flex a pretty good solution. I have not much experience in application deployment so I follow along with the Official Google Tutorial about the deployment.
On the last step, the tutorial instructs me to deploy the application within the cmd prompt: gcloud app deploy.
I follow along. Everything seems fine until I get this message:
Updating service [default] (this may take several minutes)...
After a while I get this message:
Updating service [default] (this may take several minutes)...failed.
ERROR: (gcloud.app.deploy) Error Response: [13] Flex operation <stuff..> error [INTERNAL]: An internal error occurred while processing task /app-engine-flex/insert_flex_deployment/flex_create_resources>2020-10-10T07:36:04.734Z7747.ue.0: Deployment Manager operation <stuff..> errors: [code: "RESOURCE_ERROR"
location: "<stuff...>"
message: "{\"ResourceType\":\"compute.beta.regionAutoscaler\",\"ResourceErrorCode\":\"403\",\"ResourceErrorMessage\":{\"code\":403,\"message\":\"The caller does not have permission\",\"status\":\"PERMISSION_DENIED\",\"statusMessage\":\"Forbidden\",\"requestPath\":\"<stuff..>",\"httpMethod\":\"POST\"}}"
]
Every time I rerun the command gcloud app deploy I get the exact same error. Any idea how to fix that? Google Search doesn't reveal anything for me.
Firstly try and give the following permissions to yourself. This answer will help with some of the explanations.
Also, try and add the following in your .yaml file and see if it solves it
automatic_scaling:
min_num_instances: 1
max_num_instances: 7
I'm getting my feet wet with GCP and GAE, also nodejs and python and networking (I know).
[+] What I have:
Basically I have some nodejs code that takes in some input and is supposed to then send that input to some python code that will do more stuff to it. My first idea was to deploy the nodejs code via GAE, then host the python code in a python server, then make post requests from the nodejs front-end to the python server backend.
[+] What I would like to be able to do:
just deploy both my nodejs code and my python code in the same project and instance of GAE so that the nodejs is the frontend that people see but so that the python server is also running in the same environment and can just communicate with the nodejs without sending anything online.
[+] What I have read
https://www.netguru.co/blog/use-node-js-backend
Google App Engine - Front and Backend Web Development
and countless other google searches for this type of setup but to no avail.
If anyone can point me in the right direction I would really appreciate it.
You can't have both python and nodejs running in the same instance, but they can run as separate services, each with their own instance(s) inside the same GAE app/project. See Service isolation and maybe Deploying different languages services to the same Application [Google App Engine]
Using post requests can work pretty well, but will likely take some effort to ensure no outside access.
Since you intend to use as frontend the nodejs service you're limited to using only the flexible environment for it, which limits the inter-service communication options - you can't use push queues (properly supported only in the standard environment) which IMHO would be a better/more secure solution than post requests.
Another secure communication option would be for the nodejs service to place the data into the datastore and have the python service pick it up from there - the datastore is shared by all instances/versions/services inside the same GAE app. Also more loosely coupled IMHO - each service can function (at least for a while) without the other being alive (not possible if using the post requests).
Maybe of interest: How to tell if a Google App Engine documentation page applies to the standard or the flexible environment
UPDATE:
Node.JS is currently available in the standard environment as well, so you can use those features, see:
Now, you can deploy your Node.js app to App Engine standard environment
Google App Engine Node.js Standard Environment Documentation
I set up the Google App Engine on my computer to work with Python , so I could make my first "Hello World" App at http://localhost:8080/. In the developers section of facebook it says I need Google App Engine and Python to test an app. But my question is, can I just host the files(the .yaml and the .py) on my server account instead(once I'm done testing)?
You do not specifically need Google app engine, that i believe is just a sample app. The main thing that you need is a globally accessible web server. So that FB can reach your pages/application from their servers. So depending on the language, get a small/free hosting account and test your application from there. Or you may also try Dynamic DNS to be able to reach your local machine from the outside world http://www.dyndns.com/services/dns/dyndns/
That example is written in Python and specifically targeted for Google App Engine. So, yes you do need Google App Engine to run that example without modification. However, almost any web hosting would suffice in general with your own application.