cancel
Showing results for 
Search instead for 
Did you mean: 

SAP HANA 2.0 SPS05 XSA - "xs push app" --> ECONNREFUSED 155.56.96.30:443 /https://npm.sap.com

draschke
Active Contributor
0 Kudos
519

Hi Experts,

I try to push an app to our XSA system, but it fails. It looks like a proxy-issue. But I don't understand, why the system always tries to request https://npm.sap.com/@sap%2fhdi-deploy, although I've changed the upstream link and restaged, restarted the the npm-registry-service more times.

Any idea? Maybe I missed a step.

The set up (proxy) for our WebIDE is fine, we don't have any trouble with the proxy.

this is what we use and would expect in the error msg:
UPSTREAM_LINK: http://registry.npmjs.org/
SAPUPSTREAM_LINK: https://registry.npmjs.org
xs unbind-service di-local-npm-registry devx-npm-cache-fs
xs delete-service -f devx-npm-cache-fs
xs create-service fs-storage free devx-npm-cache-fs
xs bind-service  di-local-npm-registry devx-npm-cache-fs

xs restage di-local-npm-registry
xs restart di-local-npm-registry
Uploading "db" ...
 Checking which files to upload from /workspaces/vsc-sap-hana-mta-dev-env-node12x/XSA/myxsaapp2/db ...
 -> "db" consists of 5 files.      
 Uploading 0 new or modified files (0 B) ...
 Uploading "db" finished in 591 ms.


