apache/beam · error

Attempt # of failed

Error message

Attempt #{} of {} failed

What it means

WARN logged by IOITHelper.executeWithRetry when an invocation of the wrapped function throws and attempts remain. It is part of an exponential-backoff retry loop for integration-test infrastructure setup (e.g. waiting for a database to accept connections); the exception is attached to the log so the transient failure cause is visible while retrying continues.

Solutions

  1. Transient infra failures: rely on the retry loop with sufficient maxAttempts and minDelay
  2. If failures persist, fix the underlying infrastructure issue (service not up, wrong credentials)
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at sdks/java/io/common/src/main/java/org/apache/beam/sdk/io/common/IOITHelper.java:89 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of apache/beam@12126d8942 (2026-09-13). Data as JSON: /api/errors/95230636fd77bdaa. Report an issue: GitHub.

Appendix: source

Thrown at sdks/java/io/common/src/main/java/org/apache/beam/sdk/io/common/IOITHelper.java:89

   * an exception is thrown and it does not depend on the error response. This can be used for tests
   * which await for infrastructure setup i.e. database connection.
   *
   * @param maxAttempts The number of retry attempts
   * @param minDelay Minimal delay which will grow exponentially
   * @param function The function to retry
   * @throws Exception
   */
  public static void executeWithRetry(int maxAttempts, long minDelay, RetryFunction function)
      throws Exception {
    int attempts = 1;
    long delay = minDelay;

    while (attempts <= maxAttempts) {
      try {
        function.run();
        return;
      } catch (Exception e) {
        LOG.warn("Attempt #{} of {} failed", attempts, maxAttempts, e);
        if (attempts == maxAttempts) {
          throw e;
        } else {
          long nextDelay = (long) Math.pow(2, attempts) * delay;
          LOG.warn("Retrying in {} ms.", nextDelay);
          Thread.sleep(nextDelay);
        }
        attempts++;
      }
    }
  }
}

View on GitHub (pinned to 12126d8942)