{"record":{"id":"1423572ae68f3708","repo":"pentaho/pentaho-kettle","slug":"a-server-socket-allocation-always-has-to-accompanied-by-a-142357","errorCode":null,"errorMessage":"A server socket allocation always has to accompanied by a source step name but it was empty","messagePattern":"A server socket allocation always has to accompanied by a source step 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":185,"sourceCode":"    }\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    }\n    if ( Utils.isEmpty( targetStepCopy ) ) {\n      throw new RuntimeException(\n        \"A server socket allocation always has to accompanied by a target step copy but it was empty\" );\n    }\n\n      // Look up the sockets list for the given host\n      //\n    List<SocketPortAllocation> serverSocketPorts;","sourceCodeStart":167,"sourceCodeEnd":203,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/www/TransformationMap.java#L167-L203","documentation":"Thrown by TransformationMap.allocateServerSocketPort when sourceStepName is empty. Socket allocations are keyed by the sending step so the slave server can route the opened port to the correct step data stream. The check runs before any port is reserved.","triggerScenarios":"Calling allocateServerSocketPort with sourceStepName=null or \"\"; clustered hop whose source step reference is blank in the transformation meta.","commonSituations":"Step renamed or deleted from the clustered transformation leaving a dangling hop; programmatically registering translog/socket ports without step names; corrupt .ktr XML.","solutions":["Ensure the clustered hop's source step exists and has a name in the transformation","Pass the correct source step name when allocating the socket","Validate with Utils.isEmpty( sourceStepName ) before the call"],"exampleFix":"// before\nmap.allocateServerSocketPort( 40000, host, trans, src, tgt, \"\", \"stepB\", \"0\", \"0\" );\n// after\nmap.allocateServerSocketPort( 40000, host, trans, src, tgt, sourceStep.getName(), \"stepB\", \"0\", \"0\" );","handlingStrategy":"validation","validationCode":"if ( Utils.isEmpty( sourceStepName ) ) {\n  throw new IllegalArgumentException( \"source step name required\" );\n}","typeGuard":"boolean hasStep(String s) { return s != null && !s.trim().isEmpty(); }","tryCatchPattern":"try {\n  map.allocateServerSocketPort( port, host, trans, src, tgt, srcStep, tgtStep, c1, c2 );\n} catch ( RuntimeException e ) {\n  if ( e.getMessage().contains( \"source step\" ) ) {\n    // fix dangling hop source step reference\n  }\n}","preventionTips":["Check for dangling/empty hops after renaming or deleting steps","Validate transformation meta completeness before clustering","Use Spoon's step-reference checks rather than editing .ktr XML by hand"],"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"}