Staging app "db"...
   OUT   Node.js
   OUT   Node.js buildpack version 4.2.0
   OUT   Available Node.js runtimes: node10.15,node12.18,node12.20,node10.22,node6.15,node8.15
   OUT   Using Node.js version: 10.22.0.0
   OUT   Downloading Node.js...
   OUT   Unpacking Node.js archive...
   OUT   Installing npm modules...
   ERR   Execution of bin/compile failed (exit value 1)
   ERR   Failed to stage app 'db' [Org 'orgname', Space 'DEV']: Execution of bin/compile failed (exit value 1).
   ERR   npm ERR! code ECONNREFUSED
   ERR   npm ERR! errno ECONNREFUSED
   ERR   npm ERR! FetchError: request to https://npm.sap.com/@sap%2fhdi-deploy failed, reason: connect ECONNREFUSED 155.56.96.30:443
   ERR   npm ERR!     at ClientRequest.req.on.err
         (/hana/shared/xxx/xs/app_working/stager/stager-tbqxsa/work/d247163c-6c93-4843-a982-e8d4e187febc-28/droplet/app/vendor/node10.22/lib/node_modules/npm/no         de_modules/node-fetch-npm/src/index.js:68:14)
   ERR   npm ERR!     at ClientRequest.emit (events.js:198:13)
   ERR   npm ERR!     at TLSSocket.socketErrorListener (_http_client.js:401:9)
   ERR   npm ERR!     at TLSSocket.emit (events.js:198:13)
   ERR   npm ERR!     at emitErrorNT (internal/streams/destroy.js:91:8)
   ERR   npm ERR!     at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
   ERR   npm ERR!     at process._tickCallback (internal/process/next_tick.js:63:19)
   ERR   npm ERR!  { FetchError: request to https://npm.sap.com/@sap%2fhdi-deploy failed, reason: connect ECONNREFUSED 155.56.96.30:443
   ERR   npm ERR!     at ClientRequest.req.on.err
         (/hana/shared/xxx/xs/app_working/stager/stager-tbqxsa/work/d247163c-6c93-4843-a982-e8d4e187febc-28/droplet/app/vendor/node10.22/lib/node_modules/npm/no         de_modules/node-fetch-npm/src/index.js:68:14)
   ERR   npm ERR!     at ClientRequest.emit (events.js:198:13)
   ERR   npm ERR!     at TLSSocket.socketErrorListener (_http_client.js:401:9)
   ERR   npm ERR!     at TLSSocket.emit (events.js:198:13)
   ERR   npm ERR!     at emitErrorNT (internal/streams/destroy.js:91:8)
   ERR   npm ERR!     at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
   ERR   npm ERR!     at process._tickCallback (internal/process/next_tick.js:63:19)
   ERR   npm ERR!   message:
   ERR   npm ERR!    'request to https://npm.sap.com/@sap%2fhdi-deploy failed, reason: connect ECONNREFUSED 155.56.96.30:443',
   ERR   npm ERR!   type: 'system',
   ERR   npm ERR!   errno: 'ECONNREFUSED',
   ERR   npm ERR!   code: 'ECONNREFUSED',
   ERR   npm ERR!   stack:
   ERR   npm ERR!    'FetchError: request to https://npm.sap.com/@sap%2fhdi-deploy failed, reason: connect ECONNREFUSED 155.56.96.30:443\n    at
         ClientRequest.req.on.err
         (/hana/shared/xxx/xs/app_working/stager/stager-tbqxsa/work/d247163c-6c93-4843-a982-e8d4e187febc-28/droplet/app/vendor/node10.22/lib/node_modules/npm/no         de_modules/node-fetch-npm/src/index.js:68:14)\n    at ClientRequest.emit (events.js:198:13)\n    at TLSSocket.socketErrorListener
         (_http_client.js:401:9)\n    at TLSSocket.emit (events.js:198:13)\n    at emitErrorNT (internal/streams/destroy.js:91:8)\n    at emitErrorAndCloseNT
         (internal/streams/destroy.js:59:3)\n    at process._tickCallback (internal/process/next_tick.js:63:19)',
   ERR   npm ERR!   parent: 'app' }
   ERR   npm ERR! 
   ERR   npm ERR! If you are behind a proxy, please make sure that the
   ERR   npm ERR! 'proxy' config is set properly.  See: 'npm help config'
   ERR   
   ERR   npm ERR! A complete log of this run can be found in:
   ERR   npm ERR!    
         /hana/shared/xxx/xs/app_working/stager/stager-tbqxsa/work/d247163c-6c93-4843-a982-e8d4e187febc-28/droplet/npm_cache/_logs/2021-09-05T15_24_56_200Z-debu         g.log
   ERR   Error: Command failed:
         "/hana/shared/TBQ/xs/app_working/stager/stager-tbqxsa/work/d247163c-6c93-4843-a982-e8d4e187febc-28/droplet/app/vendor/node10.22/bin/npm" install
         --production
   ERR   Error: Command failed:
         "/hana/shared/xxx/xs/app_working/stager/stager-tbqxsa/work/d247163c-6c93-4843-a982-e8d4e187febc-28/droplet/app/vendor/node10.22/bin/npm" install
         --production
   ERR       at checkExecSyncError (child_process.js:629:11)
   ERR       at Object.execSync (child_process.js:666:13)
   ERR       at execSync (/hana/shared/xxx/xs/app_working/stager/stager-tbqxsa/cache/ba6b9570-00e0-4e3a-b55e-01946db5d6e2/lib/utils.js:19:16)
   ERR       at Object.exports.npmInstall (/hana/shared/TBQ/xs/app_working/stager/stager-tbqxsa/cache/ba6b9570-00e0-4e3a-b55e-01946db5d6e2/lib/utils.js:152:5)
   ERR       at main (/hana/shared/xxx/xs/app_working/stager/stager-tbqxsa/cache/ba6b9570-00e0-4e3a-b55e-01946db5d6e2/lib/compile.js:45:9)
   ERR       at main.next (<anonymous>)
   ERR       at onFulfilled (/hana/shared/xxx/xs/app_working/stager/stager-tbqxsa/cache/ba6b9570-00e0-4e3a-b55e-01946db5d6e2/node_modules/co/index.js:65:19)
   ERR       at process._tickCallback (internal/process/next_tick.js:68:7)
FAILED: Staging app "db" failed!
View Entire Topic
draschke
Active Contributor
0 Kudos

Okay, I think I got it solved. I guess you need to install the npm in the db module locally before you push the app to the XSA. Maybe one of the experts can confirm that. Thanks!

After doing this everything worked fine in my case.