weaviate/weaviate · error
file snapshot store: %w
Error message
file snapshot store: %w
What it means
raft.NewFileSnapshotStore creates the directory and retention policy for RAFT snapshots (nRetainedSnapShots kept); failure is wrapped as 'file snapshot store: %w'. Snapshots are required for log compaction and fast restarts, so startup cannot proceed without it.
Source
Thrown at cluster/store.go:565
return fmt.Errorf("mkdir %s: %w", st.cfg.WorkDir, err)
}
// log store
st.logStore, err = raftbolt.NewBoltStore(filepath.Join(st.cfg.WorkDir, raftDBName))
if err != nil {
return fmt.Errorf("bolt db: %w", err)
}
// log cache
st.logCache, err = raft.NewLogCache(logCacheCapacity, st.logStore)
if err != nil {
return fmt.Errorf("log cache: %w", err)
}
// file snapshot store
st.snapshotStore, err = raft.NewFileSnapshotStore(st.cfg.WorkDir, nRetainedSnapShots, st.log.Out)
if err != nil {
return fmt.Errorf("file snapshot store: %w", err)
}
// tcp transport
advertiseAddress := net.JoinHostPort(st.cfg.Host, fmt.Sprintf("%d", st.cfg.RaftPort))
tcpAddr, err := net.ResolveTCPAddr("tcp", advertiseAddress)
if err != nil {
return fmt.Errorf("net.resolve tcp address=%v: %w", advertiseAddress, err)
}
bindAddress := net.JoinHostPort(st.cfg.BindAddr, fmt.Sprintf("%d", st.cfg.RaftPort))
st.raftTransport, err = st.raftResolver.NewTCPTransport(bindAddress, tcpAddr, tcpMaxPool, tcpTimeout, st.log)
if err != nil {
return fmt.Errorf("raft transport address=%v tcpAddress=%v maxPool=%v timeOut=%v: %w", bindAddress, tcpAddr, tcpMaxPool, tcpTimeout, err)
}
st.log.WithFields(logrus.Fields{
"action": "raft_tcp_transport",
"raft_bind_address": bindAddress,
"raft_advertise_address": advertiseAddress,View on GitHub (pinned to 75aa4b6d11)
Solutions
- Inspect/fix permissions on the raft work dir and its snapshots subdirectory
- Free disk space and check inodes (df -i)
- Remove corrupted leftover snapshot files if the node can resync from peers
- Ensure nRetainedSnapShots (snapshot retention) is a sane positive value in source/config
- Restore the whole RAFT dir from a consistent backup rather than partial copy
Defensive patterns
Strategy: validation
Validate before calling
// pre-check snapshot dir
snapDir := filepath.Join(workDir, "snapshots")
if err := os.MkdirAll(snapDir, 0o755); err != nil { exit }
if unix.Access(snapDir, unix.W_OK) != nil { exit } Try / catch
if err := raft.NewFileSnapshotStore(workDir, nRetainedSnapShots, logOut); err != nil {
log.Fatalf("file snapshot store: %v — check dir perms, disk space, corrupt snapshots in %s", err, workDir)
} Prevention
- Monitor free space and inodes on the raft volume
- Preserve the snapshots dir in backups/restores
- Fix ownership after restoring data from archives
- Keep retention count at a sane default
When it happens
Trigger: Cannot create/read the snapshots subdirectory under WorkDir; permission denied; disk full; too many/invalid existing snapshot files; invalid retention count.
Common situations: Snapshot dir partially deleted or corrupted after crash; read-only volume; inode/space exhaustion; backups restored without the snapshots dir permissions.
Related errors
- snapshot shard %v: %w
- get tenant status for %s/%s: %w
- create snapshot for shard %s: %w
- stat objects bucket dir for shard %s: %w
- hardlink unloaded shard %s: %w
AI-assisted analysis of weaviate/weaviate@75aa4b6d11 (2026-09-04).
Data as JSON: /api/errors/093177a536f9f149.
Report an issue: GitHub.