JetBrains/intellij-community · error · ExecutionException

build.process.no.free.debug.port

build.process.no.free.debug.port

Error message

Cannot find free port to debug build process

What it means

Error "Cannot find free port to debug build process" thrown in JetBrains/intellij-community.

Source

Thrown at java/compiler/impl/src/com/intellij/compiler/server/BuildManager.java:1618

      }
      else {
        LOG.warn("Performance Plugin is missing or disabled; skipping YJP agent configuration");
        if (isAgentpathSet) {
          showSnapshotNotificationAfterFinish(project);
        }
      }
    }

    // debugging
    String debugPort = null;
    if (myBuildProcessDebuggingEnabled) {
      debugPort = StringUtil.nullize(Registry.stringValue("compiler.process.debug.port"));
      if (debugPort == null) {
        try {
          debugPort = String.valueOf(NetUtils.findAvailableSocketPort());
        }
        catch (IOException e) {
          throw new ExecutionException(JavaCompilerBundle.message("build.process.no.free.debug.port"), e);
        }
      }
      cmdLine.addParameter("-XX:+HeapDumpOnOutOfMemoryError");
      // Both formats "<host>:<port>" and "<port>" are accepted.
      // https://docs.oracle.com/en/java/javase/11/docs/specs/jpda/conninv.html#socket-transport
      cmdLine.addParameter("-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=" + debugPort);
    }

    // portable caches
    if (RegistryManager.getInstance().is("compiler.process.use.portable.caches") &&
        CompilerCacheConfigurator.isServerUrlConfigured(project) &&
        CompilerCacheStartupActivity.isLineEndingsConfiguredCorrectly()) {
      cmdLine.addParameter("-D" + ProjectStamps.PORTABLE_CACHES_PROPERTY + "=true");
    }

    // DepGraph-based IC implementation
    if (AdvancedSettings.getBoolean("compiler.unified.ic.implementation")) {
      cmdLine.addParameter("-D" + GlobalOptions.DEPENDENCY_GRAPH_ENABLED + "=true");

View on GitHub (pinned to be881553f2)

Solutions

  1. Close processes occupying local ports or restart the IDE to release leaked debug ports.
  2. If a firewall restricts local ports, allow loopback connections for the IDE.

Example fix

On Linux: ss -ltnp to find the process holding ports, stop it, then retry Build | Build Project.

When it happens

Trigger: Debug of the build process is requested but no free loopback port can be bound.

Common situations: Port exhaustion from many stale build processes, or security software blocking local socket binding.


AI-assisted analysis of JetBrains/intellij-community@be881553f2 (2026-08-14). Data as JSON: /api/errors/59ec9d9c69d4aae5. Report an issue: GitHub.