apache/hadoop · error · IOException

Connection pool error.

Error message

Connection pool error.

What it means

Error "Connection pool error." thrown in apache/hadoop.

Source

Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/sftp/SFTPConnectionPool.java:66

  private HashMap<ChannelSftp, ConnectionInfo> con2infoMap =
      new HashMap<ChannelSftp, ConnectionInfo>();

  SFTPConnectionPool(int maxConnection) {
    this.maxConnection = maxConnection;
  }

  synchronized ChannelSftp getFromPool(ConnectionInfo info) throws IOException {
    Set<ChannelSftp> cons = idleConnections.get(info);
    ChannelSftp channel;

    if (cons != null && cons.size() > 0) {
      Iterator<ChannelSftp> it = cons.iterator();
      if (it.hasNext()) {
        channel = it.next();
        idleConnections.remove(info);
        return channel;
      } else {
        throw new IOException("Connection pool error.");
      }
    }
    return null;
  }

  /** Add the channel into pool.
   * @param channel
   */
  synchronized void returnToPool(ChannelSftp channel) {
    ConnectionInfo info = con2infoMap.get(channel);
    HashSet<ChannelSftp> cons = idleConnections.get(info);
    if (cons == null) {
      cons = new HashSet<>();
      idleConnections.put(info, cons);
    }
    cons.add(channel);

  }

View on GitHub (pinned to 2add963021)

Solutions

  1. Check SFTP server reachability and credentials; the connection pool failed to provide a session.
  2. Increase pool capacity or fix the underlying connection error reported in the cause.

When it happens

Trigger: Thrown by SFTPConnectionPool when it fails to borrow or return a connection from the pool, e.g. pool exhaustion or an interrupted wait.

Common situations: See trigger scenarios.


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