cancel
Showing results for 
Search instead for 
Did you mean: 

Error : Deploy CAP with SAP HANA Cloud project as MTA

LuizSouza
Participant
0 Kudos
2,342

Dear SAP,

After finish the "Combine CAP with SAP HANA Cloud to Create Full-Stack Applications" mission I decided to try deploy the objects into my cf . I am following the "Deploy CAP with SAP HANA Cloud project as MTA" steps.

I am facing the error below:

Updating service "MyHANAApp-auth" failed: Service broker error: Service broker xsuaa failed with: Could not find xsapp entry for MyHANAApp-07a3846btrial-dev!t194483
Error uploading application "MyHANAApp". Status: FAILED, Description: The app upload is invalid: Invalid zip archive (zipfile is empty).<br>
Have you seen this error before ?
This is the complete Log:

cf deploy mta_archives/MyHANAApp_1.0.0.mtar -f

Deploying multi-target app archive mta_archives/MyHANAApp_1.0.0.mtar in org 07a...btrial / space dev as nome@email.com...

Executing action 'abort' on operation 150af29b-71cc-11ee-8ea4-.......

OK

Previously uploaded file MyHANAApp_1.0.0.mtar with same digest detected, new upload will be skipped.

Operation ID: f6b2e3dc-71cc-11ee-b7ad-....

Deploying in org "...trial" and space "dev"

Detected MTA schema version: "3"

Detected deployed MTA with ID "MyHANAApp" and version "1.0.0"

Detected new MTA version: "1.0.0"

Deployed MTA version: "1.0.0"

Processing service "MyHANAApp-auth"...

Setting service "MyHANAApp-auth" parameters from "xs-security.json"

Updating service "MyHANAApp-auth"...

Processing service "MyHANAApp-db"...

Updating service "MyHANAApp-auth" failed: Service broker error: Service broker xsuaa failed with: Could not find xsapp entry for MyHANAApp-07a3846btrial-dev!t194483

1 of 1 done

Updating application "MyHANAApp-srv"...

Application "MyHANAApp-srv" attributes are not modified and will not be updated

Updating application "MyHANAApp-db-deployer"...

Application "MyHANAApp-db-deployer" attributes are not modified and will not be updated

Updating application "MyHANAApp"...

Application "MyHANAApp" attributes are not modified and will not be updated

Unbinding service instance "MyHANAApp-db" from application "MyHANAApp-srv"...

Unbinding service instance "MyHANAApp-auth" from application "MyHANAApp-srv"...

Unbinding service instance "MyHANAApp-db" from application "MyHANAApp-db-deployer"...

Unbinding service instance "MyHANAApp-auth" from application "MyHANAApp"...

Binding service instance "MyHANAApp-auth" to application "MyHANAApp-srv"...

Binding service instance "MyHANAApp-db" to application "MyHANAApp-srv"...

Binding service instance "MyHANAApp-db" to application "MyHANAApp-db-deployer"...

Binding service instance "MyHANAApp-auth" to application "MyHANAApp"...

Uploading application "MyHANAApp"...

Uploading application "MyHANAApp-db-deployer"...

Content of application "MyHANAApp-db-deployer" is not changed - upload will be skipped.

Scaling application "MyHANAApp-db-deployer" to "1" instances...

Uploading application "MyHANAApp-srv"...

Executing task "deploy" on application "MyHANAApp-db-deployer"...

Content of application "MyHANAApp-srv" is not changed - upload will be skipped.

Started async upload of application "MyHANAApp"

Stopping application "MyHANAApp-srv"...

Starting application "MyHANAApp-srv"...

Error uploading application "MyHANAApp". Status: FAILED, Description: The app upload is invalid: Invalid zip archive (zipfile is empty).

Error uploading application "MyHANAApp". Status: FAILED, Description: The app upload is invalid: Invalid zip archive (zipfile is empty).

A step of the process has failed. Retrying it may solve the issue.

Proceeding with automatic retry... (3 of 3 attempts left)

Uploading application "MyHANAApp"...

Started async upload of application "MyHANAApp"

Error uploading application "MyHANAApp". Status: FAILED, Description: The app upload is invalid: Invalid zip archive (zipfile is empty).

Error uploading application "MyHANAApp". Status: FAILED, Description: The app upload is invalid: Invalid zip archive (zipfile is empty).

A step of the process has failed. Retrying it may solve the issue.

Proceeding with automatic retry... (2 of 3 attempts left)

Uploading application "MyHANAApp"...

Started async upload of application "MyHANAApp"

Error uploading application "MyHANAApp". Status: FAILED, Description: The app upload is invalid: Invalid zip archive (zipfile is empty).

Error uploading application "MyHANAApp". Status: FAILED, Description: The app upload is invalid: Invalid zip archive (zipfile is empty).

A step of the process has failed. Retrying it may solve the issue.

Proceeding with automatic retry... (1 of 3 attempts left)

Uploading application "MyHANAApp"...

Started async upload of application "MyHANAApp"

Error uploading application "MyHANAApp". Status: FAILED, Description: The app upload is invalid: Invalid zip archive (zipfile is empty).

Error starting application "MyHANAApp-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.

A step of the process has failed. Retrying it may solve the issue.

Error uploading application "MyHANAApp". Status: FAILED, Description: The app upload is invalid: Invalid zip archive (zipfile is empty).

