{"record":{"id":"5c05fbe5fc3b4917","repo":"pentaho/pentaho-kettle","slug":"there-was-a-problem-retrieving-a-next-sequence-value-from","errorCode":null,"errorMessage":"There was a problem retrieving a next sequence value from slave sequence '<slaveSequenceName>' on slave <slaveServer>","messagePattern":"There was a problem retrieving a next sequence value 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":1365,"sourceCode":"      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 {\n      String pHostName = getHostname();\n      String pPort = getPort();\n      String name = MessageFormat.format( \"Dynamic slave [{0}:{1}]\", pHostName, pPort );\n      SlaveServer client = new SlaveServer( name, pHostName, pPort, getUsername(), getPassword() );\n      client.setSslMode( isSslMode() );\n      return client;\n    } finally {\n      lock.readLock().unlock();\n    }\n\n  }","sourceCodeStart":1347,"sourceCodeEnd":1383,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/cluster/SlaveServer.java#L1347-L1383","documentation":"SlaveServer.getNextSlaveSequenceValue() wraps any failure while asking a slave server for the next value of a clustered ('slave') sequence into a KettleException. The HTTP call, the response parsing, or a non-numeric value returned by the slave all land here, chained as the cause. It means the master could not obtain a sequence value from the remote slave.","triggerScenarios":"Calling getNextSlaveSequenceValue(slaveSequenceName, differential) on a SlaveServer whose /getSlaveSequence endpoint fails, returns an HTTP error, or returns a body that does not parse to a number (nextValueString non-numeric).","commonSituations":"Carte slave is down or unreachable mid-transformation; the slave sequence was not initialized on the slave; network/firewall drops the request; the slave returns an error page instead of the sequence value.","solutions":["Verify the slave server (Carte) is running and reachable from the master via its configured hostname/port.","Check the slave sequence exists on the slave (the transformation must create/register it before the master requests values).","Inspect the chained cause (KettleException.getCause()) for the root error (connect refused, 404, parse error).","Test the slave URL manually (e.g. GET http://slave:port/kettle/getSlaveSequence/) to see the raw response.","Retry the cluster run once the slave is healthy; sequence values are stateful so restart cleanly.","Validate the slave's hostname/port/username/password in the slave server definition (toString() in the message shows which slave)."],"exampleFix":"// before\nlong v = slaveServer.getNextSlaveSequenceValue(\"mySeq\", 1); // throws on any slave hiccup\n// after\ntry {\n  long v = slaveServer.getNextSlaveSequenceValue(\"mySeq\", 1);\n} catch (KettleException e) {\n  logError(\"Slave \" + slaveServer.getName() + \" failed to serve sequence: \" + e.getCause(), e);\n  throw e;\n}","handlingStrategy":"try-catch","validationCode":"// verify slave health before requesting sequence values\nif (!slaveServer.getStatus().equals(\"OK\")) {\n  throw new IllegalStateException(\"Slave \" + slaveServer.getName() + \" is not reachable\");\n}","typeGuard":null,"tryCatchPattern":"try { v = slaveServer.getNextSlaveSequenceValue(name, diff); } catch (KettleException e) { logError(\"slave sequence failed: \" + e.getCause(), e); throw e; }","preventionTips":["Monitor Carte slave health before/during clustered runs","Pre-create the slave sequence on the slave before the master requests values","Log e.getCause() to capture the real network/HTTP error","Use consistent slave definitions (host/port/credentials) across the cluster"],"tags":["network","cluster","sequence","slave-server"],"backgroundTag":"http-request-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"}