1

I followed the steps on this blog and deployed the After I deployed the approuter to cloud foundry, the app is getting crashed.

Below is the error log.

2018-04-11T15:26:11.61-0400 [APP/PROC/WEB/0] ERR npm ERR! Linux 4.4.0-111-generic
2018-04-11T15:26:11.61-0400 [APP/PROC/WEB/0] ERR npm ERR! argv “/home/vcap/deps/0/node/bin/node” “/home/vcap/deps/0/bin/npm” “start”
2018-04-11T15:26:11.61-0400 [APP/PROC/WEB/0] ERR npm ERR! node v6.13.1
2018-04-11T15:26:11.61-0400 [APP/PROC/WEB/0] ERR npm ERR! npm v3.10.10
2018-04-11T15:26:11.61-0400 [APP/PROC/WEB/0] ERR npm ERR! path /home/vcap/app/package.json
2018-04-11T15:26:11.61-0400 [APP/PROC/WEB/0] ERR npm ERR! code ENOENT
2018-04-11T15:26:11.61-0400 [APP/PROC/WEB/0] ERR npm ERR! errno -2
2018-04-11T15:26:11.61-0400 [APP/PROC/WEB/0] ERR npm ERR! syscall open
2018-04-11T15:26:11.62-0400 [APP/PROC/WEB/0] ERR npm ERR! enoent ENOENT: no such file or directory, open ‘/home/vcap/app/package.json’
2018-04-11T15:26:11.62-0400 [APP/PROC/WEB/0] ERR npm ERR! enoent ENOENT: no such file or directory, open ‘/home/vcap/app/package.json’
2018-04-11T15:26:11.62-0400 [APP/PROC/WEB/0] ERR npm ERR! enoent This is most likely not a problem with npm itself
2018-04-11T15:26:11.62-0400 [APP/PROC/WEB/0] ERR npm ERR! enoent and is related to npm not being able to find a file.
2018-04-11T15:26:11.62-0400 [APP/PROC/WEB/0] ERR npm ERR! enoent
2018-04-11T15:26:11.62-0400 [APP/PROC/WEB/0] ERR npm ERR! Please include the following file with any support request:
2018-04-11T15:26:11.62-0400 [APP/PROC/WEB/0] ERR npm ERR! /home/vcap/app/npm-debug.log

The error log says package.json file is missing, but i placed package.json file inside the approuter directory.

Below is the code in manifest.json file.

---
applications:
 - name: approuter
   host: approuter-s0018349215trial
   path: approuter
   memory: 128M
   buildpack: nodejs_buildpack
   env:
        TENANT_HOST_PATTERN: '*****'
        destinations: '[{"name":"Businesspartners_cloudfoundry", "url" 
        :"https://***********", "forwardAuthToken": true}]'
   services:
     - my-xsuaa

Below is the package.json file

