pentaho/pentaho-kettle · error · RuntimeException

A server socket allocation always has to accompanied by a…

Error message

A server socket allocation always has to accompanied by a source slave server name but it was empty

What it means

Thrown by TransformationMap.allocateServerSocketPort when sourceSlaveName is empty. Clustered socket allocations record which slave sends the data; without a source slave name the allocation cannot be matched on the slave's socket map. The check runs before any port is reserved.

Solutions

  1. Add/repair the source SlaveServer entry in the cluster schema used by the transformation
  2. Pass the correct source slave name when invoking the registration/socket allocation API
  3. Validate with Utils.isEmpty( sourceSlaveName ) before the call

Example fix

// before
map.allocateServerSocketPort( 40000, host, trans, "", "tgt", "stepA", "stepB", "0", "0" );
// after
map.allocateServerSocketPort( 40000, host, trans, sourceSlave.getName(), "tgt", "stepA", "stepB", "0", "0" );
Defensive patterns

Strategy: validation

Validate before calling

if ( Utils.isEmpty( sourceSlaveName ) ) {
  throw new IllegalArgumentException( "source slave name required" );
}

Type guard

boolean hasSlave(String s) { return s != null && !s.trim().isEmpty(); }

Try / catch

try {
  map.allocateServerSocketPort( port, host, trans, srcSlave, tgt, stepA, stepB, c1, c2 );
} catch ( RuntimeException e ) {
  if ( e.getMessage().contains( "source slave" ) ) {
    // repair cluster schema source slave reference
  }
}

Prevention

When it happens

Trigger: Calling allocateServerSocketPort with sourceSlaveName=null or ""; a cluster schema partition/host definition missing the source slave; SocketPortAllocation bookkeeping invoked from partial cluster metadata.

Common situations: Master/slave topology defined in Spoon where the source slave server reference is blank; deserializing cluster schema XML with a missing slave entry; hand-built cluster execution configuration.

Understand the failure class

Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/www/TransformationMap.java:177

    if ( Utils.isEmpty( clusteredRunId ) ) {
      throw new RuntimeException(
        "A server socket allocation always has to accompanied by a cluster run ID but it was empty" );
    }
    if ( portRangeStart <= 0 ) {
      throw new RuntimeException(
        "A server socket allocation always has to accompanied by port range start > 0 but it was "
          + portRangeStart );
    }
    if ( Utils.isEmpty( hostname ) ) {
      throw new RuntimeException(
        "A server socket allocation always has to accompanied by a hostname but it was empty" );
    }
    if ( Utils.isEmpty( transformationName ) ) {
      throw new RuntimeException(
        "A server socket allocation always has to accompanied by a transformation name but it was empty" );
    }
    if ( Utils.isEmpty( sourceSlaveName ) ) {
      throw new RuntimeException(
        "A server socket allocation always has to accompanied by a source slave server name but it was empty" );
    }
    if ( Utils.isEmpty( targetSlaveName ) ) {
      throw new RuntimeException(
        "A server socket allocation always has to accompanied by a target slave server name but it was empty" );
    }
    if ( Utils.isEmpty( sourceStepName ) ) {
      throw new RuntimeException(
        "A server socket allocation always has to accompanied by a source step name but it was empty" );
    }
    if ( Utils.isEmpty( targetStepName ) ) {
      throw new RuntimeException(
        "A server socket allocation always has to accompanied by a target step name but it was empty" );
    }
    if ( Utils.isEmpty( sourceStepCopy ) ) {
      throw new RuntimeException(
        "A server socket allocation always has to accompanied by a source step copy but it was empty" );
    }

View on GitHub (pinned to f3058517a1)