alexa-js / alexa-app-server

An Alexa app server for alexa-app.
MIT License
401 stars 116 forks source link

EADDRINUSE on any port. #101

Closed staminna closed 6 years ago

staminna commented 6 years ago

Hi

I am running a instance of alexa-app-server but I get EADDRINUSE on every port I choose. I completely restarted macos and did netstat and lsof on those ports and nothing is using them.

listening on http://127.0.0.1:8080 events.js:141 throw er; // Unhandled 'error' event ^

Error: listen EADDRINUSE :::8080
    at Object.exports._errnoException (util.js:907:11)
    at exports._exceptionWithHostPort (util.js:930:20)
    at Server._listen2 (net.js:1250:14)
    at listen (net.js:1286:10)
    at Server.listen (net.js:1382:5)
    at EventEmitter.listen (/Users/jorge/node_modules/alexa-app-server/node_modules/express/lib/application.js:617:24)
    at Object.self.start (/Users/jorge/node_modules/alexa-app-server/index.js:262:38)
    at Object.<anonymous> (/Users/jorge/webapp/alexa/alexa_server/server.js:11:10)
    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)
    at Function.Module.runMain (module.js:441:10)
    at startup (node.js:140:18)
    at node.js:1043:3

Installing alexa from npm it installed globally, even without npm -g. Nothing was on the current directory so I had to git clone to get all the project files. If I uninstall from the global node repository packages, and run npm install from package.json then it says it can't find the necessary alexa-app-server.

I did even try to run as sudo and set debug option to true, but nothing helped.

staminna commented 6 years ago

I am closing this. I was confused with the example documentation and I was trying to open up the server twice.

fwcd commented 6 years ago

Actually, I've had the exact same problem and this was the only working solution. Had not realized either that I was calling start twice somehow. Thank you!