{"record":{"id":"054d9b479740a3c0","repo":"pentaho/pentaho-kettle","slug":"tostring-unable-to-read-the-marker-flag-data-from-input","errorCode":null,"errorMessage":"${toString()} : Unable to read the marker flag data from input stream","messagePattern":"(.+?) : Unable to read the marker flag data from input stream","errorType":"exception","errorClass":"org.pentaho.di.core.exception.KettleFileException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/pentaho/di/core/row/RowMeta.java","lineNumber":764,"sourceCode":"  }\n\n  @Override\n  public Object[] readData( DataInputStream inputStream ) throws KettleFileException, SocketTimeoutException {\n    lock.readLock().lock();\n    try {\n      Object[] data = new Object[ size() ];\n      for ( int i = 0; i < size(); i++ ) {\n        data[ i ] = getValueMeta( i ).readData( inputStream );\n      }\n      if ( size() == 0 ) {\n        try {\n          inputStream.readBoolean();\n        } catch ( EOFException e ) {\n          throw new KettleEOFException( e );\n        } catch ( SocketTimeoutException e ) {\n          throw e;\n        } catch ( IOException e ) {\n          throw new KettleFileException( toString() + \" : Unable to read the marker flag data from input stream\", e );\n        }\n\n      }\n      return data;\n    } finally {\n      lock.readLock().unlock();\n    }\n  }\n\n  @Override\n  public void clear() {\n    lock.writeLock().lock();\n    try {\n      valueMetaList.clear();\n      cache.invalidate();\n      needRealClone = null;\n    } finally {\n      lock.writeLock().unlock();","sourceCodeStart":746,"sourceCodeEnd":782,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/core/src/main/java/org/pentaho/di/core/row/RowMeta.java#L746-L782","documentation":"In readData, a generic IOException (not EOF, not socket timeout) while reading the empty-row marker boolean is wrapped in KettleFileException \"<rowMeta.toString()> : Unable to read the marker flag data from input stream\". This signals a transport-level fault while reading the one-byte empty-row marker.","triggerScenarios":"RowMeta.readData(inputStream) with size()==0 metadata where readBoolean throws connection reset, SSL error, or file I/O error instead of a clean EOF or timeout.","commonSituations":"Network resets during PDI slave-server row streaming; TLS failures on long-lived connections; corrupt or unreadable serialized data files.","solutions":["Inspect the exception message and chained IOException to identify the transport fault.","Re-establish the connection or reopen the file and retry the read.","For sockets, configure keep-alive and read timeouts; treat SocketTimeoutException (rethrown) separately as retryable.","Regenerate the data file if it is corrupt or unreadable."],"exampleFix":"// before\nObject[] row = rowMeta.readData(inputStream);\n// after\ntry {\n  Object[] row = rowMeta.readData(inputStream);\n} catch (KettleFileException e) {\n  log.error(\"Marker flag read failed: \" + e.getMessage(), e);\n  inputStream = reconnect();\n  Object[] row = rowMeta.readData(inputStream);\n}","handlingStrategy":"retry","validationCode":"if (inputStream instanceof SocketInputStream && !socket.isConnected() || socket.isClosed()) { reconnect(); }","typeGuard":null,"tryCatchPattern":"try {\n  Object[] row = rowMeta.readData(inputStream);\n} catch (KettleFileException e) {\n  if (e.getCause() instanceof SocketTimeoutException) { retryWithBackoff(); }\n  else { reconnect(); }\n}","preventionTips":["Configure sensible socket read timeouts.","Keep SSL configurations consistent on both ends of long-lived connections.","Validate file integrity before deserializing data rows."],"tags":["io","network","deserialization","row-data"],"backgroundTag":"file-read-failed","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"}