balderdashy/sails · error
E_PORT_BUSY
E_PORT_BUSY
Error message
Trying to start server on port ' + sails.config.port + ' but can't...Something else is probably running on that port!\nPlease disable the other server, or choose a different port and try again.
What it means
Error "Trying to start server on port ' + sails.config.port + ' but can't...Something else is probably running on that port!\nPlease disable the other server, or choose a different port and try again." thrown in balderdashy/sails.
Source
Thrown at lib/hooks/http/start.js:155
process.exit(1);
// TODO: For a more graceful shutdown, we should instead consider:
// return next(new Error('blah blah'));
});
}//</failedToStart>
},
verify: ['start', function (results, next) {
var explicitHost = sails.config.explicitHost;
// Check for port conflicts
// Ignore this check if explicit host is set, since other more complicated things might be going on.
if( !explicitHost && !sails.hooks.http.server.address() ) {
var portBusyErrorMsg = '';
portBusyErrorMsg += 'Trying to start server on port ' + sails.config.port + ' but can\'t...';
portBusyErrorMsg += 'Something else is probably running on that port!' + '\n';
portBusyErrorMsg += 'Please disable the other server, or choose a different port and try again.';
sails.log.error(portBusyErrorMsg);
throw flaverr({ name: 'userError', code: 'E_PORT_BUSY' }, new Error(portBusyErrorMsg));
// TODO: For a more graceful shutdown, we should instead consider:
// return next(new Error(portBusyErrorMsg));
}
next();
}]
}, function expressListening (err) {
clearTimeout(liftAbortTimer);
if (err) { return cb(err); }
// Announce that express is now listening on a port
sails.emit('hook:http:listening');
return cb();
});
};
};View on GitHub (pinned to 7b76422cc2)
When it happens
Trigger: Thrown at lib/hooks/http/start.js:155 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of balderdashy/sails@7b76422cc2 (2026-09-01).
Data as JSON: /api/errors/3a0a0f8d800a12a6.
Report an issue: GitHub.