goharbor/harbor · error
invalid log identify
Error message
invalid log identify
What it means
Sentinel validation inside isValidLogID: after stripping the '@segment' suffix, the log ID must be 24 hex characters (a MongoDB-style object ID). This error fires when the ID has the right length but contains non-hex characters, so it cannot map to a job's log file.
Solutions
- Use the exact hexadecimal job UUID returned when the job was enqueued
- Check that the ID was not truncated, re-encoded or corrupted in transit
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/jobservice/logger/getter/file_getter.go:73 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of goharbor/harbor@7b2fd08cc5 (2026-08-16).
Data as JSON: /api/errors/e12c9f8bdd9225cc.
Report an issue: GitHub.
Appendix: source
Thrown at src/jobservice/logger/getter/file_getter.go:73
return nil, errs.NoObjectFoundError(logID)
}
return tailLogFile(fPath, logSizeLimit())
}
func isValidLogID(id string) error {
lid := id
segment := strings.LastIndex(lid, "@")
if segment != -1 {
lid = lid[:segment]
}
if len(lid) != 24 {
return errors.New("invalid length of log identify")
}
if _, err := hex.DecodeString(lid); err != nil {
return errors.New("invalid log identify")
}
return nil
}
func tailLogFile(filename string, limit int64) ([]byte, error) {
fInfo, err := os.Stat(filename)
if err != nil {
return nil, err
}
size := fInfo.Size()
var sizeToRead int64
if limit <= 0 {
sizeToRead = size
} else {
sizeToRead = limit
}View on GitHub (pinned to 7b2fd08cc5)