pentaho/pentaho-kettle · error · FTPException

JobEntryFTPDelete.SocksProxy.PortMissingException

JobEntryFTPDelete.SocksProxy.PortMissingException

Error message

JobEntryFTPDelete.SocksProxy.PortMissingException

What it means

During execute(), if the FTP protocol is used and a SOCKS proxy host is configured, a non-empty port is required to call FTPClient.initSOCKS. When socksProxyPort is empty the entry throws FTPException with the localized message key JobEntryFTPDelete.SocksProxy.PortMissingException, naming the substituted host and entry name.

Solutions

  1. Set the SOCKS proxy port in the job entry dialog
  2. Define the variable used in the port field so environmentSubstitute yields a value
  3. If no SOCKS proxy is needed, clear the SOCKS host field entirely
  4. Validate host+port pairing in a pre-execution check

Example fix

// before
socksProxyHost = "socks.corp.com";
socksProxyPort = ""; // throws at execute
// after
socksProxyHost = "socks.corp.com";
socksProxyPort = "1080";
Defensive patterns

Strategy: validation

Validate before calling

String port = environmentSubstitute( socksProxyPort );
if ( !Utils.isEmpty( socksProxyHost ) && Utils.isEmpty( port ) ) {
  throw new FTPException( "SOCKS proxy host is set but port is missing for entry " + getName() );
}

Try / catch

try { jobEntry.execute( result, 0 ); }
catch ( FTPException fe ) {
  if ( String.valueOf( fe.getMessage() ).contains( "PortMissingException" ) ) {
    log.error( "Set SOCKS port or clear SOCKS host in the job entry" );
  }
}

Prevention

When it happens

Trigger: protocol==FTP, socksProxyHost non-empty, and socksProxyPort empty/null at execute time (variables in the port field resolve to empty).

Common situations: User filled in SOCKS host but left port blank; port stored as a ${VAR} whose variable is undefined; entry loaded from an older definition lacking the port attribute.

Understand the failure class

Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.

Related errors


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

Appendix: source

Thrown at plugins/ftp-delete/impl/src/main/java/org/pentaho/di/job/entries/ftpdelete/JobEntryFTPDelete.java:751

      result.setResult( true );
      return result;
    }

    try {

      // Get all the files in the current directory...
      String[] filelist = null;
      if ( copyprevious ) {
        realFtpDirectory = "";
      }
      int timeoutValue = Const.toInt( environmentSubstitute( timeout ), 10000 );
      if ( protocol.equals( PROTOCOL_FTP ) ) {
        // If socks proxy server was provided
        if ( !Utils.isEmpty( socksProxyHost ) ) {
          if ( !Utils.isEmpty( socksProxyPort ) ) {
            FTPClient.initSOCKS( environmentSubstitute( socksProxyPort ), environmentSubstitute( socksProxyHost ) );
          } else {
            throw new FTPException( BaseMessages.getString(
              PKG, "JobEntryFTPDelete.SocksProxy.PortMissingException", environmentSubstitute( socksProxyHost ),
              getName() ) );
          }
          // then if we have authentication information
          if ( !Utils.isEmpty( socksProxyUsername ) && !Utils.isEmpty( socksProxyPassword ) ) {
            FTPClient.initSOCKSAuthentication(
              environmentSubstitute( socksProxyUsername ), Utils.resolvePassword( this, socksProxyPassword ) );
          } else if ( !Utils.isEmpty( socksProxyUsername )
            && Utils.isEmpty( socksProxyPassword ) || Utils.isEmpty( socksProxyUsername )
            && !Utils.isEmpty( socksProxyPassword ) ) {
            // we have a username without a password or vica versa
            throw new FTPException( BaseMessages.getString(
              PKG, "JobEntryFTPDelete.SocksProxy.IncompleteCredentials",
              environmentSubstitute( socksProxyHost ), getName() ) );
          }
        }

        if ( copyprevious ) {

View on GitHub (pinned to f3058517a1)