Skip to Content
avatar image
Former Member

500 Internal Server Error - Invalid HANA settings provided. OData services are disabled?

I try to run the OData Service on my SAP HANA HXE and get this error if I run the node.js-module within the Odata Service and go the xsodata-path. How could I solve this to get a correct ODataV2-Service?

I tried to set NODE_TLS_REJECT_UNAUTHORIZED: 0 in the MTA.yaml file, but this didn't solve the error.

500 Internal Server Error - Invalid HANA settings provided. OData services are disabled.
Error: Internal Server Error - Invalid HANA settings provided. OData services are disabled.
    at /hana/shared/HXE/xs/controller_data/executionagent/executionroot/6d27693a-a555-497d-ac73-37558c6e4024/app/node_modules/sap-xsjs/lib/index.js:107:14
    at Layer.handle [as handle_request] (/hana/shared/HXE/xs/controller_data/executionagent/executionroot/6d27693a-a555-497d-ac73-37558c6e4024/app/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/hana/shared/HXE/xs/controller_data/executionagent/executionroot/6d27693a-a555-497d-ac73-37558c6e4024/app/node_modules/express/lib/router/index.js:312:13)
    at /hana/shared/HXE/xs/controller_data/executionagent/executionroot/6d27693a-a555-497d-ac73-37558c6e4024/app/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/hana/shared/HXE/xs/controller_data/executionagent/executionroot/6d27693a-a555-497d-ac73-37558c6e4024/app/node_modules/express/lib/router/index.js:330:12)
    at next (/hana/shared/HXE/xs/controller_data/executionagent/executionroot/6d27693a-a555-497d-ac73-37558c6e4024/app/node_modules/express/lib/router/index.js:271:10)
    at urlRewriteMiddleware (/hana/shared/HXE/xs/controller_data/executionagent/executionroot/6d27693a-a555-497d-ac73-37558c6e4024/app/node_modules/sap-xsjs/lib/middleware.js:38:5)
    at Layer.handle [as handle_request] (/hana/shared/HXE/xs/controller_data/executionagent/executionroot/6d27693a-a555-497d-ac73-37558c6e4024/app/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/hana/shared/HXE/xs/controller_data/executionagent/executionroot/6d27693a-a555-497d-ac73-37558c6e4024/app/node_modules/express/lib/router/index.js:312:13)
    at /hana/shared/HXE/xs/controller_data/executionagent/executionroot/6d27693a-a555-497d-ac73-37558c6e4024/app/node_modules/express/lib/router/index.js:280:7



My Mta looks like this and in the nodedb are the hbcds and hdbtabledata.file

_schema-version: '2.0'
ID: watson
version: 0.0.1


modules:
- name: nodedb
  type: hdb
  path: nodedb
  requires:
  - name: hdi-container


 
- name: tinyjs
  type: nodejs
  path: tinyjs
  requires:
    - name: nodedb
    - name: hdi-container
    
- name: odatajs
  type: nodejs
  path: odatajs
  requires:
    - name: nodedb
    - name: hdi-container
  provides:
    - name: odatajs_api
      properties:
        service_url: ${default-url}
        
- name: test
  type: html5
  path: agent


- name: table
  type: html5
  path: table


resources:
 - name: hdi-container
   properties:
      hdi-container-name: ${service-name}
      type: com.sap.xs.hdi-container
     
   


My xsodata-file: vendormodel is the context and Audit the table:

service {
         "watson.nodedb::vendormodel.Audit" as "MyTable";
}

