GoogleContainerTools/skaffold · warning
errStr (aggregated event log file errors, e.g. "eventV2 log
Error message
errStr (aggregated event log file errors, e.g. "eventV2 log file error: %s\n")
What it means
This is not a thrown error itself but an aggregated error message: after a run terminates, skaffold's server shutdown path saves the event log (SaveLastLog) and returns errors.New(errStr), where errStr aggregates failures such as "eventV2 log file error: %s" encountered while persisting the event log file. It signals that the run ended and one or more teardown/log-persistence errors occurred.
Source
Thrown at pkg/skaffold/server/server.go:162
errStr += fmt.Sprintf("http callback error: %s\n", httpErr.Error())
}
if opts.EventLogFile != "" {
logFileErr := event.SaveEventsToFile(opts.EventLogFile)
if logFileErr != nil {
errStr += fmt.Sprintf("event log file error: %s\n", logFileErr.Error())
}
v2EventLogFile := fmt.Sprintf(`%s.v2`, opts.EventLogFile)
logFileV2Err := eventV2.SaveEventsToFile(v2EventLogFile)
if logFileV2Err != nil {
errStr += fmt.Sprintf("eventV2 log file error: %s\n", logFileV2Err.Error())
}
}
// Save logs from current run to file
eventV2.SaveLastLog(opts.LastLogFile)
return errors.New(errStr)
}
if err != nil {
return callback, fmt.Errorf("starting HTTP server: %w", err)
}
if opts.EnableRPC && opts.RPCPort.Value() == nil && opts.RPCHTTPPort.Value() == nil {
log.Entry(context.TODO()).Warnf("started skaffold gRPC API on random port %d", grpcPort)
}
return callback, nil
}
func newGRPCServer(preferredPort int) (func() error, int, error) {
l, port, err := listenPort(preferredPort)
if err != nil {
return func() error { return nil }, 0, fmt.Errorf("creating listener: %w", err)
}
View on GitHub (pinned to a1189de023)
Solutions
- Check that the --last-log-file path's directory exists and is writable.
- Free disk space if the filesystem is full.
- Inspect the aggregated message for the underlying wrapped cause (e.g. the specific eventV2 log file error) and fix that first.
- Run with permissions to write to the default log location (usually under the user cache/config dir).
Defensive patterns
Strategy: try-catch
Validate before calling
const logDir = path.dirname(lastLogPath);
fs.mkdirSync(logDir, { recursive: true });
fs.accessSync(logDir, fs.constants.W_OK); Try / catch
try {
await runSkaffold(['dev', '--last-log-file', logPath]);
} catch (e) {
if (String(e).includes('log file error')) console.warn('Run finished but log persistence failed:', e.message);
} Prevention
- Point --last-log-file at a writable, existing directory
- Avoid read-only root filesystems without a writable volume for logs
- Monitor disk space in CI runners
When it happens
Trigger: Skaffold shutting down (Ctrl+C or run completion) while the last-log file cannot be written — e.g. LastLogFile path is in a read-only or non-existent directory, or disk is full.
Common situations: CI containers with read-only filesystems or small tmpfs; --last-log-file pointing at a bad path; concurrent skaffold runs clobbering the same log file; permission errors in $HOME.
Related errors
- unable to create log file for render step: %w
- unable to create log file for deploy step: %w
- computing modTimes: %w
- unable to create log file for statuscheck step: %w
- starting logger: %w
AI-assisted analysis of GoogleContainerTools/skaffold@a1189de023 (2026-09-05).
Data as JSON: /api/errors/1d4ecf9d40cfb308.
Report an issue: GitHub.