{
  "name": "@sap/approuter",
  "description": "Node.js based application router",
  "version": "2.10.0",
  "repository": {},
  "main": "approuter.js",
  "dependencies": {
    "agentkeepalive": "2.0.5",
    "async": "2.0.1",
    "basic-auth": "1.0.3",
    "commander": "2.9.0",
    "compression": "1.6.0",
    "connect": "3.6.2",
    "cookie": "0.2.2",
    "cookie-parser": "1.3.5",
    "cookie-signature": "1.0.6",
    "express-session": "1.15.3",
    "http-proxy-agent": "1.0.0",
    "https-proxy-agent": "1.0.0",
    "jwt-decode": "2.0.1",
    "lodash": "4.17.4",
    "lru-cache": "4.0.0",
    "mustache": "2.2.1",
    "passport": "0.3.2",
    "request": "2.81.0",
    "request-stats": "2.0.1",
    "safe-regex": "1.1.0",
    "@sap/audit-logging": "^1.0.5",
    "@sap/e2e-trace": "^1.1.2",
    "@sap/logging": "^3.0.0",
    "@sap/xsenv": "^1.2.6",
    "send": "0.15.3",
    "serve-static": "1.12.3",
    "tough-cookie": "2.3.1",
    "tv4": "1.2.7",
    "urijs": "1.16.1",
    "verror": "1.10.0",
    "ws": "1.1.4",
    "base64-url": "1.2.1",
    "scmp": "1.0.0",
    "uid-safe": "~2.0.0"
  },
  "devDependencies": {
    "body-parser": "1.15.2",
    "chai": "3.5.0",
    "diveSync": "0.3.0",
    "eslint": "3.2.2",
    "filter-node-package": "^2.0.0",
    "istanbul": "0.4.4",
    "markdown-toc": "^1.1.0",
    "mocha": "3.0.2",
    "node-build": "^1.0.0",
    "node-mocks-http": "1.5.2",
    "node-style": "^2.0.0",
    "proxyquire": "1.7.10",
    "rimraf": "2.5.4",
    "sinon": "1.17.5",
    "supertest": "2.0.0"
  },
  "engines": {
    "node": "^0.12.7 || ^4.4.0 || ^6.0.0"
  },
  "files": [
    "lib",
    "doc",
    "package.json",
    "README.md",
    "approuter.js"
  ],
  "scripts": {
    "start": "node approuter.js",
    "test": "node build/test",
    "lint": "eslint -c node_modules/node-style/.eslintrc -f stylish lib/ approuter.js",
    "toc": "markdown-toc -i README.md && markdown-toc -i doc/extending.md && markdown-toc -i doc/sizingGuide.md",
    "prepareRelease": "node build/delete-extra-packages.js && clean-packages && npm prune --production"
  }
}

Below is the screenshot of working directory.

enter image description here

Below is the screenshot of approuter directory

enter image description here

A different error is coming up on deploying cf push command with below error log.

