cancel
Showing results for 
Search instead for 
Did you mean: 

SAP BTP CAP app Deployment to CF failed (Error: some instances have crashed)

harianantha
Participant
0 Kudos

Hello Community,

I've created a simple CAP project by using BAS and when I try to deploy it to Cloud Foundry, getting below error.

Error starting application "testdemocap-srv": Some instances have crashed. Check the logs of your application for more information.
Download the application logs via the dmol command and check them for more information.
Here are the Log Details of the application, as you can see it is CRASHED....

Here is package.json

{
"name": "testdemocap",
"version": "1.0.0",
"description": "A simple CAP project.",
"repository": "<Add your repository here>",
"license": "UNLICENSED",
"private": true,
"engines": {
"node": "^18"
},
"dependencies": {
"@sap/cds": "^7.2.0",
"@sap/cds-hana": "^2.0.0",
"express": "^4"
},
"devDependencies": {
"@cap-js/sqlite": "^1",
"@sap/cds-dk": "^7.2.0"
},
"scripts": {
"start": "cds-serve"
},
"cds": {
"requires": {
"[production]": {
"db": "hana"
}
}
}
}

Here is the mta.yaml

_schema-version: '3.1'
ID: testdemocap
version: 1.0.0
description: "A simple CAP project."
parameters:
enable-parallel-deployments: true
build-parameters:
before-all:
- builder: custom
commands:
- npx cds build --production
modules:
- name: testdemocap-srv
type: nodejs
path: gen/srv
parameters:
buildpack: nodejs_buildpack
build-parameters:
builder: npm
provides:
- name: srv-api # required by consumers of CAP services (e.g. approuter)
properties:
srv-url: ${default-url}
requires:
- name: testdemocap-db
- name: testdemocap-db-deployer
type: hdb
path: gen/db
parameters:
buildpack: nodejs_buildpack
requires:
- name: testdemocap-db
resources:
- name: testdemocap-db
type: com.sap.xs.hdi-container
parameters:
service: hana
service-plan: hdi-shared

I've seen same issues reported in the community before, but I'm unable to resolve it with the given best answer. Here is one such same question.

Could anyone please help here? Thanks in advance..

Accepted Solutions (0)

Answers (3)

Answers (3)

Dinu
Contributor
0 Kudos

There were issues with the infrastructure yesterday. Probably the issues you faced were because of it.

harianantha
Participant
0 Kudos

Hi dinu.pavithran.1

Thanks for your reply.

I thought of same, but it's been 3 days still we're facing same issue. Any Idea?

Shishir_P
Explorer
0 Kudos

Harikrishna,

Did you manage to resolve this issue? If yes, can you please share how you managed to resolve this?


Regards,

Shishir. P

cguttikonda24
Participant
0 Kudos

Hi Hari,

For the latest error, check if you have enabled all IPs for the Hana DB from the cockpit.

If it is set to specific ID's, change the setting and try to deploy again.

martinstenzig
Contributor
0 Kudos

run the following command line command and have a look why it crashed `cf logs testdemocap-srv --recent`

harianantha
Participant
0 Kudos

Hi martin.stenzig3 ,

Thanks for your reply.

I've executed above mentioned command, I found below errors.

Then I did 'npm i passport' and tried deploying it again. This time I got different error (service unavailable)(see below) unlike previous one (some instances crashed)

martinstenzig
Contributor
0 Kudos

just run `cds add xsuaa --for production` and that should take care of it

harianantha
Participant
0 Kudos

Hi martin.stenzig3 ,

Executed this command "cds add xsuaa --for production" & getting below error. Any Idea? Thank you!!

martinstenzig
Contributor
0 Kudos

The only idea I have is that you are missing the Authorization and Trust Management Service (xsuaa) entitlement in your sub account. Run the following command `cf marketplace` and see if you have a line that says ` xsuaa space, application, broker, apiaccess ` ?

As an alternative you can also go into the cockpit and check the entitlement menu item in the sub account.

harianantha
Participant
0 Kudos

Hi martin.stenzig3 ,

I've checked 'xsuaa' entitlement was present in the sub account. All of a sudden we're facing this issue, previously I used to create and deploy CAPM apps seamlessly. Not sure is this an issue from SAP due to upgrade in BTP. Thanks for your help.

martinstenzig
Contributor
0 Kudos

try a complete removal of your mta or service with ie `cf undeploy [mta-id] --delete-service-keys --delete-services` and try again. Other than that I think you might have to open a ticket with SAP.