cancel
Showing results for 
Search instead for 
Did you mean: 

Error while deploying grant file to connect with external schema

04-27-2021 9:37 AM
1325 views 7 comments
0 Likes
SAP Managed Tags
Subscribe

Hi, I’m trying to create a PoC with SAP BTP, building from scratch an HDB module. The target is to access tables from a non HDI schema. But, I am facing an error while deploying the grant file

Processing "src/grant_files/SAPABAP1.hdbgrants"...
Using grantor service "SAP_ECC_CONNECTION" of type "sql"
Deployment ended at 2021-04-27 06:57:51
Error: Connection failed (RTE:[89006] System call 'connect' failed, rc=111:Connection refused {127.0.0.1:30062} {ClientPort:39724} (127.0.0.1:30062))

My grant file is

{
    "SAP_ECC_CONNECTION": {
        "object_owner": {
            "roles": [
                "SAPABAP1::external_access"
            ]
        },
        "application_user": {
            "roles": [
                "SAPABAP1::external_access"
            ]
        }
    }
}

My MTA file is:

- name: DB
    type: hdb
    path: XSA_DB
    requires:
      - name: hdi_XSA_DB
        properties:
          TARGET_CONTAINER: '~{hdi-container-name}'
      - name: SAP_ECC_CONNECTION
resources:
  - name: hdi_XSA_DB
    parameters:
      config:
        schema: TEST_XSA
    properties:
      hdi-container-name: '${service-name}'
    type: com.sap.xs.hdi-container
  - name: SAP_ECC_CONNECTION
    type: org.cloudfoundry.existing-service
    parameters:
      service-name: SAP_ECC_CONNECTION
    properties:
      SAP_ECC_CONNECTION_SERVICE: '${service-name}'
0 Likes

Accepted Solutions (0)

Answers (1)

Answers (1)

Vitaliy-R
Developer Advocate
Developer Advocate
0 Likes

i would first check if all the details were provided correctly in the SAP_ECC_CONNECTION definition, including the host and the port.

former_member743230
Participant
0 Likes

Hi Witalij,

Thanks for the response. Yes I have cross verified the details in the SAP_ECC_CONNECTION definition, i.e

            "driver":"com.sap.db.jdbc.Driver",
            "host":"",
            "password":"",
            "port":"",
            "schema":"",
            "tags":"hana",
            "user":""

All seems fine.

Vitaliy-R
Developer Advocate
Developer Advocate

varun_bhargav18 I am not sure if it means your SAP_ECC_CONNECTION is all empty values, or have you removed all values from it?

If the classic schema you are connecting to is in the same HANA db as your HDI container, then indeed you might not need host/port, but still need user/password/schema. If it is in the different db, then you need host/port too. If it is behind your firewall (if you are connecting to ECC from cloud SAP BTP), then you might need to use cloud connector.

There were some posts recently on these topics:

UPS: https://blogs.sap.com/2021/04/16/modeling-in-sap-hana-cloud-2-understanding-the-project-sap-bas/

Cloud Connector: https://blogs.sap.com/2021/03/19/connect-from-sap-hana-cloud-to-sap-hana-express-via-cloud-connector...

former_member743230
Participant
0 Likes

I am not sure if it means your SAP_ECC_CONNECTION is all empty values, or have you removed all values from it?

I have removed the values from it.

If it is in the different db, then you need host/port too.

Yes I am trying to connect to classic schema in different DB.

former_member743230
Participant
0 Likes

vitaliy.rudnytskiy Is it because I am trying to connect to a schema preset on a on-premise DB from Cloud using UPS. correct me if I am worng.

Vitaliy-R
Developer Advocate
Developer Advocate
0 Likes

varun_bhargav18, if it is on-prem DB, then it's host and port should be accessible from the IP addresses of the cloud products (HANA Cloud, Business Application Studio) you are using.

former_member743230
Participant
0 Likes

any reference for this please.