pentaho/pentaho-kettle · error · KettleException
Incorrect value ' ' retrieved from slave sequence ' ' on…
Error message
Incorrect value '<nextValueString>' retrieved from slave sequence '<slaveSequenceName>' on slave <slaveServer>
What it means
Thrown by SlaveServer.getNextSequenceValue when the value returned by the slave cannot be parsed as a long: Const.toLong returns the Long.MIN_VALUE sentinel. The message echoes the unparsable value, sequence name, and slave. Distinct from 628 in that a value was returned but it is malformed.
Solutions
- Check master and slave Pentaho/Kettle versions match (protocol compatibility)
- Capture and inspect the raw servlet response to see what value was actually returned
- Verify the sequence value on the slave has not overflowed long range
- Retry the request; if intermittent, check network corruption/proxy rewriting of responses
Example fix
// before: parsing response blindly
long v = slaveServer.getNextSequenceValue(partitionId, seqName, sb);
// after: validate response content before use
String xml = slaveServer.execService(...);
if (xml == null || !xml.contains(NextSequenceValueServlet.XML_TAG)) { throw new KettleException("Malformed sequence response from slave"); }
long v = Long.parseLong(valueString); // with NumberFormatException handling Defensive patterns
Strategy: validation
Validate before calling
// Parse and validate the value yourself before trusting it
String v = XMLHandler.getTagValue(seqNode, NextSequenceValueServlet.XML_TAG_VALUE);
if (v == null || !v.matches("-?\\d+")) { throw new KettleException("Malformed sequence value: " + v); }
long nextValue = Long.parseLong(v); Type guard
boolean isParsableLong(String s) { if (s == null || s.isEmpty()) return false; try { Long.parseLong(s.trim()); return true; } catch (NumberFormatException e) { return false; } } Try / catch
try { long v = slaveServer.getNextSequenceValue(partitionId, seqName, sb); }
catch (KettleException e) { if (e.getMessage().startsWith("Incorrect value")) { log.error("Protocol/version mismatch on sequence response"); } throw e; } Prevention
- Align master and slave Kettle/Pentaho versions (same XML protocol)
- Validate raw response XML when sequence calls fail intermittently
- Watch for long overflow in sequence generators on slaves
- Add integration tests exercising getNextSequenceValue against real slaves
When it happens
Trigger: The NextSequenceValueServlet response contains a non-numeric or out-of-range value string for slaveSequenceName, so Const.toLong(nextValueString, Long.MIN_VALUE) hits the default sentinel.
Common situations: Master/slave protocol version mismatch causing a different XML tag to be read; corrupted response; value tag containing an error text instead of a number; integer overflow on very large sequence values.
Related errors
- No value retrieved from slave sequence
- There was a problem retrieving a next sequence value from…
- TransMeta.Log.UnableToReadSlaveServersFromRepository
- Unable to automatically configure slave sequences
- Unable to get next value for slave sequence '" + name + "'…
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/4de9554c7c22d1fc.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/cluster/SlaveServer.java:1359
execService( NextSequenceValueServlet.CONTEXT_PATH + "/" + "?" + NextSequenceValueServlet.PARAM_NAME + "="
+ URLEncoder.encode( slaveSequenceName, "UTF-8" ) + "&" + NextSequenceValueServlet.PARAM_INCREMENT + "="
+ Long.toString( incrementValue ) );
Document doc = XMLHandler.loadXMLString( xml );
Node seqNode = XMLHandler.getSubNode( doc, NextSequenceValueServlet.XML_TAG );
String nextValueString = XMLHandler.getTagValue( seqNode, NextSequenceValueServlet.XML_TAG_VALUE );
String errorString = XMLHandler.getTagValue( seqNode, NextSequenceValueServlet.XML_TAG_ERROR );
if ( !Utils.isEmpty( errorString ) ) {
throw new KettleException( errorString );
}
if ( Utils.isEmpty( nextValueString ) ) {
throw new KettleException( "No value retrieved from slave sequence '" + slaveSequenceName + "' on slave "
+ toString() );
}
long nextValue = Const.toLong( nextValueString, Long.MIN_VALUE );
if ( nextValue == Long.MIN_VALUE ) {
throw new KettleException( "Incorrect value '" + nextValueString + "' retrieved from slave sequence '"
+ slaveSequenceName + "' on slave " + toString() );
}
return nextValue;
} catch ( Exception e ) {
throw new KettleException( "There was a problem retrieving a next sequence value from slave sequence '"
+ slaveSequenceName + "' on slave " + toString(), e );
}
}
public SlaveServer getClient() {
lock.readLock().lock();
try {
String pHostName = getHostname();
String pPort = getPort();
String name = MessageFormat.format( "Dynamic slave [{0}:{1}]", pHostName, pPort );
SlaveServer client = new SlaveServer( name, pHostName, pPort, getUsername(), getPassword() );
client.setSslMode( isSslMode() );View on GitHub (pinned to f3058517a1)