pentaho/pentaho-kettle · error · KettleException

There was a problem retrieving a next sequence value from…

Error message

There was a problem retrieving a next sequence value from slave sequence '<slaveSequenceName>' on slave <slaveServer>

What it means

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.

Solutions

  1. Verify the slave server (Carte) is running and reachable from the master via its configured hostname/port.
  2. Check the slave sequence exists on the slave (the transformation must create/register it before the master requests values).
  3. Inspect the chained cause (KettleException.getCause()) for the root error (connect refused, 404, parse error).
  4. Test the slave URL manually (e.g. GET http://slave:port/kettle/getSlaveSequence/) to see the raw response.
  5. Retry the cluster run once the slave is healthy; sequence values are stateful so restart cleanly.
  6. Validate the slave's hostname/port/username/password in the slave server definition (toString() in the message shows which slave).

Example fix

// before
long v = slaveServer.getNextSlaveSequenceValue("mySeq", 1); // throws on any slave hiccup
// after
try {
  long v = slaveServer.getNextSlaveSequenceValue("mySeq", 1);
} catch (KettleException e) {
  logError("Slave " + slaveServer.getName() + " failed to serve sequence: " + e.getCause(), e);
  throw e;
}
Defensive patterns

Strategy: try-catch

Validate before calling

// verify slave health before requesting sequence values
if (!slaveServer.getStatus().equals("OK")) {
  throw new IllegalStateException("Slave " + slaveServer.getName() + " is not reachable");
}

Try / catch

try { v = slaveServer.getNextSlaveSequenceValue(name, diff); } catch (KettleException e) { logError("slave sequence failed: " + e.getCause(), e); throw e; }

Prevention

When it happens

Trigger: 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).

Common situations: 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.

Understand the failure class

Background: 'Something went wrong' / 'Request failed (500)' / 'HTTP error! status: 404' — what failed HTTP requests actually mean and how to find the real cause — this error's family across 28 libraries.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/5c05fbe5fc3b4917. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/cluster/SlaveServer.java:1365

      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() );
      return client;
    } finally {
      lock.readLock().unlock();
    }

  }

View on GitHub (pinned to f3058517a1)