pentaho/pentaho-kettle · error · KettleException

GPG.ExceptionWait

Error message

GPG.ExceptionWait

What it means

KettleException with key GPG.ExceptionWait is thrown by GPG.execGnuPG when p.waitFor() or joining the stdout/stderr reader threads is interrupted (InterruptedException). The GPG entry runs gpg asynchronously and blocks waiting for completion; if the executing thread (e.g. a Kettle job thread being cancelled/stopped) is interrupted, the wait is aborted and this exception wraps the interrupt.

Solutions

  1. Avoid stopping the job mid-GPG operation, or accept that cancellation surfaces as this exception.
  2. Increase any watchdog/timeout so gpg has time to finish large encrypt/sign operations.
  3. Catch KettleException, check the cause is InterruptedException, and restore the interrupt flag (Thread.currentThread().interrupt()) if rethrowing is not desired.
  4. Investigate which component interrupts the thread (job executor, scheduler, shutdown).

Example fix

// before
} catch ( KettleException ke ) {
  logError( ke.getMessage() );
}
// after
} catch ( KettleException ke ) {
  if ( ke.getCause() instanceof InterruptedException ) {
    Thread.currentThread().interrupt();
  }
  logError( ke.getMessage() );
}
Defensive patterns

Strategy: retry

Try / catch

try {
  gpg.encryptFile(file, userId, destFile, true);
} catch (KettleException ke) {
  if (ke.getCause() instanceof InterruptedException) {
    Thread.currentThread().interrupt(); // restore flag, do not blindly retry
  }
}

Prevention

When it happens

Trigger: Calling any of decryptFile, encryptFile, signAndEncryptFile, signFile, verifySignature, or verifyDetachedSignature while the running thread receives an interrupt during p.waitFor() or psr_stdout.join()/psr_stderr.join().

Common situations: User stops/cancels a Kettle job or transformation; JVM shutdown hooks interrupt worker threads; a timeout watchdog interrupts long-running gpg operations on very large files.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/0eaa3e80334f0419. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/job/entries/pgpencryptfiles/GPG.java:214

        throw new KettleException( BaseMessages.getString( PKG, "GPG.ExceptionWrite" ), io );
      } finally {
        if ( out != null ) {
          try {
            out.close();
          } catch ( Exception e ) {
            // Ignore
          }
        }
      }
    }

    try {
      p.waitFor();

      psr_stdout.join();
      psr_stderr.join();
    } catch ( InterruptedException i ) {
      throw new KettleException( BaseMessages.getString( PKG, "GPG.ExceptionWait" ), i );
    }

    try {
      if ( p.exitValue() != 0 ) {
        throw new KettleException( BaseMessages.getString( PKG, "GPG.Exception.ExistStatus", psr_stderr
          .getString() ) );
      }
    } catch ( IllegalThreadStateException itse ) {
      throw new KettleException( BaseMessages.getString( PKG, "GPG.ExceptionillegalThreadStateException" ), itse );
    } finally {
      p.destroy();
    }

    retval = psr_stdout.getString();

    return retval;

  }

View on GitHub (pinned to f3058517a1)