{"record":{"id":"e83276309a10cc12","repo":"pentaho/pentaho-kettle","slug":"a-server-socket-allocation-always-has-to-accompanied-by-a-e83276","errorCode":null,"errorMessage":"A server socket allocation always has to accompanied by a source slave server name but it was empty","messagePattern":"A server socket allocation always has to accompanied by a source slave server name but it was empty","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/www/TransformationMap.java","lineNumber":177,"sourceCode":"    if ( Utils.isEmpty( clusteredRunId ) ) {\n      throw new RuntimeException(\n        \"A server socket allocation always has to accompanied by a cluster run ID but it was empty\" );\n    }\n    if ( portRangeStart <= 0 ) {\n      throw new RuntimeException(\n        \"A server socket allocation always has to accompanied by port range start > 0 but it was \"\n          + portRangeStart );\n    }\n    if ( Utils.isEmpty( hostname ) ) {\n      throw new RuntimeException(\n        \"A server socket allocation always has to accompanied by a hostname but it was empty\" );\n    }\n    if ( Utils.isEmpty( transformationName ) ) {\n      throw new RuntimeException(\n        \"A server socket allocation always has to accompanied by a transformation name but it was empty\" );\n    }\n    if ( Utils.isEmpty( sourceSlaveName ) ) {\n      throw new RuntimeException(\n        \"A server socket allocation always has to accompanied by a source slave server name but it was empty\" );\n    }\n    if ( Utils.isEmpty( targetSlaveName ) ) {\n      throw new RuntimeException(\n        \"A server socket allocation always has to accompanied by a target slave server name but it was empty\" );\n    }\n    if ( Utils.isEmpty( sourceStepName ) ) {\n      throw new RuntimeException(\n        \"A server socket allocation always has to accompanied by a source step name but it was empty\" );\n    }\n    if ( Utils.isEmpty( targetStepName ) ) {\n      throw new RuntimeException(\n        \"A server socket allocation always has to accompanied by a target step name but it was empty\" );\n    }\n    if ( Utils.isEmpty( sourceStepCopy ) ) {\n      throw new RuntimeException(\n        \"A server socket allocation always has to accompanied by a source step copy but it was empty\" );\n    }","sourceCodeStart":159,"sourceCodeEnd":195,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/www/TransformationMap.java#L159-L195","documentation":"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.","triggerScenarios":"Calling allocateServerSocketPort with sourceSlaveName=null or \"\"; a cluster schema partition/host definition missing the source slave; SocketPortAllocation bookkeeping invoked from partial cluster metadata.","commonSituations":"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.","solutions":["Add/repair the source SlaveServer entry in the cluster schema used by the transformation","Pass the correct source slave name when invoking the registration/socket allocation API","Validate with Utils.isEmpty( sourceSlaveName ) before the call"],"exampleFix":"// before\nmap.allocateServerSocketPort( 40000, host, trans, \"\", \"tgt\", \"stepA\", \"stepB\", \"0\", \"0\" );\n// after\nmap.allocateServerSocketPort( 40000, host, trans, sourceSlave.getName(), \"tgt\", \"stepA\", \"stepB\", \"0\", \"0\" );","handlingStrategy":"validation","validationCode":"if ( Utils.isEmpty( sourceSlaveName ) ) {\n  throw new IllegalArgumentException( \"source slave name required\" );\n}","typeGuard":"boolean hasSlave(String s) { return s != null && !s.trim().isEmpty(); }","tryCatchPattern":"try {\n  map.allocateServerSocketPort( port, host, trans, srcSlave, tgt, stepA, stepB, c1, c2 );\n} catch ( RuntimeException e ) {\n  if ( e.getMessage().contains( \"source slave\" ) ) {\n    // repair cluster schema source slave reference\n  }\n}","preventionTips":["Verify every clustered hop has both source and target slaves defined","Keep cluster schema XML under version control and lint it","Test clustered execution on a small transformation before production runs"],"tags":["java","kettle","carte","clustering"],"backgroundTag":"empty-required-field","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}