Add comment
10|10000 characters needed characters exceeded

  • Former Member Florian Pfeffer

    I get following output, if I output the hana object:

    Application is starting
    2/20/17 7:36:54.773 AM [APP/2-0] OUT
    2/20/17 7:36:54.773 AM [APP/2-0] OUT > odatajs@1.0.0 start /hana/shared/HXE/xs/controller_data/executionagent/executionroot/2695942f-b564-4f21-8f8b-ac73f01eafd0/app
    2/20/17 7:36:54.774 AM [APP/2-0] OUT > node server.js
    2/20/17 7:36:54.774 AM [APP/2-0] OUT
    2/20/17 7:36:55.991 AM [APP/2-0] OUT [WARN] No service matches hana
    2/20/17 7:36:56.013 AM [APP/2-0] OUT { anonymous: true, redirectUrl: '/index.xsjs' }
    2/20/17 7:36:56.052 AM [APP/2-0] OUT Server listening on port 55002
    Application is running
    <br>

    What's wrong? Did I use the wrong port to acces the odata service?

    The application is running on https://hxehost:51020/, but no service matches hana. How could I match the service?

  • You get the warning 'No service matches hana'. That means that no hdi-container service could be determined which is tagged with 'hana'. Can you check that everything is correct with your hdi-container and the service is up and running.

  • Former Member Florian Pfeffer

    Build of nodedb failed because of "no service definition found.You are right there is the problem. How could I define that service or create that service?

    11:01:17 (Builder) Build of /watson/nodedb started. 11:01:20 (DIBuild) Build of /watson/nodedb in progress 11:01:22 (DIBuild) ********** Printing /watson/nodedb Build Log **********
    [INFO] Injecting source code into builder...
    [INFO] Source code injection finished
    [INFO] ------------------------------------------------------------------------
    cache found, retrieving node modules from cache
    
    > deploy@ start /hana/shared/HXE/xs/controller_data/executionagent/executionroot/83e3757e-5608-42b7-84d8-d33b3ab3d8b1/app/META-INF/.java_xs_buildpack/tomcat/temp/builder/hdi-builder/builds/build-3959210442205579328/nodedb
    > node node_modules/sap-hdi-deploy/deploy.js
    
    Error: no service definition found; there must be at least one service definition for the deployment target
    (0s 172ms)
    
    npm ERR! Linux 3.12.49-11-default
    npm ERR! argv "/hana/shared/HXE/xs/controller_data/executionagent/executionroot/83e3757e-5608-42b7-84d8-d33b3ab3d8b1/app/META-INF/resources/nodejs/vendor/node6.9/bin/node" "/hana/shared/HXE/xs/controller_data/executionagent/executionroot/83e3757e-5608-42b7-84d8-d33b3ab3d8b1/app/META-INF/resources/nodejs/vendor/node6.9/lib/node_modules/npm/bin/npm-cli.js" "start"
    npm ERR! node v6.9.1
    npm ERR! npm v3.10.8
    npm ERR! code ELIFECYCLE
    npm ERR! deploy@ start: `node node_modules/sap-hdi-deploy/deploy.js`
    npm ERR! Exit status 1
    npm ERR! 
    npm ERR! Failed at the deploy@ start script 'node node_modules/sap-hdi-deploy/deploy.js'.
    npm ERR! Make sure you have the latest version of node.js and npm installed.
    npm ERR! If you do, this is most likely a problem with the deploy package,
    npm ERR! not with npm itself.
    npm ERR! Tell the author that this fails on your system:
    npm ERR! node node_modules/sap-hdi-deploy/deploy.js
    npm ERR! You can get information on how to open an issue for this project with:
    npm ERR! npm bugs deploy
    npm ERR! Or if that isn't available, you can get their info via:
    npm ERR! npm owner ls deploy
    npm ERR! There is likely additional logging output above.
    
    npm ERR! Please include the following file with any support request:
    npm ERR! /hana/shared/HXE/xs/controller_data/executionagent/executionroot/83e3757e-5608-42b7-84d8-d33b3ab3d8b1/app/META-INF/.java_xs_buildpack/tomcat/temp/builder/hdi-builder/builds/build-3959210442205579328/nodedb/npm-debug.log
    
    ********** End of /watson/nodedb Build Log ********** 11:01:22 (Builder) Check console logs for details 11:01:22 (Builder) Build of /watson/nodedb failed.
  • Get RSS Feed

