apache/hadoop · error · RuntimeException

Bad SOCKS proxy parameter: {}

Error message

Bad SOCKS proxy parameter: {}

What it means

Error "Bad SOCKS proxy parameter: {}" thrown in apache/hadoop.

Source

Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/SocksSocketFactory.java:153

  @Override
  public void setConf(Configuration conf) {
    this.conf = conf;
    String proxyStr = conf.get(HADOOP_SOCKS_SERVER_KEY);
    if ((proxyStr != null) && (proxyStr.length() > 0)) {
      setProxy(proxyStr);
    }
  }

  /**
   * Set the proxy of this socket factory as described in the string
   * parameter
   * 
   * @param proxyStr the proxy address using the format "host:port"
   */
  private void setProxy(String proxyStr) {
    String[] strs = proxyStr.split(":", 2);
    if (strs.length != 2)
      throw new RuntimeException("Bad SOCKS proxy parameter: " + proxyStr);
    String host = strs[0];
    int port = Integer.parseInt(strs[1]);
    this.proxy =
        new Proxy(Proxy.Type.SOCKS, InetSocketAddress.createUnresolved(host,
            port));
  }
}

View on GitHub (pinned to 2add963021)

Solutions

  1. Check the SOCKS proxy configuration (host and port) passed to the socket factory; the proxy address must be a valid, resolvable host:port.
  2. Verify hadoop rpc socket factory / proxy settings in the configuration are well-formed.
  3. Ensure the proxy server is reachable and not requiring authentication the client did not supply.

When it happens

Trigger: Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/SocksSocketFactory.java:153 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22). Data as JSON: /api/errors/bc1652bd88e4102c. Report an issue: GitHub.