{"record":{"id":"8cb89085af8b3ac7","repo":"pentaho/pentaho-kettle","slug":"no-value-retrieved-from-slave-sequence-slavesequencename-on","errorCode":null,"errorMessage":"No value retrieved from slave sequence '<slaveSequenceName>' on slave <slaveServer>","messagePattern":"No value retrieved from slave sequence '<slaveSequenceName>' on slave <slaveServer>","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/cluster/SlaveServer.java","lineNumber":1354,"sourceCode":"  }\n\n  public long getNextSlaveSequenceValue( String slaveSequenceName, long incrementValue ) throws KettleException {\n    try {\n      String xml =\n        execService( NextSequenceValueServlet.CONTEXT_PATH + \"/\" + \"?\" + NextSequenceValueServlet.PARAM_NAME + \"=\"\n          + URLEncoder.encode( slaveSequenceName, \"UTF-8\" ) + \"&\" + NextSequenceValueServlet.PARAM_INCREMENT + \"=\"\n          + Long.toString( incrementValue ) );\n\n      Document doc = XMLHandler.loadXMLString( xml );\n      Node seqNode = XMLHandler.getSubNode( doc, NextSequenceValueServlet.XML_TAG );\n      String nextValueString = XMLHandler.getTagValue( seqNode, NextSequenceValueServlet.XML_TAG_VALUE );\n      String errorString = XMLHandler.getTagValue( seqNode, NextSequenceValueServlet.XML_TAG_ERROR );\n\n      if ( !Utils.isEmpty( errorString ) ) {\n        throw new KettleException( errorString );\n      }\n      if ( Utils.isEmpty( nextValueString ) ) {\n        throw new KettleException( \"No value retrieved from slave sequence '\" + slaveSequenceName + \"' on slave \"\n          + toString() );\n      }\n      long nextValue = Const.toLong( nextValueString, Long.MIN_VALUE );\n      if ( nextValue == Long.MIN_VALUE ) {\n        throw new KettleException( \"Incorrect value '\" + nextValueString + \"' retrieved from slave sequence '\"\n          + slaveSequenceName + \"' on slave \" + toString() );\n      }\n\n      return nextValue;\n    } catch ( Exception e ) {\n      throw new KettleException( \"There was a problem retrieving a next sequence value from slave sequence '\"\n        + slaveSequenceName + \"' on slave \" + toString(), e );\n    }\n  }\n\n  public SlaveServer getClient() {\n    lock.readLock().lock();\n    try {","sourceCodeStart":1336,"sourceCodeEnd":1372,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/cluster/SlaveServer.java#L1336-L1372","documentation":"Thrown by SlaveServer.getNextSequenceValue when the NextSequenceValueServlet responds without an error tag but also without a value: the nextValueString is empty. It means the slave acknowledged the request but returned no sequence value.","triggerScenarios":"getNextSequenceValue is called for slaveSequenceName on this slave; the HTTP response XML contains no error but the NextSequenceValue value tag is empty.","commonSituations":"Sequence not initialized/created on the slave; slave servlet returned an empty value due to an internal edge case; protocol/serialization mismatch between master and slave versions.","solutions":["Ensure the sequence exists and is supported on the slave (check slave version/configuration)","Inspect the raw response XML from the NextSequenceValueServlet to see why the value is empty","Upgrade/align master and slave versions if the servlet protocol differs","If sequences are unused, avoid calling getNextSequenceValue in clustered runs"],"exampleFix":"// before: assuming the sequence exists on the slave\nlong v = slaveServer.getNextSequenceValue(partitionId, \"mySeq\", sb);\n// after: check sequence availability first\nif (!slaveServer.getSlaves().isEmpty() && !sequenceExistsOnSlave(slaveServer, \"mySeq\")) { throw new KettleException(\"Sequence mySeq missing on slave\"); }\nlong v = slaveServer.getNextSequenceValue(partitionId, \"mySeq\", sb);","handlingStrategy":"try-catch","validationCode":"// Ensure the sequence is configured on the slave before requesting a value\n// (no direct API; verify slave version supports sequences and sequence was initialized)\nif (!slaveServer.ping()) { throw new KettleException(\"Slave down: \" + slaveServer.getName()); }","typeGuard":"boolean hasValue(String xml) { return xml != null && xml.contains(NextSequenceValueServlet.XML_TAG_VALUE); }","tryCatchPattern":"try { Long v = slaveServer.getNextSequenceValue(partitionId, seqName, sb); }\ncatch (KettleException e) { if (e.getMessage().startsWith(\"No value retrieved\")) { initializeSequenceOnSlave(seqName); } throw e; }","preventionTips":["Initialize sequences on slaves before clustered runs","Keep master/slave versions aligned","Log raw servlet responses when debugging sequence issues"],"tags":["slave-server","sequence","clustering","empty-response"],"backgroundTag":"empty-response-body","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"}