{"record":{"id":"b045f323e0a69047","repo":"vercel/next.js","slug":"port-originalport-is-in-use-by-an-unknown-proce","errorCode":null,"errorMessage":"Port ${originalPort} is in use by an unknown process, using available port ${port} instead.","messagePattern":"Port (.+?) is in use by an unknown process, using available port (.+?) instead\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/next/src/server/lib/start-server.ts","lineNumber":343,"sourceCode":"          : addr\n      )\n      const formattedHostname =\n        !hostname || actualHostname === '0.0.0.0'\n          ? 'localhost'\n          : actualHostname === '[::]'\n            ? '[::1]'\n            : formatHostname(hostname)\n\n      port = typeof addr === 'object' ? addr?.port || port : port\n\n      if (portRetryCount) {\n        const pid = await getProcessIdUsingPort(originalPort)\n        if (pid) {\n          Log.warn(\n            `Port ${originalPort} is in use by process ${pid}, using available port ${port} instead.`\n          )\n        } else {\n          Log.warn(\n            `Port ${originalPort} is in use by an unknown process, using available port ${port} instead.`\n          )\n        }\n      }\n\n      const networkHostname =\n        hostname ?? getNetworkHost(isIPv6(actualHostname) ? 'IPv6' : 'IPv4')\n\n      const protocol = selfSignedCertificate ? 'https' : 'http'\n\n      const networkUrl = networkHostname\n        ? `${protocol}://${formatHostname(networkHostname)}:${port}`\n        : null\n\n      const appUrl = `${protocol}://${formattedHostname}:${port}`\n\n      // Store the selected port to:\n      // - expose it to render workers","sourceCodeStart":325,"sourceCodeEnd":361,"githubUrl":"https://github.com/vercel/next.js/blob/89d017eac43ebf4742ed2b58d3c1373b70283b69/packages/next/src/server/lib/start-server.ts#L325-L361","documentation":"Warning from startServer's listening handler when port retrying was enabled: the original port is in use but getProcessIdUsingPort could not identify an owning pid (e.g. a process outside the user's visibility or a race). The server nevertheless fell back to an available port and reports the substitution.","triggerScenarios":"Thrown at packages/next/src/server/lib/start-server.ts:343 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Free the original port (kill the owning process) if you need the server on that exact port."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"89d017eac43ebf4742ed2b58d3c1373b70283b69","analyzedAt":"2026-08-19T02:10:13.922Z","contentChangedAt":"2026-08-19T02:10:13.922Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}