{"record":{"id":"3a4aab36b6fdc935","repo":"pentaho/pentaho-kettle","slug":"error-opening-reader-socket-to-remote-step-remotestep","errorCode":null,"errorMessage":"Error opening reader socket to remote step '\" + remoteStep + \"'","messagePattern":"Error opening reader socket to remote step '\" \\+ remoteStep \\+ \"'","errorType":"exception","errorClass":"KettleStepException","httpStatus":null,"severity":"critical","filePath":"engine/src/main/java/org/pentaho/di/trans/step/BaseStep.java","lineNumber":2042,"sourceCode":"  protected void openRemoteInputStepSocketsOnce() throws KettleStepException {\n    if ( remoteInputSteps.isEmpty()\n      || remoteInputStepsInitialized ) {\n\n      return;\n    }\n\n    // Loop over the remote steps and open client sockets to them\n    // Just be careful in case we're dealing with a partitioned clustered step.\n    // A partitioned clustered step has only one. (see dispatch())\n    //\n    inputRowSetsLock.writeLock().lock();\n    try {\n      for ( RemoteStep remoteStep : remoteInputSteps ) {\n        try {\n          BlockingRowSet rowSet = remoteStep.openReaderSocket( this );\n          inputRowSets.add( rowSet );\n        } catch ( Exception e ) {\n          throw new KettleStepException( \"Error opening reader socket to remote step '\" + remoteStep + \"'\", e );\n        }\n      }\n    } finally {\n      inputRowSetsLock.writeLock().unlock();\n    }\n    remoteInputStepsInitialized = true;\n  }\n\n  /**\n   * Opens socket connections to the remote output steps of this step. <br>\n   * This method is called in method initBeforeStart() because it needs to connect to the server sockets (remote steps)\n   * as soon as possible to avoid time-out situations. <br>\n   * This action is executed only once.\n   *\n   * @throws KettleStepException if there is an error opening socket connections to the remote output steps\n   */\n  protected void openRemoteOutputStepSocketsOnce() throws KettleStepException {\n    if ( remoteOutputSteps.isEmpty()","sourceCodeStart":2024,"sourceCodeEnd":2060,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/step/BaseStep.java#L2024-L2060","documentation":"When a step in a clustered transformation consumes data from remote input steps, BaseStep calls RemoteStep.openReaderSocket(this) for each remote input to open the socket that feeds rows in. Any exception while opening a reader socket is wrapped in a KettleStepException with this message. The step cannot receive its input rows from the remote host.","triggerScenarios":"openReaderSocket throws during initialization of remote input steps (remoteInputSteps loop) — network failure, remote slave not listening on the expected port, hostname unresolvable, or the remote step hasn't started its server socket.","commonSituations":"Firewall blocking cluster ports between master and slaves; slave server down or restarting; wrong host/port in cluster schema; DNS resolution failure for slave hostnames; starting clustered run before slaves are ready.","solutions":["Verify each slave server is up and reachable (telnet/nc to its hostname and port from the master).","Check cluster schema host/port configuration and correct any wrong hostnames.","Open firewall ports used by Kettle cluster communication.","Retry the clustered run after confirming slaves have fully started; catch KettleStepException and log the wrapped cause for the root network error."],"exampleFix":"// before: slave defined as 'slave01' which does not resolve\nclusterSchema.getSlaves().get(0).setHostname(\"slave01\");\n\n// after: use resolvable hostname/IP and verified port\nclusterSchema.getSlaves().get(0).setHostname(\"192.168.1.10\");\nclusterSchema.getSlaves().get(0).setPort(\"8081\");","handlingStrategy":"validation","validationCode":"// Pre-check slave reachability before clustered execution\nfor (SlaveServer slave : clusterSchema.getSlaves()) {\n  if (!slave.getHostname().equals(\"localhost\") &&\n      !InetAddress.getByName(slave.getHostname()).isReachable(3000)) {\n    throw new IllegalStateException(\"Slave unreachable: \" + slave.getHostname());\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  trans.execute(null);\n} catch (KettleStepException e) {\n  if (e.getMessage().contains(\"Error opening reader socket\")) {\n    logError(\"Cannot read from remote step: \" + e.getMessage(), e.getCause());\n    // retry or abort the clustered run\n  } else { throw e; }\n}","preventionTips":["Health-check all slaves before starting clustered runs","Pre-verify cluster ports with telnet/nc","Use resolvable hostnames or static IPs for slaves"],"tags":["network","cluster","socket"],"backgroundTag":"connection-refused","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"}