juicedata/juicefs · error
session not found: %d
Error message
session not found: %d
What it means
GetSession found neither the current session key nor the legacy session key in the KV store (both reads returned nil). The requested session ID has expired, been removed by session cleanup, or never existed.
Source
Thrown at pkg/meta/tkv.go:863
}
}
}
}
return &s, nil
}
func (m *kvMeta) GetSession(sid uint64, detail bool) (*Session, error) {
var legacy bool
value, err := m.get(m.sessionKey(sid))
if err == nil && value == nil {
legacy = true
value, err = m.get(m.legacySessionKey(sid))
}
if err != nil {
return nil, err
}
if value == nil {
return nil, fmt.Errorf("session not found: %d", sid)
}
s, err := m.getSession(sid, detail)
if err != nil {
return nil, err
}
s.Expire = time.Unix(m.parseInt64(value), 0)
if legacy {
s.Expire = s.Expire.Add(time.Minute * 5)
}
return s, nil
}
func (m *kvMeta) ListSessions() ([]*Session, error) {
ctx := Background()
vals, err := m.scanValues(ctx, m.fmtKey("SE"), -1, nil)
if err != nil {
return nil, err
}View on GitHub (pinned to c9a67b23e8)
Solutions
- Use `juicefs status` to list live session ids
- Re-check the session id; expired sessions cannot be queried
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at pkg/meta/tkv.go:863 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of juicedata/juicefs@c9a67b23e8 (2026-09-06).
Data as JSON: /api/errors/d297db419f709b94.
Report an issue: GitHub.