{"record":{"id":"04454110d4a8b39c","repo":"pentaho/pentaho-kettle","slug":"a-server-socket-allocation-always-has-to-accompanied-by-a-044541","errorCode":null,"errorMessage":"A server socket allocation always has to accompanied by a target step name but it was empty","messagePattern":"A server socket allocation always has to accompanied by a target 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":189,"sourceCode":"    }\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;\n    serverSocketPorts = hostServerSocketPortsMap.computeIfAbsent( hostname, k -> new CopyOnWriteArrayList<>() );\n    serverSocketPorts = serverSocketPorts != null ? serverSocketPorts : hostServerSocketPortsMap.get( hostname );\n\n        // Find the socket port allocation in the list...","sourceCodeStart":171,"sourceCodeEnd":207,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/www/TransformationMap.java#L171-L207","documentation":"Thrown by TransformationMap.allocateServerSocketPort when targetStepName is empty. The receiving step name is required so the allocated port can be matched to the step that will open the server socket on the target slave. The check runs before any port is reserved.","triggerScenarios":"Calling allocateServerSocketPort with targetStepName=null or \"\"; clustered hop with a missing target step reference.","commonSituations":"Hop pointing at a deleted/renamed target step; generated cluster partitions missing step names; hand-rolled socket allocation calls.","solutions":["Ensure the clustered hop's target step exists and has a name","Pass the correct target step name to allocateServerSocketPort","Validate with Utils.isEmpty( targetStepName ) before the call"],"exampleFix":"// before\nmap.allocateServerSocketPort( 40000, host, trans, src, tgt, \"stepA\", \"\", \"0\", \"0\" );\n// after\nmap.allocateServerSocketPort( 40000, host, trans, src, tgt, \"stepA\", targetStep.getName(), \"0\", \"0\" );","handlingStrategy":"validation","validationCode":"if ( Utils.isEmpty( targetStepName ) ) {\n  throw new IllegalArgumentException( \"target 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( \"target step\" ) ) {\n    // repair hop target step reference\n  }\n}","preventionTips":["Validate all hop endpoints exist and are named before clustered execution","Re-check transformations after bulk renames","Run clustered smoke tests in CI"],"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"}