A step of the process has failed. Retrying it may solve the issue.

Process failed.

Use "cf deploy -i f6b2e3dc-71cc-11ee-b7ad-eeee0a8f8030 -a abort" to abort the process.

Use "cf deploy -i f6b2e3dc-71cc-11ee-b7ad-eeee0a8f8030 -a retry" to retry the process.

Use "cf dmol -i f6b2e3dc-71cc-11ee-b7ad-eeee0a8f8030" to download the logs of the process.

Exit error code: 1

* Terminal will be reused by tasks, press any key to close it.

Accepted Solutions (1)

Accepted Solutions (1)

martinstenzig
Contributor

Given that your `MyHANAApp` is just an app router my gutt feeling is that you don't have enough memory assigned.

You can validate this by running the command `cf logs MyHANAApp --recent`. It will probably contain an error saying out of memory.

After that you probably increase the allocated memory to 512MB in the mta.yaml and try it again.

LuizSouza
Participant
0 Kudos

That´s my log :

user: MyHANAApp $ cf logs MyHANAApp --recent

Retrieving logs for app MyHANAApp in org 07a3846btrial / space dev as .....@......com...

2023-10-23T19:52:11.17+0000 [API/0] OUT Added process: "web"

2023-10-23T19:52:11.17+0000 [API/0] OUT Created app with guid 628d0e0f-04d5-42a8-964a-469aaab70aaa

2023-10-23T19:52:11.26+0000 [API/1] OUT Updating process: "web"

2023-10-23T19:52:11.33+0000 [API/25] OUT Scaling process: "web"

2023-10-23T19:52:26.49+0000 [API/8] OUT Uploading app package for app with guid 628d0e0f-04d5-42a8-964a-469aaab70aaa

2023-10-23T19:52:26.65+0000 [API/34] OUT Updated app with guid 628d0e0f-04d5-42a8-964a-469aaab70aaa ({"environment_variables"=>"[PRIVATE DATA HIDDEN]"})

2023-10-23T19:52:37.81+0000 [API/21] OUT Uploading app package for app with guid 628d0e0f-04d5-42a8-964a-469aaab70aaa

2023-10-23T19:52:47.11+0000 [API/4] OUT Uploading app package for app with guid 628d0e0f-04d5-42a8-964a-469aaab70aaa

2023-10-23T19:52:59.38+0000 [API/17] OUT Uploading app package for app with guid 628d0e0f-04d5-42a8-964a-469aaab70aaa

martinstenzig
Contributor
0 Kudos

mhh, that only looks like part of it. Try this:

1. Open one terminal and execute `cf logs MyHANAApp` (without the recent option)

2. Run your deployment again and keep an eye on the CF logs output window. You should see an error message coming up in there.

LuizSouza
Participant

The problem 1 Is solved!

Updating service "MyHANAApp-auth" failed: Service broker error: Service broker xsuaa failed with: Could not find xsapp entry for MyHANAApp-07a3846btrial-dev!t194483

I needed to delete the service auth that I have created before and let the deploy generate by itself.

The problem 2 is open yet:


I could see in the log the following lines :

npm ERR! path /home/vcap/app/package.json
npm ERR! syscall open
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! enoent

npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent ENOENT: no such file or directory, open '/home/vcap/app/package.json'
npm ERR! A complete log of this run can be found in: /home/vcap/app/.npm/_logs/2023-10-23T20_39_27_816Z-debug-0.log

martinstenzig
Contributor
0 Kudos

You are missing the package.json file including the approuter reference in the [cap root]/app directory. Did you put it into another folder?

LuizSouza
Participant
0 Kudos

The Application: MyHANAApp is started now, but when I click on it. A error "404 Not Found: Requested route ('07a3846btrial-dev-myhanaapp-srv.cfapps.us10-001.hana.ondemand.com') does not exist" happen into the webbrowser.

martinstenzig
Contributor
0 Kudos

Make sure you have a xs-app.json file and it has the correct content.

LuizSouza
Participant
0 Kudos

Sorry, It seems to be according to the mission:

{

"xsappname": "myhanaapp","tenant-mode": "dedicated", "scopes": [ { "name": "$XSAPPNAME.Admin", "description": "Admin" } ], "attributes": [], "role-templates": [ { "name": "Admin", "description": "generated", "scope-references": [ "$XSAPPNAME.Admin" ], "attribute-references": [] } ], "oauth2-configuration": { "credential-types": [ "binding-secret", "x509" ], "redirect-uris": [ "https://*.applicationstudio.cloud.sap/**", "https://*.hana.ondemand.com/**" ]}
}
martinstenzig
Contributor
0 Kudos

That content should be in the xs-security.json, not in the xs-app.json

LuizSouza
Participant
0 Kudos

martin.stenzig3 thank you for you support!

This is my xs-security.json .

LuizSouza
Participant
0 Kudos

martin.stenzig3 This is my xs-app.json

martinstenzig
Contributor
0 Kudos

Let's try something simple and just add the following to the top of your xs-app.json

  "welcomeFile": "/index.html",
LuizSouza
Participant

@Martin, Thank you!

You are right since the begining. I increase the size to 1024 and works! I have also the calculation View Interaction built.

Thank you so much!

Luiz Souza@

Answers (0)