pentaho/pentaho-kettle · error · KettleException
Trans.Exception.UnableToWriteLogChannelInformationToLogTable
Error message
Trans.Exception.UnableToWriteLogChannelInformationToLogTable
What it means
Thrown by Trans.writeLogChannelInformation() when persisting the channel logging hierarchy (channels for the transformation and its steps) to the configured channel log table fails. The method connects, writes channel records, and calls cleanupLogRecords() to time out stale entries; any Exception in that flow is wrapped in this message.
Solutions
- Inspect the cause to find the failing statement (write vs cleanupLogRecords DELETE) and fix that database issue.
- Recreate the channel log table from the Log tab DDL so its schema matches the current PDI version.
- Grant the log user INSERT and DELETE privileges on the channel log table.
- Test the channel log table connection; if the write is transient, retry the transformation.
Example fix
// before: cleanup fails due to missing DELETE privilege GRANT DELETE ON channel_log TO etl_user; // after: writeLogChannelInformation() completes including cleanup of timed-out records
Defensive patterns
Strategy: try-catch
Validate before calling
// Ensure channel log table exists and is writable before the transformation runs
Database db = new Database(trans, channelLogTable.getDatabaseMeta());
db.connect();
if (!db.checkTableExists("CHANNEL_LOG")) throw new IllegalStateException("CHANNEL_LOG missing"); Try / catch
try {
trans.execute(null);
} catch (KettleException e) {
if (e.getMessage().contains("UnableToWriteLogChannelInformation")) {
log.warn("Channel metadata logging failed; run continues", e.getCause());
}
} Prevention
- Keep channel log table schema current with the installed PDI version.
- Ensure cleanupLogRecords DELETE privileges for the log user.
- Watch for lock contention on channel_log in high-concurrency schedulers.
When it happens
Trigger: writeLogChannelInformation() is invoked (from beginProcessing/endProcessing paths); the DB connect, writeLogRecord, or db.cleanupLogRecords(channelLogTable, getName()) throws; wrapped as KettleException(UnableToWriteLogChannelInformationToLogTable).
Common situations: Channel log table missing or its primary-key columns altered; database credentials invalid; cleanup DELETE blocked by privileges or locks; DB connection dropped before the write.
Related errors
- Conversion error after getting last logdate from
- Database.Exception.ErrorClosingCallableStatement
- Error closing connection while searching primary keys in…
- Error closing prepared statement
- Error disconnecting from database
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/a912397b1228a65b.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/Trans.java:2656
}
// end PDI-7070
try {
db = new Database( this, channelLogTable.getDatabaseMeta() );
db.shareVariablesWith( this );
db.connect();
db.setCommit( logCommitSize );
List<LoggingHierarchy> loggingHierarchyList = getLoggingHierarchy();
for ( LoggingHierarchy loggingHierarchy : loggingHierarchyList ) {
db.writeLogRecord( channelLogTable, LogStatus.START, loggingHierarchy, null );
}
// Also time-out the log records in here...
//
db.cleanupLogRecords( channelLogTable, getName() );
} catch ( Exception e ) {
throw new KettleException( BaseMessages.getString( PKG,
"Trans.Exception.UnableToWriteLogChannelInformationToLogTable" ), e );
} finally {
disconnectDb( db );
}
}
/**
* Writes step information to a step logging table (if one has been configured).
*
* @throws KettleException if any errors occur during logging
*/
protected void writeStepLogInformation() throws KettleException {
Database db = null;
StepLogTable stepLogTable = getTransMeta().getStepLogTable();
try {
db = createDataBase( stepLogTable.getDatabaseMeta() );
db.shareVariablesWith( this );
db.connect();View on GitHub (pinned to f3058517a1)