2018-04-23T09:27:34.02-0400 [APP/PROC/WEB/0] ERR /home/vcap/app/lib/utils/JsonValidator.js:30
2018-04-23T09:27:34.02-0400 [APP/PROC/WEB/0] ERR throw new VError('%s%s: %s', 2018-04-23T09:27:34.02-0400 [APP/PROC/WEB/0] ERR ^ 2018-04-23T09:27:34.02-0400 [APP/PROC/WEB/0] ERR VError: environment-settings/tenantHostPattern: Format validation failed (regular expression must contain a capturing group)
2018-04-23T09:27:34.02-0400 [APP/PROC/WEB/0] ERR at JsonValidator.validate (/home/vcap/app/lib/utils/JsonValidator.js:30:11)
2018-04-23T09:27:34.02-0400 [APP/PROC/WEB/0] ERR at Object.validateEnvironmentSettings (/home/vcap/app/lib/configuration/validators.js:106:15)
2018-04-23T09:27:34.02-0400 [APP/PROC/WEB/0] ERR at loadGroupedConfigurations (/home/vcap/app/lib/configuration/env-config.js:146:14)
2018-04-23T09:27:34.02-0400 [APP/PROC/WEB/0] ERR at Object.load (/home/vcap/app/lib/configuration/env-config.js:28:17)
2018-04-23T09:27:34.02-0400 [APP/PROC/WEB/0] ERR at Object.module.exports.load (/home/vcap/app/lib/configuration.js:15:37) 2018-04-23T09:27:34.02-0400 [APP/PROC/WEB/0] ERR at bootstrap (/home/vcap/app/lib/bootstrap.js:47:36) 2018-04-23T09:27:34.02-0400 [APP/PROC/WEB/0] ERR at Approuter.start (/home/vcap/app/approuter.js:58:13) 2018-04-23T09:27:34.02-0400 [APP/PROC/WEB/0] ERR at Object. (/home/vcap/app/approuter.js:115:6) 2018-04-23T09:27:34.02-0400 [APP/PROC/WEB/0] ERR at Module._compile (module.js:577:32)
2018-04-23T09:27:34.02-0400 [APP/PROC/WEB/0] ERR at Object.Module._extensions..js (module.js:586:10)
2018-04-23T09:27:34.04-0400 [APP/PROC/WEB/0] ERR npm ERR! Linux 4.4.0-116-generic 2018-04-23T09:27:34.04-0400 [APP/PROC/WEB/0] ERR npm ERR! argv "/home/vcap/deps/0/node/bin/node" "/home/vcap/deps/0/bin/npm" "start" 2018-04-23T09:27:34.04-0400 [APP/PROC/WEB/0] ERR npm ERR! node v6.13.1
2018-04-23T09:27:34.04-0400 [APP/PROC/WEB/0] ERR npm ERR! npm v3.10.10 2018-04-23T09:27:34.04-0400 [APP/PROC/WEB/0] ERR npm ERR! code ELIFECYCLE 2018-04-23T09:27:34.04-0400 [APP/PROC/WEB/0] ERR npm ERR! @sap/approuter@2.10.0 start: node approuter.js
2018-04-23T09:27:34.04-0400 [APP/PROC/WEB/0] ERR npm ERR! Exit status 1 2018-04-23T09:27:34.04-0400 [APP/PROC/WEB/0] ERR npm ERR!
2018-04-23T09:27:34.04-0400 [APP/PROC/WEB/0] ERR npm ERR! Failed at the @sap/approuter@2.10.0 start script 'node approuter.js'.
2018-04-23T09:27:34.04-0400 [APP/PROC/WEB/0] ERR npm ERR! Make sure you have the latest version of node.js and npm installed.
2018-04-23T09:27:34.04-0400 [APP/PROC/WEB/0] ERR npm ERR! If you do, this is most likely a problem with the @sap/approuter package,
2018-04-23T09:27:34.04-0400 [APP/PROC/WEB/0] ERR npm ERR! not with npm itself. 2018-04-23T09:27:34.04-0400 [APP/PROC/WEB/0] ERR npm ERR! Tell the author that this fails on your system:
2018-04-23T09:27:34.04-0400 [APP/PROC/WEB/0] ERR npm ERR! node approuter.js 2018-04-23T09:27:34.04-0400 [APP/PROC/WEB/0] ERR npm ERR! You can get information on how to open an issue for this project with: 2018-04-23T09:27:34.04-0400 [APP/PROC/WEB/0] ERR npm ERR!
npm bugs @sap/approuter 2018-04-23T09:27:34.04-0400 [APP/PROC/WEB/0] ERR npm ERR! Or if that isn't available, you can get their info via: 2018-04-23T09:27:34.04-0400 [APP/PROC/WEB/0] ERR npm ERR! npm owner ls @sap/approuter
2018-04-23T09:27:34.04-0400 [APP/PROC/WEB/0] ERR npm ERR! There is likely additional logging output above. 2018-04-23T09:27:34.05-0400 [APP/PROC/WEB/0] ERR npm ERR! Please include the following file with any support request: 2018-04-23T09:27:34.05-0400 [APP/PROC/WEB/0] ERR npm ERR! /home/vcap/app/npm-debug.log

Below is the output on executing the cf push command.

Uploading approuter... Uploading app files from: C:\Users\sanke\Desktop\favLocation\approuter Uploading 3.3M, 4197 files Done uploading OK Binding service my-xsuaa to app approuter in org P1942820265trial_trial / space dev as sankeerthnarsina@gmail.com... OK

Starting app approuter in org P1942820265trial_trial / space dev as sankeerthnarsina@gmail.com... Downloading nodejs_buildpack... Cell 09aeff0a-17aa-40ac-aee3-dcf077acd6c9 successfully created container for instance 6485e7e3-0b40-4db3-8880-dba968c55583 Downloaded nodejs_buildpack Cell 09aeff0a-17aa-40ac-aee3-dcf077acd6c9 creating container for instance 6485e7e3-0b40-4db3-8880-dba968c55583 Downloading app package... Downloaded app package (4.5M) -----> Nodejs Buildpack version 1.6.20 -----> Installing binaries engines.node (package.json): ^0.12.7 || ^4.4.0 || ^6.0.0 engines.npm (package.json): unspecified (use default) -----> Installing node 6.13.1 Download [https://buildpacks.cloudfoundry.org/dependencies/node/node-6.13.1-linux-x64-fc51b8dd.tgz] Using default npm version: 3.10.10 -----> Installing yarn 1.5.1 Download [https://buildpacks.cloudfoundry.org/dependencies/yarn/yarn-v1.5.1-cd316572.tar.gz] Installed yarn 1.5.1 -----> Creating runtime environment NODE_ENV=production NODE_HOME=/tmp/contents135652367/deps/0/node NODE_MODULES_CACHE=true NODE_VERBOSE=false NPM_CONFIG_LOGLEVEL=error NPM_CONFIG_PRODUCTION=true -----> Restoring cache Skipping cache restore (no previous cache) -----> Building dependencies Prebuild detected (node_modules already exists) Rebuilding any native modules agentkeepalive@2.0.5 /tmp/app/node_modules/agentkeepalive async@2.0.1 /tmp/app/node_modules/async lodash@4.17.4 /tmp/app/node_modules/lodash basic-auth@1.0.3 /tmp/app/node_modules/basic-auth commander@2.9.0 /tmp/app/node_modules/commander graceful-readlink@1.0.1 /tmp/app/node_modules/graceful-readlink compression@1.6.0 /tmp/app/node_modules/compression accepts@1.3.3 /tmp/app/node_modules/accepts negotiator@0.6.1 /tmp/app/node_modules/negotiator mime-types@2.1.16 /tmp/app/node_modules/mime-types mime-db@1.29.0 /tmp/app/node_modules/mime-db compressible@2.0.11 /tmp/app/node_modules/compressible vary@1.1.1 /tmp/app/node_modules/vary bytes@2.1.0 /tmp/app/node_modules/bytes on-headers@1.0.1 /tmp/app/node_modules/on-headers debug@2.2.0 /tmp/app/node_modules/compression/node_modules/debug ms@0.7.1 /tmp/app/node_modules/compression/node_modules/ms connect@3.6.2 /tmp/app/node_modules/connect debug@2.6.7 /tmp/app/node_modules/debug ms@2.0.0 /tmp/app/node_modules/ms finalhandler@1.0.3 /tmp/app/node_modules/finalhandler parseurl@1.3.1 /tmp/app/node_modules/parseurl escape-html@1.0.3 /tmp/app/node_modules/escape-html encodeurl@1.0.1 /tmp/app/node_modules/encodeurl unpipe@1.0.0 /tmp/app/node_modules/unpipe on-finished@2.3.0 /tmp/app/node_modules/on-finished ee-first@1.1.1 /tmp/app/node_modules/ee-first statuses@1.3.1 /tmp/app/node_modules/statuses utils-merge@1.0.0 /tmp/app/node_modules/utils-merge cookie@0.2.2 /tmp/app/node_modules/cookie cookie-parser@1.3.5 /tmp/app/node_modules/cookie-parser cookie-signature@1.0.6 /tmp/app/node_modules/cookie-signature cookie@0.1.3 /tmp/app/node_modules/cookie-parser/node_modules/cookie express-session@1.15.3 /tmp/app/node_modules/express-session depd@1.1.1 /tmp/app/node_modules/depd uid-safe@2.1.4 /tmp/app/node_modules/express-session/node_modules/uid-safe random-bytes@1.0.0 /tmp/app/node_modules/random-bytes crc@3.4.4 /tmp/app/node_modules/crc cookie@0.3.1 /tmp/app/node_modules/express-session/node_modules/cookie http-proxy-agent@1.0.0 /tmp/app/node_modules/http-proxy-agent agent-base@2.1.1 /tmp/app/node_modules/agent-base semver@5.0.3 /tmp/app/node_modules/semver extend@3.0.1 /tmp/app/node_modules/extend https-proxy-agent@1.0.0 /tmp/app/node_modules/https-proxy-agent jwt-decode@2.0.1 /tmp/app/node_modules/jwt-decode lru-cache@4.0.0 /tmp/app/node_modules/lru-cache pseudomap@1.0.2 /tmp/app/node_modules/pseudomap yallist@2.1.2 /tmp/app/node_modules/yallist mustache@2.2.1 /tmp/app/node_modules/mustache passport@0.3.2 /tmp/app/node_modules/passport pause@0.0.1 /tmp/app/node_modules/pause passport-strategy@1.0.0 /tmp/app/node_modules/passport-strategy request@2.81.0 /tmp/app/node_modules/request performance-now@0.2.0 /tmp/app/node_modules/performance-now stringstream@0.0.5 /tmp/app/node_modules/stringstream aws4@1.6.0 /tmp/app/node_modules/aws4 uuid@3.1.0 /tmp/app/node_modules/uuid tunnel-agent@0.6.0 /tmp/app/node_modules/tunnel-agent safe-buffer@5.1.1 /tmp/app/node_modules/safe-buffer tough-cookie@2.3.1 /tmp/app/node_modules/tough-cookie is-typedarray@1.0.0 /tmp/app/node_modules/is-typedarray http-signature@1.1.1 /tmp/app/node_modules/http-signature sshpk@1.13.1 /tmp/app/node_modules/sshpk asn1@0.2.3 /tmp/app/node_modules/asn1 getpass@0.1.7 /tmp/app/node_modules/getpass assert-plus@1.0.0 /tmp/app/node_modules/assert-plus dashdash@1.14.1 /tmp/app/node_modules/dashdash assert-plus@0.2.0 /tmp/app/node_modules/http-signature/node_modules/assert-plus jsprim@1.4.0 /tmp/app/node_modules/jsprim json-schema@0.2.3 /tmp/app/node_modules/json-schema verror@1.3.6 /tmp/app/node_modules/jsprim/node_modules/verror extsprintf@1.0.2 /tmp/app/node_modules/jsprim/node_modules/extsprintf har-validator@4.2.1 /tmp/app/node_modules/har-validator har-schema@1.0.5 /tmp/app/node_modules/har-schema ajv@4.11.8 /tmp/app/node_modules/ajv co@4.6.0 /tmp/app/node_modules/co json-stable-stringify@1.0.1 /tmp/app/node_modules/json-stable-stringify jsonify@0.0.0 /tmp/app/node_modules/jsonify aws-sign2@0.6.0 /tmp/app/node_modules/aws-sign2 hawk@3.1.3 /tmp/app/node_modules/hawk sntp@1.0.9 /tmp/app/node_modules/sntp hoek@2.16.3 /tmp/app/node_modules/hoek boom@2.10.1 /tmp/app/node_modules/boom cryptiles@2.0.5 /tmp/app/node_modules/cryptiles qs@6.4.0 /tmp/app/node_modules/qs json-stringify-safe@5.0.1 /tmp/app/node_modules/json-stringify-safe caseless@0.12.0 /tmp/app/node_modules/caseless isstream@0.1.2 /tmp/app/node_modules/isstream form-data@2.1.4 /tmp/app/node_modules/form-data asynckit@0.4.0 /tmp/app/node_modules/asynckit combined-stream@1.0.5 /tmp/app/node_modules/combined-stream delayed-stream@1.0.0 /tmp/app/node_modules/delayed-stream oauth-sign@0.8.2 /tmp/app/node_modules/oauth-sign forever-agent@0.6.1 /tmp/app/node_modules/forever-agent request-stats@2.0.1 /tmp/app/node_modules/request-stats http-headers@3.0.1 /tmp/app/node_modules/http-headers next-line@1.1.0 /tmp/app/node_modules/next-line once@1.4.0 /tmp/app/node_modules/once wrappy@1.0.2 /tmp/app/node_modules/wrappy safe-regex@1.1.0 /tmp/app/node_modules/safe-regex ret@0.1.14 /tmp/app/node_modules/ret @sap/audit-logging@1.0.5 /tmp/app/node_modules/@sap/audit-logging moment@2.15.2 /tmp/app/node_modules/moment winston@1.1.2 /tmp/app/node_modules/winston eyes@0.1.8 /tmp/app/node_modules/eyes pkginfo@0.3.1 /tmp/app/node_modules/pkginfo colors@1.0.3 /tmp/app/node_modules/colors async@1.0.0 /tmp/app/node_modules/winston/node_modules/async stack-trace@0.0.10 /tmp/app/node_modules/stack-trace cycle@1.0.3 /tmp/app/node_modules/cycle @sap/e2e-trace@1.1.3 /tmp/app/node_modules/@sap/e2e-trace @sap/logging@3.0.0 /tmp/app/node_modules/@sap/logging lodash@4.13.1 /tmp/app/node_modules/@sap/logging/node_modules/lodash @sap/xsenv@1.2.7 /tmp/app/node_modules/@sap/xsenv verror@1.10.0 /tmp/app/node_modules/verror core-util-is@1.0.2 /tmp/app/node_modules/core-util-is extsprintf@1.3.0 /tmp/app/node_modules/extsprintf send@0.15.3 /tmp/app/node_modules/send range-parser@1.2.0 /tmp/app/node_modules/range-parser http-errors@1.6.1 /tmp/app/node_modules/http-errors inherits@2.0.3 /tmp/app/node_modules/inherits depd@1.1.0 /tmp/app/node_modules/http-errors/node_modules/depd setprototypeof@1.0.3 /tmp/app/node_modules/setprototypeof etag@1.8.0 /tmp/app/node_modules/etag mime@1.3.4 /tmp/app/node_modules/mime fresh@0.5.0 /tmp/app/node_modules/fresh destroy@1.0.4 /tmp/app/node_modules/destroy serve-static@1.12.3 /tmp/app/node_modules/serve-static tv4@1.2.7 /tmp/app/node_modules/tv4 urijs@1.16.1 /tmp/app/node_modules/urijs ws@1.1.4 /tmp/app/node_modules/ws ultron@1.0.2 /tmp/app/node_modules/ultron options@0.0.6 /tmp/app/node_modules/options base64-url@1.2.1 /tmp/app/node_modules/base64-url scmp@1.0.0 /tmp/app/node_modules/scmp uid-safe@2.0.0 /tmp/app/node_modules/uid-safe bcrypt-pbkdf@1.0.1 /tmp/app/node_modules/bcrypt-pbkdf tweetnacl@0.14.5 /tmp/app/node_modules/tweetnacl ecc-jsbn@0.1.1 /tmp/app/node_modules/ecc-jsbn jsbn@0.1.1 /tmp/app/node_modules/jsbn Installing any new modules (package.json) -----> Caching build Clearing previous node cache Saving 3 cacheDirectories (default): - .npm (nothing to cache) - .cache/yarn (nothing to cache) - bower_components (nothing to cache) Exit status 0 Uploading droplet, build artifacts cache... Uploading build artifacts cache... Uploading droplet... Uploaded build artifacts cache (14.3M) Uploaded droplet (17.6M) Uploading complete Cell 09aeff0a-17aa-40ac-aee3-dcf077acd6c9 stopping instance 6485e7e3-0b40-4db3-8880-dba968c55583 Cell 09aeff0a-17aa-40ac-aee3-dcf077acd6c9 destroying container for instance 6485e7e3-0b40-4db3-8880-dba968c55583 Cell 09aeff0a-17aa-40ac-aee3-dcf077acd6c9 successfully destroyed container for instance 6485e7e3-0b40-4db3-8880-dba968c55583

0 of 1 instances running, 1 starting 0 of 1 instances running, 1 crashed FAILED Error restarting application: Start unsuccessful

Can someone please help me?

Sankeerth
  • 249
  • 3
  • 12
  • 1
    Could you please post your manifest.yml file. However, please, omit sensitive data. – Daniel Kurzynski Apr 17 '18 at 14:09
  • Sure! I posted the manifest.yml file as an update for this question. – Sankeerth Apr 17 '18 at 14:24
  • 1
    Just to make sure: So you called the `cf push` command from the directory containing the posted `manifest.yml` file (mind the extension) as well as a directory named `approuter` which contains the `package.json` file? – Christoph Schubert Apr 18 '18 at 09:39
  • Yes, that's exactly what i did – Sankeerth Apr 18 '18 at 13:30
  • I also followed the [troubleshooting guide](https://docs.cloudfoundry.org/devguide/deploy-apps/troubleshoot-app-health.html) to resolve this issue. But the issue is not resolved. – Sankeerth Apr 18 '18 at 13:42
  • 2
    Can you also please show the package.json file itself and post your working directory structure as a screenshot. – Philipp Herzig Apr 19 '18 at 07:36
  • I updated the question with package.json file and screenshot for working directory structure. – Sankeerth Apr 19 '18 at 15:06
  • 1
    Very strange. Just tried it with your package.json and it works for me on the CF Trial Landscape. Further questions: 1) On which landscape is the AppRouter supposed to be deployed? 2) Could you please also share the content from the approuter directory in another screenshot? 3) Apparently you used the AppRouter from the SAP Service Marketplace. Did you do any modifications to it (e.g., npm install) except putting the xs-app.json there? – Philipp Herzig Apr 20 '18 at 08:59
  • 1) I am trying to deploy it to Cloud foundry Landscape. 2) updated the question with screenshot for approuter directory. 3) Yes, i downloaded the approuter from SAP Market place but i didn't make any changes except adding xs-app.json file. – Sankeerth Apr 20 '18 at 14:08
  • Could you please post the first few lines of the output from the cf push command. In particular, the path after "Uploading approuter... Uploading app files from: ..." would be interesting. Could you provide this as well. Thanks. – Philipp Herzig Apr 21 '18 at 15:16
  • I tried to deploy the approuter using the cf push command again, but this time it gave a different error. I updated the question with this error log and first few lines of output from cf push command. Please review. – Sankeerth Apr 23 '18 at 13:38
  • Ok, so you are now definitively uploading the correct directory, since the output says "Uploading app files from: ~\Desktop\favLocation\approuter". My hypothesis is that in the past something was wrong that uploaded a different directory, maybe favLocation instead of favLocation\approuter (e.g., wrong indentation in manifest.yml could easily lead to this). Now you got a different issue where I will answer separately. – Philipp Herzig Apr 24 '18 at 06:24

1 Answers1

0

The log message indicates that the the environment variable for the TENANT_HOST_PATTERN variable cannot be correctly parsed: ERR VError: environment-settings/tenantHostPattern: Format validation failed (regular expression must contain a capturing group).

Please specify a correct regular expression for the TENANT_HOST_PATTERN variable in manifest.yml such as approuter-(.*).cfapps.eu10.hana.ondemand.com (please note to replace the domain with the landscape that you are deploying to).

Alternatively, you may set the variable via cf set-env approuter TENANT_HOST_PATTERN 'approuter-(.*).cfapps.eu10.hana.ondemand.com' followed by a cf restage approuter command.

Philipp Herzig
  • 350
  • 6
  • 10