Zied Yazidi
Zied Yazidi

Reputation: 505

Continuous Deployment of Nodejs App on Azure

I'm new at NodeJs development, i'm trying to deploy my App on Azure but i'm facing some problems. This is the problem

events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRINUSE \\.\pipe\5799b955-24fe-43fb-abe5-344be4ce5640
    at Object.exports._errnoException (util.js:873:11)
    at exports._exceptionWithHostPort (util.js:896:20)
    at Server._listen2 (net.js:1237:19)
    at listen (net.js:1286:10)
    at Server.listen (net.js:1376:5)
    at Object.<anonymous> (D:\home\site\wwwroot\app.js:95:7)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)

npm ERR! Windows_NT 6.2.9200
npm ERR! argv "D:\\Program Files (x86)\\nodejs\\4.4.7\\node.exe" "D:\\Program Files (x86)\\npm\\2.15.8\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v4.4.7
npm ERR! npm  v2.15.8
npm ERR! code ELIFECYCLE
npm ERR! NodejsWebApp1@0.0.0 start: `node app.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the NodejsWebApp1@0.0.0 start script 'node app.js'.
npm ERR! This is most likely a problem with the NodejsWebApp1 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node app.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs NodejsWebApp1
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! 
npm ERR!     npm owner ls NodejsWebApp1
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     D:\home\site\wwwroot\npm-debug.log

Does anyone know how to solve this problem ? Thank You

Upvotes: 0

Views: 330

Answers (2)

Aaron Chen
Aaron Chen

Reputation: 9950

You should use process.env.PORT for handling the named pipe port in Azure App Service, see Listen additional port Microsoft Azure Nodejs.

Upvotes: 2

Felix Fong
Felix Fong

Reputation: 985

According to How to fix Error: listen EADDRINUSE while using nodejs? , the problem is your app are listen to a prot that already exist, and I suggest you to changing your port

Upvotes: 0

Related Questions