Troubleshooting
Find here common solutions to frequently occurring issues.
Setup
Check the Node.js version
Make sure you run the latest long-term support (LTS) version of Node.js with an even number like 20
. Refrain from using odd versions, for which some modules with native parts will have no support and thus might even fail to install. Check version with:
node -v
Should you see an error like "Node.js v1... or higher is required for @sap/cds ...
." on server startup, upgrade to the indicated version at the minimum, or even better, the most recent LTS version. For Cloud Foundry, use the engines
field in package.json.
Learn more about the release schedule of Node.js.Learn about ways to install Node.js.
Check access permissions on macOS or Linux
In case you get error messages like Error: EACCES: permission denied, mkdir '/usr/local/...'
when installing a global module like @sap/cds-dk
, configure npm
to use a different directory for global modules:
mkdir ~/.npm-global ; npm set prefix '~/.npm-global'
export PATH=~/.npm-global/bin:$PATH
Also add the last line to your user profile, for example, ~/.profile
, so that future shell sessions have changed PATH
as well.
Learn more about other ways to handle this error.
Check if your environment variables are properly set on Windows
Global npm installations are stored in a user-specific directory on your machine. On Windows, this directory usually is:
C:\Users\<your-username>\AppData\Roaming\npm
Make sure that your PATH
-environment variable contains this path.
In addition, set the variable NODE_PATH
to:
C:\Users\<your-username>\AppData\Roaming\npm\node_modules
.
How Do I Consume a New Version of CDS?
Design time tools like
cds init
:Install and update
@sap/cds-dk
globally usingnpm i -g @sap/cds-dk
.Node.js runtime:
Maintain the version of
@sap/cds
in the top-level package.json of your application in thedependencies
section.Learn more about recommendations on how to manage Node.js dependencies.
CAP Java SDK:
Maintain the version in the pom.xml of your Java module, which is located in the root folder. In this file, modify the property
cds.services.version
.
Node.js
How can I start Node.js apps on different ports?
By default, Node.js apps started with cds run
or cds watch
use port 4004, which might be occupied if other app instances are still running. In this case, cds watch
now asks you if it should pick a different port.
$ cds watch
...
[cds] - serving CatalogService ...
EADDRINUSE - port 4004 is already in use. Restart with new port? (Y/n)
> y
restart
...
[cds] - server listening on { url: 'http://localhost:4005' }
Ports can be explicitly set with the PORT
environment variable or the --port
argument. See cds help run
for more.
Why do I lose registered event handlers?
Node.js allows extending existing services, for example in mashup scenarios. This is commonly done on bootstrap time in cds.on('served', ...)
handlers like so:
DO:
cds.on('served', ()=>{
const { db } = cds.services
db.on('before',(req)=> console.log(req.event, req.path))
})
It is important to note that by Node.js emit
are synchronous operations, so, avoid any await
operations in there, as that might lead to race conditions. In particular, when registering additional event handlers with a service, as shown in the snippet above, this could lead to very hard to detect and resolve issues with handler registrations. So, for example, don't do this:
DON'T:
cds.on('served', async ()=>{
const db = await cds.connect.to('db') // DANGER: will cause race condition !!!
db.on('before',(req)=> console.log(req.event, req.path))
})
My app isn't showing up in Dynatrace
Make sure that:
- Your app's start script is
cds-serve
instead ofnpx cds run
. - You have the dependency
@dynatrace/oneagent-sdk
in your package.json.
Why are requests occasionally rejected with "Acquiring client from pool timed out" or "ResourceRequest timed out"?
This error indicates database client pool settings don't match the application's requirements. There are two possible root causes:
Explanation | |
---|---|
Root Cause 1 | The maximum number of database clients in the pool is reached and additional requests wait too long for the next client. |
Root Cause 2 | The creation of a new connection to the database takes too long. |
Solution | Adapt max or acquireTimeoutMillis with more appropriate values, according to the documentation. |
Always make sure that database transactions are either committed or rolled back. This can work in two ways:
- Couple it to your request (this happens automatically): Once the request is succeeded, the database service commits the transaction. If there was an error in one of the handlers, the database service performs a rollback.
- For manual transactions (for example, by writing
const tx = cds.tx()
), you need to perform the commit/rollback yourself:await tx.commit()
/await tx.rollback()
.
If you're using @sap/hana-client, make sure to adjust the environment variable HDB_NODEJS_THREADPOOL_SIZE
which specifies the amount of workers that concurrently execute asynchronous method calls for different connections.
Why are requests rejected with status 502
and do not seem to reach the application?
If you have long running requests, you may experience intermittent 502
errors that are characterized by being logged by the platform's router, but not by your CAP application. In most cases, this behavior is caused by the server having just closed the TCP connection without waiting for acknowledgement, so that the platform's load balancer still considers it open and uses it to forward the request. The issue is discussed in detail in this blog post by Adam Crowder. One solution is to increase the server's keepAliveTimeout
to above that of the respective load balancer.
The following example shows how to set keepAliveTimeout
on the http.Server created by CAP.
const cds = require('@sap/cds')
cds.once('listening', ({ server }) => {
server.keepAliveTimeout = 3 * 60 * 1000 // > 3 mins
})
module.exports = cds.server
Watch the video to learn more about Best Practices for CAP Node.js Apps.
Why are long running requests rejected with status 504
after 30 seconds even though the application continues processing the request?
Explanation | |
---|---|
Root Cause | Most probably, this error is caused by the destination timeout of the App Router. |
Solution | Set your own timeout configuration of @sap/approuter. |
Why does the server crash with No service definition found for <srv-name>
?
Explanation | |
---|---|
Root Cause | Most probably, the service name in the requires section does not match the served service definition. |
Solution | Set the .service property in the respective requires entry. See cds.connect() for more details. |
Why is the destination of a remote service not correctly retrieved by SAP Cloud SDK and returns a status code 404?
Explanation | |
---|---|
Root Cause | In case the application has a service binding with the same name as the requested destination, the SAP Cloud SDK prioritized the service binding. This service of course does have different endpoints than the originally targeted remote service. For more information, please refer to the SAP Cloud SDK documentation. |
Solution | Use different names for the service binding and the destination. |
Why does my remote service call not work?
Explanation | |
---|---|
Root Cause | The destination, the remote system or the request details are not configured correctly. |
Solution | To further troubleshoot the root cause, you can enable logging with environment variables SAP_CLOUD_SDK_LOG_LEVEL=silly and DEBUG=remote . |
TypeScript
Type definitions for @sap/cds
not found or incomplete
Explanation | |
---|---|
Root Cause 1 | The package @cap-js/cds-typer is not installed. |
Solution 1 | Install the package as a dev dependency. |
Root Cause 2 | Symlink is missing. |
Solution 2 | Try npm rebuild or add @cap-js/cds-types in your tsconfig.json. |
Install package as dev dependency
The type definitions for @sap/cds
are maintained in a separate package @cap-js/cds-types
and have to be explicitly installed as a dev dependency. This can be done by adding the typescript
facet:
cds add typescript
npm i -D @cap-js/cds-types
Fix missing symlink
Installing @cap-js/cds-types
leverages VS Code's automatic type resolution mechanism by symlinking the package in node_modules/@types/sap__cds
in a postinstall script. If you find that this symlink is missing, try npm rebuild
to trigger the postinstall script again.
If the symlink still does not persist, you can explicitly point the type resolution mechanism to @cap-js/cds-types
in your tsconfig.json:
{
"compilerOptions": {
"types": ["@cap-js/cds-types"],
}
}
If you find that the types are still incomplete, open a bug report in the @cap-js/cds-types
repository.
Java
How can I make sure that a user passes all authorization checks?
A new option privilegedUser()
can be leveraged when defining your own RequestContext
. Adding this introduces a user, which passes all authorization restrictions. This is useful for scenarios, where a restricted service should be called through the local service consumption API either in a request thread regardless of the original user's authorizations or in a background thread.
Why do I get a "User should not exist" error during build time?
Explanation | |
---|---|
Root Cause | You've explicitly configured a mock user with a name that is already used by a preconfigured mock user. |
Solution | Rename the mock user and build your project again. |
Why do I get an "Error on server start"?
There could be a mismatch between your locally installed Node.js version and the version that is used by the cds-maven-plugin
. The result is an error similar to the following:
❗️ ERROR on server start: ❗️
Error: The module '/home/user/....node'
was compiled against a different Node.js version using
To fix this, either switch the Node.js version using a Node version manager, or add the Node version to your pom.xml as follows:
<properties>
<!-- ... -->
<cds.install-node.nodeVersion>v20.11.0</cds.install-node.nodeVersion>
<!-- ... -->
</properties>
Learn more about the install-node goal.
How can I expose custom REST APIs with CAP?
From time to time you might want to expose additional REST APIs in your CAP application, that aren't covered through CAPs existing protocol adapters (for example, OData V4). A common example for this might be a CSV file upload or another type of custom REST endpoint. In that case, you can leverage the powerful capabilities of Spring Web MVC, by implementing your own RestController. From within your RestController implementation, you can fully leverage all CAP Java APIs. Most commonly you'll be interacting with your services and the database through the local service consumption API. To learn more about Spring Web MVC, see the Spring docs, Spring Boot docs, and this tutorial.
How can I build a CAP Java application without SQL database?
The project skeleton generated by the CAP Java archetype adds the relevant Spring Boot and CAP Java dependencies, so that SQL database is supported by default. However, using an SQL database in CAP Java is fully optional. You can also develop CAP applications that don't use persistence at all. To remove the SQL database support, you need to exclude the JDBC-related dependencies of Spring Boot and CAP Java. This means that CAP Java won't create a Persistence Service instance.
TIP
Keep in mind, that the default event handlers of Application Services delegate to the Persistence Service. You need to implement your own custom handlers in case you remove the SQL database support.
You can exclude those dependencies from the cds-starter-spring-boot
dependency in the srv/pom.xml
:
<dependency>
<groupId>com.sap.cds</groupId>
<artifactId>cds-starter-spring-boot</artifactId>
<exclusions>
<exclusion>
<groupId>com.sap.cds</groupId>
<artifactId>cds-feature-jdbc</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</exclusion>
</exclusions>
</dependency>
In addition you might want to remove the H2 dependency, which is included in the srv/pom.xml
by default as well.
If you don't want to exclude dependencies completely, but make sure that an in-memory H2 database isn't used, you can disable Spring Boot's DataSource
auto-configuration, by annotating the Application.java
class with @SpringBootApplication(exclude = org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration.class)
. In that mode CAP Java however can still react on explicit data source configurations or database bindings.
What to Do About Maven-Related Errors in Eclipse's Problems View?
- In Problems view, execute Quick fix from the context menu if available. If Eclipse asks you to install additional Maven Eclipse plug-ins to overcome the error, do so.
- Errors like 'Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:exec-maven-plugin) can be ignored. Do so in Problems view > Quick fix context menu > Mark goal as ignored in Eclipse preferences.
- In case, there are still errors in the project, use Maven > Update Project... from the project's context menu.
OData
How Do I Generate an OData Response in Node.js for Error 404?
If your application(s) endpoints are served with OData and you want to change the standard HTML response to an OData response, adapt the following snippet to your needs and add it in your custom server.js file.
let app
cds.on('bootstrap', a => {
app = a
})
cds.on('served', () => {
app.use((req, res, next) => {
// > unhandled request
res.status(404).json({ message: 'Not Found' })
})
})
Why do some requests fail if I set @odata.draft.enabled
on my entity?
The annotation @odata.draft.enabled
is very specific to SAP Fiori elements, only some requests are allowed. For example it's forbidden to freely add IsActiveEntity
to $filter
, $orderby
and other query options. The technical reason for that is that active instances and drafts are stored in two different database tables. Mixing them together is not trivial, therefore only some special cases are supported.
SQLite
How Do I Install SQLite on Windows?
From the SQLite page, download the precompiled binaries for Windows
sqlite-tools-win*.zip
.Create a folder C:\sqlite and unzip the downloaded file in this folder to get the file
sqlite3.exe
.Start using SQLite directly by opening
sqlite3.exe
from the folder sqlite or from the command line window opened in C:\sqlite.Optional: Add C:\sqlite in your PATH environment variable. As soon as the configuration is active, you can start using SQLite from every location on your Windows installation.
Use the command sqlite3 to connect to the in-memory database:
C:\sqlite>sqlite3
SQLite version ...
Enter ".help" for instructions
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite>
If you want to test further, use .help command to see all available commands in sqlite3.
In case you want a visual interface tool to work with SQLite, you can use SQLTools. It's available as an extension for VS Code and integrated in SAP Business Application Studio.
SAP HANA
How to Get an SAP HANA Cloud Instance for SAP BTP, Cloud Foundry environment?
To configure this service in the SAP BPT cockpit on trial, refer to the SAP HANA Cloud Onboarding Guide. See SAP HANA Cloud documentation or visit the SAP HANA Cloud community for more details.
TIP
On trial, your SAP HANA Cloud instance will be automatically stopped overnight, according to the server region time zone. That means you need to restart your instance every day before you start working with your trial.
Learn more about SAP HANA Cloud trying out tutorials in the Tutorial Navigator.
I removed sample data (.csv file) from my project. Still, the data is deployed and overwrites existing data.
Explanation | |
---|---|
Root Cause | SAP HANA still claims exclusive ownership of the data that was once deployed through hdbtabledata artifacts, even though the CSV files are now deleted in your project. |
Solution | Add an undeploy.json file to the root of your database module (the db folder by default). This file defines the files and data to be deleted. See section HDI Delta Deployment and Undeploy Allow List for more details. |
TIP
If you want to keep the data from .csv files and data you've already added, see SAP Note 2922271 for more details.
You can apply this solution also when using the cds-mtxs
library. You can either set the options via the environment variable HDI_DEPLOY_OPTIONS
, the CDS configuration or you can add them to the model update request as hdi
parameter:
CDS configuration for Deployment Service
"cds.xt.DeploymentService": {
"hdi": {
"deploy": {
"undeploy": [
"src/gen/data/my.bookshop-Books.hdbtabledata"
],
"path_parameter": {
"src/gen/data/my.bookshop-Books.hdbtabledata:skip_data_deletion": "true"
}
},
...
}
}
Options in Saas Provisioning Service upgrade API call payload
{
"tenants": ["*"],
"_": {
"hdi": {
"deploy": {
"undeploy": [
"src/gen/data/my.bookshop-Books.hdbtabledata"
],
"path_parameter": {
"src/gen/data/my.bookshop-Books.hdbtabledata:skip_data_deletion": "true"
}
}
}
}
}
How Do I Resolve Service Creation Errors?
- If there's more than one SAP HANA database mapped to your Cloud Foundry space, service creation fails. In this case, you need to specify the database:
cf create-service [...] -c "{\"database_id\":\"XXX\" }"
whereXXX
is the ID of the database instance. - On trial landscapes, you need to use
hanatrial
instead ofhana
as service type:cf create-service hanatrial [...]
- When using the
cds-mtx
library with more than one SAP HANA database mapped to your Cloud Foundry space, you can add the service creation parameters via the environment variableCDS_MTX_PROVISIONING_CONTAINER="{\"provisioning_parameters\":{\"database_id\":\"XXX\"}}"
, whereXXX
represents the ID of the database instance. You can also pass the ID of the database with the subscription request.
How Do I Resolve Deployment Errors?
Deployment fails — Cyclic dependencies found or Cycle between files
Explanation | |
---|---|
Root Cause | This is a known issue with older HDI/HANA versions, which are offered on trial landscapes. |
Solution | Apply the workaround of adding --treat-unmodified-as-modified as argument to the hdi-deploy command in db/package.json. This option redeploys files, even if they haven't changed. If you're the owner of the SAP HANA installation, ask for an upgrade of the SAP HANA instance. |
Deployment fails — Version incompatibility
Explanation | |
---|---|
Root Cause | An error like Version incompatibility for the ... build plugin: "2.0.x" (installed) is incompatible with "2.0.y" (requested) indicates that your project demands a higher version of SAP HANA than what is available in your org/space on SAP BTP, Cloud Foundry environment. The error might not occur on other landscapes for the same project. |
Solution | Lower the version in file db/src/.hdiconfig to the one given in the error message. If you're the owner of the SAP HANA installation, ask for an upgrade of the SAP HANA instance. |
Deployment fails — Cannot create certificate store
Explanation | |
---|---|
Root Cause | If you deploy to SAP HANA from a local Windows machine, this error might occur if the SAP CommonCryptoLib isn't installed on this machine. |
Solution | To install it, follow these instructions. If this doesn't solve the problem, also set the environment variables as described here. |
Deployment fails —
- Failed to get connection for database
- Connection failed (RTE:[300015] SSL certificate validation failed
- Cannot create SSL engine: Received invalid SSL Record Header
Explanation | |
---|---|
Root Cause | Your SAP HANA Cloud instance is stopped. |
Solution | Start your SAP HANA Cloud instance. |
Deployment fails — SSL certificate validation failed: error code: 337047686
Explanation | |
---|---|
Root Cause | The @sap/hana-client can't verify the certificate because of missing system toolchain dependencies. |
Solution | Make sure ca-certificates is installed on your Docker container. |
Deployment fails — Cannot create SSL engine: Received invalid SSL Record Header
Explanation | |
---|---|
Root Cause | Your SAP HANA Cloud instance is stopped. |
Solution | Start your SAP HANA Cloud instance. |
Deployment fails — Error: HDI make failed
Explanation | |
---|---|
Root Cause | Your configuration isn't properly set. |
Solution | Configure your project as described in Using Databases. |
Deployment fails — Connection failed (RTE:[89008] Socket closed by peer
Explanation | |
---|---|
Root Cause | Your IP isn't part of the filtering you configured when you created an SAP HANA Cloud instance. This error can also happen if you exceed the maximum number of simultaneous connections to SAP HANA Cloud (1000). |
Solution | Configure your SAP HANA Cloud instance to accept your IP. If configured correctly, check if the number of database connections are exceeded. Make sure your pool configuration does not allow more than 1000 connections. |
Deployment fails — In USING declarations only main artifacts can be accessed, not sub artifacts of <name>
This error occurs if all of the following applies:
- You added native SAP HANA objects to your CAP model.
- You used deploy format
hdbcds
. - You didn't use the default naming mode
plain
.
Explanation | |
---|---|
Root Cause | The name/prefix of the native SAP HANA object collides with a name/prefix in the CAP CDS model. |
Solution | Change the name of the native SAP HANA object so that it doesn't start with the name given in the error message and doesn't start with any other prefix that occurs in the CAP CDS model. If you can't change the name of the SAP HANA object, because it already exists, define a synonym for the object. The name of the synonym must follow the naming rule to avoid collisions (root cause). |
How do I pass additional HDI deployment options to the multitenancy tenant deployment of the cds-mtx
library
You can add a subset of the HDI deploy options using the environment variable HDI_DEPLOY_OPTIONS
.\
When making use of these parameters, for example exclude_filter
, please always check if the parameters are consistent with your CDS build configuration to avoid deployment problems. For example, make sure to not exclude generated SAP HANA tables that are needed by generated views.
How can a table function access the logged in user?
The cds runtime sets the session variable APPLICATIONUSER
. This should always reflect the logged in user.
Do not use a XS_
prefix.
MTXS
I get a 401 error when logging in to MTXS through App Router
See How to configure your App Router to verify your setup. Also check the documentation about cds login
.
When running a tenant upgrade, I get the message 'Extensions exist, but extensibility is disabled.'
This message indicates that extensions exist, but the application is not configured for extensibility. To avoid accidental data loss by removing existing extensions from the database, the upgrade is blocked in that case. Please check the configuration for extensibility.
DANGER
If data loss is intended, you can disable the check by adding cds.requires.cds.xt.DeploymentService.upgrade.skipExtensionCheck = true
to the configuration.
MTX (legacy)
This refers to potential problems with the deprecated @sap/cds-mtx package.
How do I set up MTX with App Router?
See Deploy to Cloud Foundry for the basic project and deployment setup.
I get a 401 error when logging in to MTX through App Router
See App Router configuration to ensure a correct handling of authentication by both @sap/approuter
and @sap/cds-mtx
.
When logging in, remember to specify the same subdomain you used to get a passcode. Normally this will be the subdomain of the customer subaccount:
cds login … -s <subdomain>
Alternatively, without login:
cds extend … -s <subdomain>
I get errors with response code 429 from the service-manager service when subscribing a tenant
You can reduce the number of request by adapting the configuration of the @sap/instance-manager
library. See also @sap/instance-manager
documentation.
"cds": {
"mtx": {
"provisioning": {
"instancemanageroptions": {
"polling_interval_millis": 3000
}
}
}
}
I get errors with response code 429 from the service-manager service when running a tenant upgrade for all tenants
You can disable the database clustering for the update.
"cds": {
"mtx": {
"jobs": {
"clusterbydb": false
}
}
}
This setting requires at least @sap/cds-mtx@2.6.2
.
MTA
Why Does My MTA Build Fail?
- Make sure to use the latest version of the Cloud MTA Build Tool (MBT).
- Consult the Cloud MTA Build Tool documentation for further information, for example, on the available tool options.
How Can I Define the Build Order Between MTA Modules?
By default the Cloud MTA Build Tool executes module builds in parallel. If you want to enforce a specific build order, for example, because one module build relies on the outcome of another one, check the Configuring build order section in the tool documentation.
How Do I Undeploy an MTA?
cf undeploy <mta-id>
deletes an MTA (use cf mtas
to find the MTA ID).
Use the optional --delete-services
parameter to also wipe service instances.
Caution: This deletes the HDI containers with the application data.
MTA Build Complains About package-lock.json
If the MTA build fails with The 'npm ci' command can only install with an existing package-lock.json
, this means that such a file is missing in your project.
- Check with
cds --version
to have@sap/cds
>= 5.7.0. - Create the package-lock.json file with a regular
npm update
command. - If the file was not created, make sure to enable it with
npm config set package-lock true
and repeat the previous command. - package-lock.json should also be added to version control, so make sure that .gitignore does not contain it.
The purpose of package-lock.json is to pin your project's dependencies to allow for reproducible builds. Learn more about dependency management in Node.js.
How Can I Reduce the MTA Archive Size During Development?
You can reduce MTA archive sizes, and thereby speedup deployments, by omitting node_module
folders.
First, add a file less.mtaext
with the following content:
_schema-version: '3.1'
ID: bookshop-small
extends: capire.bookshop
modules:
- name: bookshop-srv
build-parameters:
ignore: ["node_modules/"]
Now you can build the archive with:
mbt build -t gen --mtar mta.tar -e less.mtaext
WARNING
This approach is only recommended
- For test deployments during development. For production deployments, self-contained archives ar preferrable.
- If all your dependencies are available in public registries like npmjs.org or Maven Central. Dependencies from corporate registries are not resolvable in this mode.
CAP on Cloud Foundry
How Do I Get Started with SAP Business Technology Platform, Cloud Foundry environment?
For a start, create your Trial Account.
How Do I Resolve Errors with cf
Executable?
Installation fails — mkdir ... The system cannot find the path specified
This is a known issue on Windows. The fix is to set the HOMEDRIVE
environment variable to C:
. In any cmd
shell session, you can do so with SET HOMEDRIVE=C:
Also, make sure to persist the variable for future sessions in the system preferences. See How do I set my system variables in Windows for more details.
cf
commands fail — Error writing config
This is the same issue as with the installation error above.
Why Can't My xs-security.json File Be Used to Create an XSUAA Service Instance?
Explanation | |
---|---|
Root Cause | Your file isn't UTF-8 encoded. If you executed cds compile with Windows PowerShell, the encoding of your xs-security.json file is wrong. |
Solution | Make sure, you execute cds compile in a command prompt that encodes in UTF-8 when piping output into a file. |
You can find related information on Stack Overflow.
How Can I Connect to a Backing Service Container like SAP HANA from My Local Machine?
Depending on, whether the container host is reachable and whether there's a proxy between your machine and the cloud, one of the following options applies:
CF SSH
The second most convenient way is the
cf ssh
capability of Cloud Foundry CLI. You can open an SSH tunnel to the target Cloud Foundry container, if these prerequisites are met:- There's no HTTP proxy in the way. Those only let HTTP traffic through.
- SSH access is enabled for the CF landscape and your space (in Canary this is true, otherwise check with
cf ssh-enabled
).
Use it like this:
shcf ssh <app> -L localhost:<LocalPort>:<RemoteIP>:<RemotePort>
where
<app>
has to be a running application that is bound to the service.Example:
Connect to a SAP HANA service running on remote host 10.10.10.10, port 30010.
shcf ssh <app> -L localhost:30010:10.10.10.10:30010
From then on, use
localhost:30010
instead of the remote address.Chisel
In all other cases, for example, if there's an HTTP proxy between you and the cloud, you can resort to a TCP proxy tool, called Chisel. This also applies if the target host isn't reachable on a network level. You need to install Chisel in your target space and that will tunnel TCP traffic over HTTP from your local host to the target (and vice versa).
Find step-by-step instructions here. For example, to connect to an SAP HANA service running on remote host 10.10.10.10, port 30010:
shbin/chisel_... client --auth secrets https://<url_to_chisel_server_app> localhost:30010:10.10.10.10:30010
From then on, use
localhost:30010
instead of the remote address.
Aborted Deployment With the Create-Service-Push Plugin
If you're using manifest.yml features that are part of the new Cloud Foundry API, for example, the buildpacks
property, the cf create-service-push
command will abort after service creation without pushing the applications to Cloud Foundry.
Use cf create-service-push --push-as-subprocess
to execute cf push
in a sub-process.
Deployment Crashes With "No space left on device" Error
If on deployment to Cloud Foundry, a module crashes with the error message Cannot mkdir: No space left on device
then the solution is to adjust the space available to that module in the mta.yaml
file. Adjust the disk-quota
parameter.
parameters:
disk-quota: 512M
memory: 256M
Learn more about this error in KBA 3310683
How Can I Get Logs From My Application in Cloud Foundry?
The SAP BTP cockpit is not meant to analyze a huge amount of logs. You should use the Cloud Foundry CLI.
cf logs <appname> --recent
TIP
If you omit the option --recent
, you can run this command in parallel to your deployment and see the logs as they come in.
CAP on Kyma
Pack Command Fails with Error package.json and package-lock.json aren't in sync
To fix this error, run npm i --package-lock-only
to update your package-lock.json
file and run the pack command again.
Note: After updating the package-lock.json the specific dependency versions would change, go through the changes and verify them.
TIP
For SAP HANA deployment errors see The HANA section.
CAP on Windows
Please note that Git Bash on Windows, despite offering a Unix-like environment, may encounter interoperability issues with specific scripts or tools due to its hybrid nature between Windows and Unix systems. When using Windows, we recommend testing and verifying all functionalities in the native Windows Command Prompt (cmd.exe) or PowerShell for optimal interoperability. Otherwise, problems can occur when building the mtxs extension on Windows, locally, or in the cloud.