cancel
Showing results for 
Search instead for 
Did you mean: 

Error! UAA Tenant pattern and Shared Issues

02-16-2020 3:58 PM
980 views 0 comments
0 Likes
SAP Managed Tags
Subscribe

Hello Friends, 

So when i created a business APP (UAA and DEST_####) are created .I removed those resources and created a new UAA with type Space

So whenever i run webapp in cloudfoundry , it creates additional UAA with application type along with the previous one created and program crashes, with created instance destoryed.

below you can find my MTA YAML

ID: DH9
_schema-version: '2.1'
description: Core database service
version: 0.0.1
modules:
  - name: DH9-db
    type: hdb
    path: db
    parameters:
      memory: 256M
      disk-quota: 256M
    requires:
      - name: DH9-db-hdi-container
        properties:
          TARGET_CONTAINER: '~{hdi-container-name}'
  - name: DH9-srv
    type: nodejs
    path: srv
    parameters:
      memory: 512M
      disk-quota: 256M
    provides:
      - name: srv_api
        properties:
          url: '${default-url}'
    requires:
      - name: DH9-db-hdi-container
  - name: web
    type: html5
    path: web
    parameters:
      disk-quota: 256M
      memory: 256M
    build-parameters:
      builder: grunt
    requires:
      - name: DH9_uaa
      - name: DH9-db-hdi-container
resources:
  - name: DH9-db-hdi-container
    type: com.sap.xs.hdi-container
    properties:
      hdi-container-name: '${service-name}'
  - name: DH9_uaa
    type: com.sap.xs.uaa


Not only that here goes my security.json

{
  "xsappname": "DH9",
  "scopes": [{
		"name": "$XSAPPNAME.Display",
		"description": "display"
	}, {
		"name": "$XSAPPNAME.Create",
		"description": "create"
	}, {
		"name": "$XSAPPNAME.Edit",
		"description": "edit"
	}, {
		"name": "$XSAPPNAME.Delete",
		"description": "delete"
	}, {
		"name": "$XSAPPNAME.DataGenerator",
		"description": "data generator"
	}, {
		"name": "xs_authorization.read",
		"description": "Read authorization information from UAA"
	}, {
		"name": "xs_authorization.write",
		"description": "Write authorization information to UAA"
	}, {
		"name": "$XSAPPNAME.ODATASERVICEUSER",
		"description": "Enter"
	}, {
		"name": "$XSAPPNAME.ODATASERVICEADMIN",
		"description": "Enter"
	}],
	"attributes": [{
		"name": "client",
		"description": "Session Client",
		"valueType": "int"
	}, {
		"name": "country",
		"description": "country",
		"valueType": "s"
	}],
	"role-templates": [{
		"name": "Viewer",
		"description": "View all records",
		"scope-references": [
			"$XSAPPNAME.Display"
		],
		"attribute-references": [
			"client", "country"
		]
	}, {
		"name": "Editor",
		"description": "Edit and Delete records",
		"scope-references": [
			"$XSAPPNAME.Create",
			"$XSAPPNAME.Edit",
			"$XSAPPNAME.Delete",
			"$XSAPPNAME.Display",
			"$XSAPPNAME.DataGenerator",
			"$XSAPPNAME.ODATASERVICEUSER",
			"$XSAPPNAME.ODATASERVICEADMIN"
		],
		"attribute-references": [
			"client"
		]
	}]
}

Last but not least , this is my package.json

{
  "welcomeFile": "/web/index.html",
  "authenticationMethod": "route",
  "logout": {
    "logoutEndpoint": "/do/logout"
  },
  "routes": [
    {
      "source": "^/web/(.*)$",
      "target": "$1",
      "localDir": "webapp"
    }
  ]
}
<br>

Here is the error i face.

home/vcap/deps/0/node_modules/@sap/approuter/lib/configuration.js:69
6:41:16 AM (HTML5 application runner)     throw new Error('UAA tenant mode is shared, but environment variable TENANT_HOST_PATTERN is not set');
6:41:16 AM (HTML5 application runner)     ^
6:41:16 AM (HTML5 application runner) Error: UAA tenant mode is shared, but environment variable TENANT_HOST_PATTERN is not set

Kindly help! i tried all possiblities and i still miss something in what i follow.

0 Likes

Accepted Solutions (0)

Answers (0)