{"record":{"id":"59ec9d9c69d4aae5","repo":"JetBrains/intellij-community","slug":"build-process-no-free-debug-port","errorCode":"build.process.no.free.debug.port","errorMessage":"Cannot find free port to debug build process","messagePattern":"Cannot find free port to debug build process","errorType":"exception","errorClass":"ExecutionException","httpStatus":null,"severity":"error","filePath":"java/compiler/impl/src/com/intellij/compiler/server/BuildManager.java","lineNumber":1618,"sourceCode":"      }\n      else {\n        LOG.warn(\"Performance Plugin is missing or disabled; skipping YJP agent configuration\");\n        if (isAgentpathSet) {\n          showSnapshotNotificationAfterFinish(project);\n        }\n      }\n    }\n\n    // debugging\n    String debugPort = null;\n    if (myBuildProcessDebuggingEnabled) {\n      debugPort = StringUtil.nullize(Registry.stringValue(\"compiler.process.debug.port\"));\n      if (debugPort == null) {\n        try {\n          debugPort = String.valueOf(NetUtils.findAvailableSocketPort());\n        }\n        catch (IOException e) {\n          throw new ExecutionException(JavaCompilerBundle.message(\"build.process.no.free.debug.port\"), e);\n        }\n      }\n      cmdLine.addParameter(\"-XX:+HeapDumpOnOutOfMemoryError\");\n      // Both formats \"<host>:<port>\" and \"<port>\" are accepted.\n      // https://docs.oracle.com/en/java/javase/11/docs/specs/jpda/conninv.html#socket-transport\n      cmdLine.addParameter(\"-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=\" + debugPort);\n    }\n\n    // portable caches\n    if (RegistryManager.getInstance().is(\"compiler.process.use.portable.caches\") &&\n        CompilerCacheConfigurator.isServerUrlConfigured(project) &&\n        CompilerCacheStartupActivity.isLineEndingsConfiguredCorrectly()) {\n      cmdLine.addParameter(\"-D\" + ProjectStamps.PORTABLE_CACHES_PROPERTY + \"=true\");\n    }\n\n    // DepGraph-based IC implementation\n    if (AdvancedSettings.getBoolean(\"compiler.unified.ic.implementation\")) {\n      cmdLine.addParameter(\"-D\" + GlobalOptions.DEPENDENCY_GRAPH_ENABLED + \"=true\");","sourceCodeStart":1600,"sourceCodeEnd":1636,"githubUrl":"https://github.com/JetBrains/intellij-community/blob/be881553f2a76ac8b4ea53950d93f0de78295c19/java/compiler/impl/src/com/intellij/compiler/server/BuildManager.java#L1600-L1636","documentation":"Error \"Cannot find free port to debug build process\" thrown in JetBrains/intellij-community.","triggerScenarios":"Debug of the build process is requested but no free loopback port can be bound.","commonSituations":"Port exhaustion from many stale build processes, or security software blocking local socket binding.","solutions":["Close processes occupying local ports or restart the IDE to release leaked debug ports.","If a firewall restricts local ports, allow loopback connections for the IDE."],"exampleFix":"On Linux: ss -ltnp to find the process holding ports, stop it, then retry Build | Build Project.","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"be881553f2a76ac8b4ea53950d93f0de78295c19","analyzedAt":"2026-08-14T14:13:06.425Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}