pentaho/pentaho-kettle · error · KettleException
Unable to write log entry to file [ + logfile + ]
Error message
Unable to write log entry to file [ + logfile + ]
What it means
Thrown by KettleFileRepository's insertLogEntry: when writing a log entry line to the log file in the repository fails with an IOException, it is wrapped in this KettleException naming the target logfile. Unlike most siblings it discards the cause object, so the original IOException is not chained.
Solutions
- Ensure the repository directory backing the log file is writable by the process
- Free disk space / raise quota on the repository volume
- Check no other process holds a conflicting lock on the log file
- Since the cause is dropped, reproduce with logging enabled to capture the original IOException stack
Example fix
// before (in a caller)
repository.insertLogEntry("job started");
// after
try {
repository.insertLogEntry("job started");
} catch (KettleException e) {
log.warn("Repository log entry not written; continuing", e); // do not fail the job for logging
} Defensive patterns
Strategy: try-catch
Validate before calling
File repoDir = new File(repoBaseDirectory);
if (!repoDir.canWrite()) throw new KettleException("Repository not writable; log entries cannot be stored");
if (repoDir.getFreeSpace() < 10_000_000) throw new KettleException("Low disk space on repository volume"); Try / catch
try {
repository.insertLogEntry("job started");
} catch (KettleException e) {
logger.warn("Repository log entry skipped (non-fatal): " + e.getMessage()); // logging failure should not fail the job
} Prevention
- Treat repository logging as best-effort: catch and continue
- Keep the repository volume writable and monitor free space
- Enable app-level logging so failures are visible even when repo log writes fail
When it happens
Trigger: Calling insertLogEntry(description) when the log file path cannot be created or written: unwritable directory, disk full, filename from a bad log level id, or the VFS file object cannot be opened for output.
Common situations: Repository folder is read-only; disk quota exceeded on the repository volume; log file locked by another process; invalid logfile name derived from a corrupted directory id.
Understand the failure class
Background: "failed to write file", "Could not save figure", "Error saving remote file" — file write failed: causes and fixes across languages and libraries — this error's family across 38 libraries.
Related errors
- Unable to get list of transformations in folder with id : +…
- Unable to get list of transformations names in folder with…
- Unable to get root object ids for extension [ + extension +…
- Unable to load the directory tree from this file repository
- Unable to save repository element [ + repositoryElement + ]…
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/37594d87d621a454.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/repository/filerep/KettleFileRepository.java:839
@Override
public void insertJobEntryDatabase( ObjectId id_job, ObjectId id_jobentry, ObjectId id_database ) throws KettleException {
}
public void insertJobNote( ObjectId id_job, ObjectId id_note ) throws KettleException {
}
@Override
public ObjectId insertLogEntry( String description ) throws KettleException {
String logfile = calcDirectoryName( null ) + LOG_FILE;
try {
OutputStream outputStream = KettleVFS.getInstance( DefaultBowl.getInstance() ).getOutputStream( logfile, true );
outputStream.write( description.getBytes() );
outputStream.write( Const.CR.getBytes() );
outputStream.close();
return new StringObjectId( logfile );
} catch ( IOException e ) {
throw new KettleException( "Unable to write log entry to file [" + logfile + "]" );
}
}
@Override
public void insertStepDatabase( ObjectId id_transformation, ObjectId id_step, ObjectId id_database ) throws KettleException {
}
public void insertTransNote( ObjectId id_transformation, ObjectId id_note ) throws KettleException {
}
public void insertTransStepCondition( ObjectId id_transformation, ObjectId id_step, ObjectId id_condition ) throws KettleException {
}
public ObjectId insertTransformationCluster( ObjectId id_transformation, ObjectId id_cluster ) throws KettleException {
View on GitHub (pinned to f3058517a1)