{"record":{"id":"3a0a0f8d800a12a6","repo":"balderdashy/sails","slug":"e-port-busy","errorCode":"E_PORT_BUSY","errorMessage":"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.","messagePattern":"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\\.","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/hooks/http/start.js","lineNumber":155,"sourceCode":"            process.exit(1);\n            // TODO: For a more graceful shutdown, we should instead consider:\n            // return next(new Error('blah blah'));\n          });\n        }//</failedToStart>\n      },\n\n      verify: ['start', function (results, next) {\n        var explicitHost = sails.config.explicitHost;\n\n        // Check for port conflicts\n        // Ignore this check if explicit host is set, since other more complicated things might be going on.\n        if( !explicitHost && !sails.hooks.http.server.address() ) {\n          var portBusyErrorMsg = '';\n          portBusyErrorMsg += 'Trying to start server on port ' + sails.config.port + ' but can\\'t...';\n          portBusyErrorMsg += 'Something else is probably running on that port!' + '\\n';\n          portBusyErrorMsg += 'Please disable the other server, or choose a different port and try again.';\n          sails.log.error(portBusyErrorMsg);\n          throw flaverr({ name: 'userError', code: 'E_PORT_BUSY' }, new Error(portBusyErrorMsg));\n          // TODO: For a more graceful shutdown, we should instead consider:\n          // return next(new Error(portBusyErrorMsg));\n        }\n\n        next();\n      }]\n\n    }, function expressListening (err) {\n      clearTimeout(liftAbortTimer);\n      if (err) { return cb(err); }\n\n      // Announce that express is now listening on a port\n      sails.emit('hook:http:listening');\n      return cb();\n    });\n  };\n\n};","sourceCodeStart":137,"sourceCodeEnd":173,"githubUrl":"https://github.com/balderdashy/sails/blob/7b76422cc27823df033572bdda5c4910a68b697f/lib/hooks/http/start.js#L137-L173","documentation":"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.","triggerScenarios":"Thrown at lib/hooks/http/start.js:155 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7b76422cc27823df033572bdda5c4910a68b697f","analyzedAt":"2026-09-01T04:01:57.104Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}