2 Answers

  • Feb 20, 2017 at 10:42 AM

    Can you correct the indendation for the type of the hdi-container resource (the type should not be listed under properties):

     - name: hdi-container
       type: com.sap.xs.hdi-container
       properties:
          hdi-container-name: ${service-name}
    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Florian Pfeffer

      My namespace looks like this and I don't use a namespace in the hdbcds-file, only the context vendormodel and the Audit as Entity. I tried a lot of options, but I didn't found a version, that shows me the odata service.

      {
          "name":    "",
          "subfolder": "ignore"
      }
      
  • avatar image
    Former Member
    Feb 25, 2017 at 02:45 PM

    The mta.yaml file has an indent error and the namespace was wrong for my file-structure.

    The OData-Service runs now for my application.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Lukas,

      I've faced the same issue when I trying to call my OData service, and below is my mta.yaml file content:

      ID: kck_todo_list
      _schema-version: '2.0'
      description: chengkun e2e project
      version: 0.0.1
      
      
      modules:
       - name: kck_todo_db
         type: nodejs
         path: kck_todo_db
         requires:
          - name: kck-hdi-container
            properties:
                TARGET_CONTAINER: ~{hdi-container-name}
         parameters:
            memory: 128M
            disk-quota: 128M
      
      
       - name: kck_todo_nodejs
         type: nodejs
         path: kck_todo_nodejs
         provides:
          - name: kck_todo_nodejs_api
            properties:
               url: ${default-url}
         requires:
          - name: kck-hdi-container
          - name: kck_todo_uaa
         parameters:
            memory: 128M
            disk-quota: 512M
            host: sap-cec-servecwdf-${space}-kck-todo-nodejs
         properties:
            TENANT_HOST_PATTERN: "^(.*)-servecwdf-${space}-kck-todo-nodejs.cfapps.sap.hana.ondemand.com"
      
      
       - name: kck_todo_ui
         type: html5
         path: kck_todo_ui
         requires:
            - name: kck_todo_nodejs_api
              group: destinations
              properties:
                url: ~{url}
                name: kck_todo_nodejs_api
                forwardAuthToken: true
            - name: kck_todo_uaa
         parameters:
            memory: 256M
            disk-quota: 256M
            host: sap-cec-servecwdf-${space}-kck-todo-ui
         properties:
            TENANT_HOST_PATTERN: "^(.*)-servecwdf-${space}-kck-todo-ui.cfapps.sap.hana.ondemand.com"
      
      
       - name: kck_todo_fiori
         type: html5
         path: kck_todo_fiori
         requires:
          - name: kck_todo_nodejs_api
            group: destinations
            properties:
               name: kck_todo_nodejs_api
               url: ~{url}
               forwardAuthToken: true
          - name: kck_todo_uaa
         parameters:
            memory: 256M
            disk-quota: 512M
            host: sap-cec-servecwdf-${space}-kck-todo-fiori
         properties:
            TENANT_HOST_PATTERN: "^(.*)-servecwdf-${space}-kck-todo-fiori.cfapps.sap.hana.ondemand.com"
      
      
      resources:
       - name: kck-hdi-container
         type: com.sap.xs.hdi-container
         properties:
            hdi-container-name: ${service-name}
         parameters:
            service: managed-hana
            service-plan: hdi-shared
       - name: kck_todo_uaa
         type: com.sap.xs.uaa
         parameters:
            service: xsuaa
            service-plan: default

      Error returned from service:

      returning status 500: Invalid HANA settings provided. OData services are disabled.#
      2017-09-21T13:45:27.15+0800 [APP/PROC/WEB/0] ERR     at Layer.handle [as handle_request] (/home/vcap/app/node_modules/express/lib/router/layer.js:95:5)
      2017-09-21T13:45:27.15+0800 [APP/PROC/WEB/0] ERR     at urlRewriteMiddleware (/home/vcap/app/node_modules/@sap/xsjs/lib/middleware.js:54:5)
      2017-09-21T13:45:27.15+0800 [APP/PROC/WEB/0] ERR     at trim_prefix (/home/vcap/app/node_modules/express/lib/router/index.js:317:13)
      2017-09-21T13:45:27.15+0800 [APP/PROC/WEB/0] ERR     at /home/vcap/app/node_modules/express/lib/router/index.js:284:7
      2017-09-21T13:45:27.15+0800 [APP/PROC/WEB/0] ERR Error: Invalid HANA settings provided. OData services are disabled.
      2017-09-21T13:45:27.15+0800 [APP/PROC/WEB/0] ERR     at trim_prefix (/home/vcap/app/node_modules/express/lib/router/index.js:317:13)
      2017-09-21T13:45:27.15+0800 [APP/PROC/WEB/0] ERR     at next (/home/vcap/app/node_modules/express/lib/router/index.js:275:10)
      2017-09-21T13:45:27.15+0800 [APP/PROC/WEB/0] ERR     at /home/vcap/app/node_modules/express/lib/router/index.js:284:7

      Do you have any idea for it?

      Thanks

      Chengkun