Skip to Content
Mar 02 at 11:28 AM

Deploying CAP Application to BTP - Socket

279 Views Last edit Mar 02 at 01:04 PM 2 rev

I have a very basic CAP/CDS application that's more or less a single entity. I am able to test locally using sqlite3 and also hybrid. While testing the hybrid application I've logged into the Hana cockpit and saw my models and data inside the HDI container they were deployed too. I am working locally on my computer, not BAS.

I would now like to deploy this application to BTP so that it will run in CF. I start this process by using the `cds` tool to prepare the mta.yaml and `mbt` to create the MTA archive to deploy to BTP. However, I am not able to properly deploy the archive to BTP. I have using `cds` prepared the project for deployment to a productive environment with `cds add hana`.

Executing task "deploy" on application "test-cds-db-deployer"...
Execution of task "deploy" on application "test-cds-db-deployer" failed.
Use "cf dmol -i <hash>" to download the logs of the process.

I see two applications, the server and deployer. There is an HDI container created. Whenever I use the server application to browse the data I receive 503 service unavailable. Upon inspecting the dmol logs:

#2.0#2023 03 02
[PollExecuteTaskStatusExecution] [test-cds-db-deployer] 9008e928-1254-47f1-8830-f00807ece662 [Thu Mar 02 10:22:12 UTC 2023] Deployment to container 092D3FBD70944432A17CF0D5D31E5C1A failed - error: Connection failed (RTE:[8901     3] Socket closed by peer { ->} ( -> [Deployment ID: none]. (STDERR, APP/TASK/deploy)#<br>

This is more or less repeated several times throughout the log. I'm not sure what to actually do from here. While I've seen SSH tunnel suggested, I don't understand how I would setup a tunnel to an application that doesn't exist on CF yet. The deploy application fails to start. Is there somebody that can offer advice?

EDIT: I've also seen advice on whitelisting the IP address I'm deploying from. My IP is whitelisted but the result is the same.