7

SAP CAP app deployment to Cloud Foundry failed ("some instances have crashe...

 1 year ago
source link: https://answers.sap.com/questions/13397884/sap-cap-app-deployment-to-cloud-foundry-failed-som.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
May 31, 2021 at 05:20 AM

SAP CAP app deployment to Cloud Foundry failed ("some instances have crashed")

2911 Views

Greetings everyone!

I am working on a project based on SAP CAP and SAP HANA DB, in the SAP BTP environment (trial account).

Following the CAPm model, my application consists of a database module (db), a services module (srv) and an app module that is only the approuter (I don't have a Fiori UI or any other, since I don't require it).

Following these the following tutorials from Thomas Jung (and some others, to a lesser extent):

https://developers.sap.com/tutorials/hana-cloud-cap-create-project.html (from that tutorial, all of the following)

https://developers.sap.com/tutorials/hana-cloud-cap-deploy-mta.html

I have managed to advance a lot in understanding the process, and get closer to what I need to do: Deploy my application to my space in Cloud Foundry (within my SAP BTP Trial account).

However, so far I always get the same error when I try to deploy my application (the corresponding .mtar file):

Error starting application "UAM-app-srv": Some instances have crashed. Check the logs of your application for more information.

UAM-app is the name of my application, and UAM-app-srv is the service module.

In the registry in the cockpit (Most recent Application Events) I have the following message (just an excerpt) for the different events of the service module (srv) deployment:

exit_description: APP/PROC/WEB: Exited with status 1, reason: CRASHED

At the moment I have no further clues as to the cause of the error. I have thought that it could even be due to limitations of the Trial account, perhaps regarding the number of applications that can be running at the same time in the Cloud Foundry environment, could it be?

Note: I only have three applications deployed in Cloud Foundry, corresponding to the three modules of my application (the one I am dealing with here: db deployer, app and srv).

Thank you very much in advance for any helpful answers and/or comments.

P.S:

I have not published here the record that is generated in the Deployment process, with all the corresponding details, because I think it is very extensive. I can publish it, however, if someone considers that it is necessary to be able to give an answer regarding the error I have with the deployment.

4 comments
May 31, 2021 at 08:08 AM

Greetings back, Mr. Gregor Wolf.

Thank you very much for your answer.

The result (an extract) of the command that indicates me is the following:

2021-05-31T07:51:45.94+0000 [APP/PROC/WEB/0] ERR     Node.js v12.18 or higher is required for @sap/cds 5.1.4.
   2021-05-31T07:51:45.94+0000 [APP/PROC/WEB/0] ERR     Current v10.24 does not satisfy this.
   2021-05-31T07:51:45.94+0000 [APP/PROC/WEB/0] ERR     
   2021-05-31T07:51:45.95+0000 [APP/PROC/WEB/0] ERR npm ERR! code ELIFECYCLE
   2021-05-31T07:51:45.95+0000 [APP/PROC/WEB/0] ERR npm ERR! errno 1
   2021-05-31T07:51:45.96+0000 [APP/PROC/WEB/0] ERR npm ERR! [email protected] start: `NODE_ENV=production cds run`
   2021-05-31T07:51:45.96+0000 [APP/PROC/WEB/0] ERR npm ERR! Exit status 1
   2021-05-31T07:51:45.96+0000 [APP/PROC/WEB/0] ERR npm ERR! 
   2021-05-31T07:51:45.96+0000 [APP/PROC/WEB/0] ERR npm ERR! Failed at the [email protected] start script.
   2021-05-31T07:51:45.96+0000 [APP/PROC/WEB/0] ERR npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

My question is now what options do I have?

  1. Do I have to use an older version of @sap/cds in my application?
  2. Can I update the Node version used in Cloud Foundry? Is this last option convenient?
yesterday

Hi Isaac,

Hope you are doing well. I am also facing the same issue while starting the service it's crashing. Were you able to resolve the issue. If yes please let me know so I can follow the same footsteps.

Thanks & Regards,

Vicky Parida

Regards, Vicky.

In principle, it's been a long time since I had this problem, and I don't exactly remember everything about my solution back then.

What I am sure of is that I added to my package.json file the lines that Gregor Wolf indicated in his answer below. Namely:

     "engine": {
"node": "^12 || ^14"
},

I don't remember if that was enough or if I did something else.

From the previous fragment, you must adapt it to your circumstance, placing the version of NodeJS that you are using in your development.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK