cancel
Showing results for 
Search instead for 
Did you mean: 

Full-Stack App (SAP HANA Cloud, CAP) error "Requested route .. does not exist"

MatthiasH
Explorer
0 Kudos

I´ve followed the tutorial series Create a Full-Stack App with SAP HANA Cloud, CAP, and SAP Fiori Elements.

I´ve finished all steps up to Deploy Your Application with Access Control step 7 with my trial account.

The app is working fine when I run it in Business Application Studio:

But in the deployment step 7 an error is displayed. Screenshot of my last retry:

Part of the downloaded log:

#2.0#2023 04 24 06:52:17.064#Z#ERROR#com.sap.cloud.lm.sl.xs2.079390d5-e26c-11ed-94fc-eeee0a8c021d.OPERATION.startAppTask#
######org.cloudfoundry.multiapps.controller.persistence.services.ProcessLogger########flowable-async-job-executor-thread-3955###
Exception caught#

org.cloudfoundry.multiapps.common.SLException: A step of the process has failed. Retrying it may solve the issue.
	at org.cloudfoundry.multiapps.controller.process.steps.SyncFlowableStep.executeInternal(SyncFlowableStep.java:77) ~[multiapps-controller-process-1.152.0.jar:?]
	at org.cloudfoundry.multiapps.controller.process.steps.SyncFlowableStep.lambda$execute$0(SyncFlowableStep.java:65) ~[multiapps-controller-process-1.152.0.jar:?]
	at org.cloudfoundry.multiapps.controller.core.util.LoggingUtil.logWithCorrelationId(LoggingUtil.java:14) ~[multiapps-controller-core-1.152.0.jar:?]
	at org.cloudfoundry.multiapps.controller.process.steps.SyncFlowableStep.execute(SyncFlowableStep.java:65) ~[multiapps-controller-process-1.152.0.jar:?]
	at org.flowable.engine.impl.delegate.invocation.JavaDelegateInvocation.invoke(JavaDelegateInvocation.java:35) ~[flowable-engine-6.6.0.jar:6.6.0]
	at org.flowable.engine.impl.delegate.invocation.DelegateInvocation.proceed(DelegateInvocation.java:32) ~[flowable-engine-6.6.0.jar:6.6.0]
	at org.flowable.engine.impl.delegate.invocation.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:26) ~[flowable-engine-6.6.0.jar:6.6.0]
	at org.flowable.engine.impl.bpmn.behavior.ServiceTaskDelegateExpressionActivityBehavior.execute(ServiceTaskDelegateExpressionActivityBehavior.java:157) ~[flowable-engine-6.6.0.jar:6.6.0]
	at org.flowable.engine.impl.agenda.ContinueProcessOperation.executeActivityBehavior(ContinueProcessOperation.java:313) ~[flowable-engine-6.6.0.jar:6.6.0]
	at org.flowable.engine.impl.agenda.ContinueProcessOperation.executeSynchronous(ContinueProcessOperation.java:170) ~[flowable-engine-6.6.0.jar:6.6.0]
	at org.flowable.engine.impl.agenda.ContinueProcessOperation.continueThroughFlowNode(ContinueProcessOperation.java:125) ~[flowable-engine-6.6.0.jar:6.6.0]
	at org.flowable.engine.impl.agenda.ContinueProcessOperation.run(ContinueProcessOperation.java:88) ~[flowable-engine-6.6.0.jar:6.6.0]
	at org.flowable.common.engine.impl.AbstractEngineConfiguration.lambda$new$0(AbstractEngineConfiguration.java:173) ~[flowable-engine-common-6.6.0.jar:6.6.0]
	at org.flowable.engine.impl.interceptor.CommandInvoker.executeOperation(CommandInvoker.java:97) ~[flowable-engine-6.6.0.jar:6.6.0]
	at org.flowable.engine.impl.interceptor.CommandInvoker.executeOperations(CommandInvoker.java:81) ~[flowable-engine-6.6.0.jar:6.6.0]
	at org.flowable.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:64) ~[flowable-engine-6.6.0.jar:6.6.0]
	at org.flowable.engine.impl.interceptor.BpmnOverrideContextInterceptor.execute(BpmnOverrideContextInterceptor.java:26) ~[flowable-engine-6.6.0.jar:6.6.0]
	at org.flowable.common.engine.impl.interceptor.TransactionContextInterceptor.execute(TransactionContextInterceptor.java:53) ~[flowable-engine-common-6.6.0.jar:6.6.0]
	at org.flowable.common.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:83) ~[flowable-engine-common-6.6.0.jar:6.6.0]
	at org.flowable.common.spring.SpringTransactionInterceptor.lambda$execute$0(SpringTransactionInterceptor.java:57) ~[flowable-spring-common-6.6.0.jar:6.6.0]
	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140) [spring-tx-5.3.25.jar:5.3.25]
	at org.flowable.common.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:57) [flowable-spring-common-6.6.0.jar:6.6.0]
	at org.flowable.common.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:30) [flowable-engine-common-6.6.0.jar:6.6.0]
	at org.flowable.common.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:56) [flowable-engine-common-6.6.0.jar:6.6.0]
	at org.flowable.common.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:51) [flowable-engine-common-6.6.0.jar:6.6.0]
	at org.flowable.job.service.impl.asyncexecutor.ExecuteAsyncRunnable.executeJob(ExecuteAsyncRunnable.java:127) [flowable-job-service-6.6.0.jar:6.6.0]
	at org.flowable.job.service.impl.asyncexecutor.ExecuteAsyncRunnable.run(ExecuteAsyncRunnable.java:115) [flowable-job-service-6.6.0.jar:6.6.0]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:?]
	at java.lang.Thread.run(Unknown Source) [?:?]<br>

The app is displayed in my trial subaccount anyway:

But when I start it by clicking on "frontend", this error is displayed in a new tab:

Could someone please help me get the app running?

P.S.: My mta.yaml:

_schema-version: "3.1"
ID: MyHANAApp
description: A simple CAP project.
version: 1.0.0
modules:
- name: MyHANAApp-srv
  type: nodejs
  path: srv
  requires:
  - name: MyHANAApp-db
  - name: uaa_MyHANAApp
  provides:
  - name: srv-api
    properties:
      srv-url: ${default-url}
  parameters:
    host: ${appname}
    buildpack: nodejs_buildpack
  build-parameters:
    ignore: [".env", "./node_modules"]
    builder: npm-ci
- name: MyHANAApp-db-deployer
  type: hdb
  path: db
  requires:
  - name: MyHANAApp-db
    properties:
      TARGET_CONTAINER: ~{hdi-container-name}
  - name: cross-container-service-1
    group: SERVICE_REPLACEMENTS
    properties:
      key: ServiceName_1
      service: ~{the-service-name}
  parameters:
    ignore: [".env", "./node_modules"]
    buildpack: nodejs_buildpack
- name: MyHANAApp-destination-content
  type: com.sap.application.content
  requires:
  - name: MyHANAApp-destination-service
    parameters:
      content-target: true
  - name: MyHANAApp_html_repo_host
    parameters:
      service-key:
        name: MyHANAApp_html_repo_host-key
  - name: uaa_MyHANAApp
    parameters:
      service-key:
        name: uaa_MyHANAApp-key
  parameters:
    content:
      instance:
        destinations:
        - Name: hana_app_MyHANAApp_html_repo_host
          ServiceInstanceName: MyHANAApp-html5-app-host-service
          ServiceKeyName: MyHANAApp_html_repo_host-key
          sap.cloud.service: hana.app
        - Authentication: OAuth2UserTokenExchange
          Name: hana_app_uaa_MyHANAApp
          ServiceInstanceName: MyHANAApp-xsuaa-service
          ServiceKeyName: uaa_MyHANAApp-key
          sap.cloud.service: hana.app
        existing_destinations_policy: ignore
  build-parameters:
    no-source: true
- name: MyHANAApp-app-content
  type: com.sap.application.content
  path: .
  requires:
  - name: MyHANAApp_html_repo_host
    parameters:
      content-target: true
  build-parameters:
    build-result: resources
    requires:
    - artifacts:
      - frontend.zip
      name: frontend
      target-path: resources/
- name: frontend
  type: html5
  path: app/frontend
  build-parameters:
    build-result: dist
    builder: custom
    commands:
    - npm install
    - npm run build:cf
    supported-platforms: []
resources:
- name: MyHANAApp-db
  type: com.sap.xs.hdi-container
  parameters:
    service: hana
    service-plan: hdi-shared
  properties:
    hdi-container-name: ${service-name}
- name: cross-container-service-1
  type: org.cloudfoundry.existing-service
  parameters:
    service-name: MyHANAApp-hdiMyHANAApp-db-deployer-ws-4dj97
  properties:
    the-service-name: ${service-name}
- name: MyHANAApp-destination-service
  type: org.cloudfoundry.managed-service
  parameters:
    config:
      HTML5Runtime_enabled: true
      init_data:
        instance:
          destinations:
          - Authentication: NoAuthentication
            Name: ui5
            ProxyType: Internet
            Type: HTTP
            URL: https://ui5.sap.com
          - Name: hana-app-api
            Authentication: NoAuthentication
            ProxyType: Internet
            HTML5.ForwardAuthToken: true
            HTML5.DynamicDestination: true
            Type: HTTP
            URL: https://${appname}.${default-domain}
          existing_destinations_policy: update
      version: 1.0.0
    service: destination
    service-name: MyHANAApp-destination-service
    service-plan: lite
- name: MyHANAApp_html_repo_host
  type: org.cloudfoundry.managed-service
  parameters:
    service: html5-apps-repo
    service-name: MyHANAApp-html5-app-host-service
    service-plan: app-host
- name: uaa_MyHANAApp
  type: org.cloudfoundry.managed-service
  parameters:
    path: ./xs-security.json
    service: xsuaa
    service-name: MyHANAApp-xsuaa-service
    service-plan: application
parameters:
  deploy_mode: html5-repo
  enable-parallel-deployments: true
  appname: unique-0b12e7ad
build-parameters:
  before-all:
  - builder: custom
    commands:
    - npx -p @sap/cds-dk cds build --production
maxstreifeneder
Product and Topic Expert
Product and Topic Expert
0 Kudos

can you please show the log output of the MyHANAApp-srv using the "cf logs MyHANAApp-srv --recent" command? It's rather something during the app start than a problem with the MTA deployment itself.

MatthiasH
Explorer
0 Kudos

The log output of the MyHANAApp-srv using the "cf logs MyHANAApp-srv --recent" (I havent found the file /home/vcap/app/.npm/_logs/2023-04-24T16_18_50_156Z-debug.log):

   2023-04-24T16:02:26.68+0000 [CELL/0] OUT Cell 09fd828d-b028-49e6-8667-5a793537bf82 creating container for instance 9b1206ff-a5b7-4521-7219-255f
2023-04-24T16:02:27.06+0000 [CELL/0] OUT Security group rules were updated
2023-04-24T16:02:27.08+0000 [CELL/0] OUT Cell 09fd828d-b028-49e6-8667-5a793537bf82 successfully created container for instance 9b1206ff-a5b7-4521-7219-255f
2023-04-24T16:02:27.38+0000 [CELL/0] OUT Downloading droplet...
2023-04-24T16:02:32.77+0000 [CELL/0] OUT Downloaded droplet (101.4M)
2023-04-24T16:02:32.77+0000 [CELL/0] OUT Starting health monitoring of container
2023-04-24T16:02:33.43+0000 [APP/PROC/WEB/0] OUT > MyHANAApp@1.0.0 start /home/vcap/app
2023-04-24T16:02:33.43+0000 [APP/PROC/WEB/0] OUT > cds serve srv/csn.json
2023-04-24T16:02:33.80+0000 [APP/PROC/WEB/0] ERR [ERROR] Couldn't find a CDS model for '*' in /home/vcap/app
2023-04-24T16:02:33.81+0000 [APP/PROC/WEB/0] ERR npm ERR! code ELIFECYCLE
2023-04-24T16:02:33.81+0000 [APP/PROC/WEB/0] ERR npm ERR! errno 1
2023-04-24T16:02:33.81+0000 [APP/PROC/WEB/0] ERR npm ERR! MyHANAApp@1.0.0 start: `cds serve srv/csn.json`
2023-04-24T16:02:33.81+0000 [APP/PROC/WEB/0] ERR npm ERR! Exit status 1
2023-04-24T16:02:33.81+0000 [APP/PROC/WEB/0] ERR npm ERR!
2023-04-24T16:02:33.81+0000 [APP/PROC/WEB/0] ERR npm ERR! Failed at the MyHANAApp@1.0.0 start script.
2023-04-24T16:02:33.81+0000 [APP/PROC/WEB/0] ERR npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2023-04-24T16:02:33.84+0000 [APP/PROC/WEB/0] ERR npm ERR! A complete log of this run can be found in:
2023-04-24T16:02:33.84+0000 [APP/PROC/WEB/0] ERR npm ERR! /home/vcap/app/.npm/_logs/2023-04-24T16_02_33_819Z-debug.log
2023-04-24T16:02:33.85+0000 [APP/PROC/WEB/0] OUT Exit status 1
2023-04-24T16:02:41.73+0000 [CELL/0] OUT Cell 09fd828d-b028-49e6-8667-5a793537bf82 stopping instance 9b1206ff-a5b7-4521-7219-255f
2023-04-24T16:02:41.73+0000 [CELL/0] OUT Cell 09fd828d-b028-49e6-8667-5a793537bf82 destroying container for instance 9b1206ff-a5b7-4521-7219-255f
2023-04-24T16:02:41.74+0000 [API/32] OUT Process has crashed with type: "web"
2023-04-24T16:02:41.76+0000 [API/32] OUT App instance exited with guid e5bbfeec-03bc-4e88-92df-1a8ee5dbefdb payload: {"instance"=>"9b1206ff-a5b7-4521-7219-255f", "index"=>0, "cell_id"=>"09fd828d-b028-49e6-8667-5a793537bf82", "reason"=>"CRASHED", "exit_description"=>"APP/PROC/WEB: Exited with status 1", "crash_count"=>17, "crash_timestamp"=>1682352161729412822, "version"=>"e46c7598-8e31-400d-b8bd-7956b39cbbd9"}
2023-04-24T16:02:41.82+0000 [PROXY/0] OUT Exit status 137
2023-04-24T16:02:43.09+0000 [CELL/0] OUT Cell 09fd828d-b028-49e6-8667-5a793537bf82 successfully destroyed container for instance 9b1206ff-a5b7-4521-7219-255f
2023-04-24T16:18:43.17+0000 [CELL/0] OUT Cell 66777274-56d5-4ae6-80f0-ea61129612e1 creating container for instance f64f839b-b4f4-40c1-4b07-5be1
2023-04-24T16:18:43.52+0000 [CELL/0] OUT Security group rules were updated
2023-04-24T16:18:43.53+0000 [CELL/0] OUT Cell 66777274-56d5-4ae6-80f0-ea61129612e1 successfully created container for instance f64f839b-b4f4-40c1-4b07-5be1
2023-04-24T16:18:43.92+0000 [CELL/0] OUT Downloading droplet...
2023-04-24T16:18:49.13+0000 [CELL/0] OUT Downloaded droplet (101.4M)
2023-04-24T16:18:49.13+0000 [CELL/0] OUT Starting health monitoring of container
2023-04-24T16:18:49.79+0000 [APP/PROC/WEB/0] OUT > MyHANAApp@1.0.0 start /home/vcap/app
2023-04-24T16:18:49.79+0000 [APP/PROC/WEB/0] OUT > cds serve srv/csn.json
2023-04-24T16:18:50.14+0000 [APP/PROC/WEB/0] ERR [ERROR] Couldn't find a CDS model for '*' in /home/vcap/app
2023-04-24T16:18:50.15+0000 [APP/PROC/WEB/0] ERR npm ERR! code ELIFECYCLE
2023-04-24T16:18:50.15+0000 [APP/PROC/WEB/0] ERR npm ERR! errno 1
2023-04-24T16:18:50.15+0000 [APP/PROC/WEB/0] ERR npm ERR! MyHANAApp@1.0.0 start: `cds serve srv/csn.json`
2023-04-24T16:18:50.15+0000 [APP/PROC/WEB/0] ERR npm ERR! Exit status 1
2023-04-24T16:18:50.15+0000 [APP/PROC/WEB/0] ERR npm ERR!
2023-04-24T16:18:50.15+0000 [APP/PROC/WEB/0] ERR npm ERR! Failed at the MyHANAApp@1.0.0 start script.
2023-04-24T16:18:50.15+0000 [APP/PROC/WEB/0] ERR npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2023-04-24T16:18:50.18+0000 [APP/PROC/WEB/0] ERR npm ERR! A complete log of this run can be found in:
2023-04-24T16:18:50.18+0000 [APP/PROC/WEB/0] ERR npm ERR! /home/vcap/app/.npm/_logs/2023-04-24T16_18_50_156Z-debug.log
2023-04-24T16:18:50.19+0000 [APP/PROC/WEB/0] OUT Exit status 1
2023-04-24T16:18:56.66+0000 [CELL/0] OUT Cell 66777274-56d5-4ae6-80f0-ea61129612e1 stopping instance f64f839b-b4f4-40c1-4b07-5be1
2023-04-24T16:18:56.66+0000 [CELL/0] OUT Cell 66777274-56d5-4ae6-80f0-ea61129612e1 destroying container for instance f64f839b-b4f4-40c1-4b07-5be1
2023-04-24T16:18:56.69+0000 [API/6] OUT Process has crashed with type: "web"
2023-04-24T16:18:56.70+0000 [API/6] OUT App instance exited with guid e5bbfeec-03bc-4e88-92df-1a8ee5dbefdb payload: {"instance"=>"f64f839b-b4f4-40c1-4b07-5be1", "index"=>0, "cell_id"=>"66777274-56d5-4ae6-80f0-ea61129612e1", "reason"=>"CRASHED", "exit_description"=>"APP/PROC/WEB: Exited with status 1", "crash_count"=>18, "crash_timestamp"=>1682353136663967062, "version"=>"e46c7598-8e31-400d-b8bd-7956b39cbbd9"}
2023-04-24T16:18:56.75+0000 [PROXY/0] OUT Exit status 137
2023-04-24T16:18:58.01+0000 [CELL/0] OUT Cell 66777274-56d5-4ae6-80f0-ea61129612e1 successfully destroyed container for instance f64f839b-b4f4-40c1-4b07-5be1
2023-04-24T16:34:59.62+0000 [CELL/0] OUT Cell e4da31d7-b045-4881-a835-c3446fec2669 creating container for instance 754cc918-1490-4e15-4faa-b997
2023-04-24T16:34:59.95+0000 [CELL/0] OUT Security group rules were updated
2023-04-24T16:34:59.97+0000 [CELL/0] OUT Cell e4da31d7-b045-4881-a835-c3446fec2669 successfully created container for instance 754cc918-1490-4e15-4faa-b997
2023-04-24T16:35:00.45+0000 [CELL/0] OUT Downloading droplet...
2023-04-24T16:35:05.42+0000 [CELL/0] OUT Downloaded droplet (101.4M)
2023-04-24T16:35:05.42+0000 [CELL/0] OUT Starting health monitoring of container
2023-04-24T16:35:06.10+0000 [APP/PROC/WEB/0] OUT > MyHANAApp@1.0.0 start /home/vcap/app
2023-04-24T16:35:06.10+0000 [APP/PROC/WEB/0] OUT > cds serve srv/csn.json
2023-04-24T16:35:06.45+0000 [APP/PROC/WEB/0] ERR [ERROR] Couldn't find a CDS model for '*' in /home/vcap/app
2023-04-24T16:35:06.47+0000 [APP/PROC/WEB/0] ERR npm ERR! code ELIFECYCLE
2023-04-24T16:35:06.47+0000 [APP/PROC/WEB/0] ERR npm ERR! errno 1
2023-04-24T16:35:06.48+0000 [APP/PROC/WEB/0] ERR npm ERR! MyHANAApp@1.0.0 start: `cds serve srv/csn.json`
2023-04-24T16:35:06.48+0000 [APP/PROC/WEB/0] ERR npm ERR! Exit status 1
2023-04-24T16:35:06.48+0000 [APP/PROC/WEB/0] ERR npm ERR!
2023-04-24T16:35:06.48+0000 [APP/PROC/WEB/0] ERR npm ERR! Failed at the MyHANAApp@1.0.0 start script.
2023-04-24T16:35:06.48+0000 [APP/PROC/WEB/0] ERR npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2023-04-24T16:35:06.48+0000 [APP/PROC/WEB/0] ERR npm ERR! A complete log of this run can be found in:
2023-04-24T16:35:06.48+0000 [APP/PROC/WEB/0] ERR npm ERR! /home/vcap/app/.npm/_logs/2023-04-24T16_35_06_482Z-debug.log
2023-04-24T16:35:06.49+0000 [APP/PROC/WEB/0] OUT Exit status 1
2023-04-24T16:35:12.98+0000 [CELL/0] OUT Cell e4da31d7-b045-4881-a835-c3446fec2669 stopping instance 754cc918-1490-4e15-4faa-b997
2023-04-24T16:35:12.98+0000 [CELL/0] OUT Cell e4da31d7-b045-4881-a835-c3446fec2669 destroying container for instance 754cc918-1490-4e15-4faa-b997
2023-04-24T16:35:12.99+0000 [API/1] OUT Process has crashed with type: "web"
2023-04-24T16:35:13.01+0000 [API/1] OUT App instance exited with guid e5bbfeec-03bc-4e88-92df-1a8ee5dbefdb payload: {"instance"=>"754cc918-1490-4e15-4faa-b997", "index"=>0, "cell_id"=>"e4da31d7-b045-4881-a835-c3446fec2669", "reason"=>"CRASHED", "exit_description"=>"APP/PROC/WEB: Exited with status 1", "crash_count"=>19, "crash_timestamp"=>1682354112980739556, "version"=>"e46c7598-8e31-400d-b8bd-7956b39cbbd9"}
2023-04-24T16:35:13.05+0000 [PROXY/0] OUT Exit status 137
2023-04-24T16:35:14.24+0000 [CELL/0] OUT Cell e4da31d7-b045-4881-a835-c3446fec2669 successfully destroyed container for instance 754cc918-1490-4e15-4faa-b997
maxstreifeneder
Product and Topic Expert
Product and Topic Expert
0 Kudos

thanks for the log output! first of all, I'm not the tutorial author so my personal deployment configuration usually looks different �� seems like that the csn file (produced during cds build using the cds files -> cds serve as the start command in your package.json picks up that csn file) cannot be found.

I'd suggest the following:

- run the cds builder in your terminal: "npx -p @sap/cds-dk cds build --production" - that's the step producing the csn file while building the MTA archive and is also mentioned in the before-all step in the mta.yaml.

- check where the csn.json file will end up in your filesystem. usually either in ./gen/srv or in ./srv/gen

- try to adjust the path property of your MyHANAApp-srv module in the mta.yaml depending on the location of your csn.json file. important: you need to build the MTA archive and deploy the archive again.

fingers crossed 😉

MatthiasH
Explorer
0 Kudos

Thanks for your advices 🙂 But... unfortunatelly still the same error messages.

I run the cds builder in my terminal: "npx -p @sap/cds-dk cds build --production"

My csn.json is in . So I changed in mta.yaml to. After that I built again the MTA archive and deployed it.

MatthiasH
Explorer
0 Kudos

What I found out additionaly. In the MyHANAApp-destination-service


I get a 404 when I press "check availability..." button

maxstreifeneder
Product and Topic Expert
Product and Topic Expert
0 Kudos

so the 404 for the destination check is only legit - because the destination you are checking is actually pointing to the app that can't be started because cds serve on Cloud Foundry can't find the csn.json file.

maybe we can take a shortcut tho:

cf enable-ssh MyHANAApp-srv && cf restart MyHANAApp-srv

with that you can use ssh to connect to the app container on Cloud Foundry using:

cf ssh MyHANAApp-srv

if you now go to the app directory, you will hopefully find the csn.json somewhere:

cd /home/vcap/app

maybe you need to twist the path in mta.yaml and the package.json start command accordingly, so that both the local start of the app but also the Cloud Foundry app grab the csn.json file. (/home/vcap/app is the node project root)

pretty hard to troubleshoot - can you provide your project as a github repo?

MatthiasH
Explorer
0 Kudos

I have tried your commands. But "cf enable-ssh MyHANAApp-srv && cf restart MyHANAApp-srv" ended with the same starting problem:
"... Instances starting...
All instances crashed
FAILED ".

So I wasn´t able to access with "cf ssh MyHANAApp-srv"

Now I have published my project on github: https://github.com/huetterm/MyHANAApp

Thanks for your ongoing support.

P.S.: I have already changed the path in package.json to

Accepted Solutions (1)

Accepted Solutions (1)

maxstreifeneder
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hey Matthias,

the only thing you have missed was https://developers.sap.com/tutorials/hana-cloud-cap-create-project.html - Step 5, where cds gets the configuration for the build process. (where the gen/ directory will end up and what needs to be built)

- the path in the mta.yaml was entirely right from the beginning:

modules: 
- name: MyHANAApp-srv
type: nodejs
path: gen/srv

and the srv/package.json start command was also right:

"scripts": { 
"start": "cds serve srv/csn.json"
}

let me know if it doesn't work for you, then I can further help troubleshooting. 🙂

meanwhile, I've created a Pull Request to your repo with the fixes (hope nothing went wrong along the way with formatting etc.) : https://github.com/huetterm/MyHANAApp/pull/1

MatthiasH
Explorer

Thank you very much. I must have missed Step 5, dispite the fact, that I have marked it as completed:-(

maxstreifeneder
Product and Topic Expert
Product and Topic Expert
0 Kudos

well, that happens! glad it works now 🙂

Answers (0)