I have this error when i try run my script.
{ [Error: listen EADDRINUSE :::8000]
code: 'EADDRINUSE',
errno: 'EADDRINUSE',
syscall: 'listen',
address: '::',
port: 8000 }
Error: listen EADDRINUSE :::8000
at Object.exports._errnoException (util.js:890:11)
at exports._exceptionWithHostPort (util.js:913:20)
at Server._listen2 (net.js:1234:14)
at listen (net.js:1270:10)
at Server.listen (net.js:1366:5)
at Server.listen.Server.attach (/usr/lib/node_modules/socket.io/lib/index.js:216:9)
at Timeout._onTimeout (/var/www/html/Bot/site.js:618:29)
at tryOnTimeout (timers.js:224:11)
at Timer.listOnTimeout (timers.js:198:5)
Script.js around ~605 Line
function load() {
query('SET NAMES utf8');
query('SELECT `id` FROM `rolls` ORDER BY `id` DESC LIMIT 1', function(err, row) {
if((err) || (!row.length)) {
logger.error('Cant get number from the last game');
logger.debug(err);
process.exit(0);
return;
}
currentRollid = row[0].id;
logger.trace('Roll '+currentRollid);
});
loadHistory();
setTimeout(function() { io.listen(8080); }, 3000);
}
618 line is
setTimeout(function() { io.listen(8080); }, 3000);
How i can fix this ? I try change io.listen Port but its still dont work.