hashicorp/nomad · error
failed to get source uint64 key %s: %w
Error message
failed to get source uint64 key %s: %w
What it means
Fires in verifyMigration when reading a raft stable-store key (CurrentTerm or LastVoteTerm) from the source store fails; consensus metadata could not be compared, so migration verification aborts.
Source
Thrown at helper/raftutil/migrate.go:285
dstLast, err := dst.LastIndex()
if err != nil {
return fmt.Errorf("failed to get destination last index: %w", err)
}
if srcFirst != dstFirst {
return fmt.Errorf("first index mismatch: source=%d, destination=%d", srcFirst, dstFirst)
}
if srcLast != dstLast {
return fmt.Errorf("last index mismatch: source=%d, destination=%d", srcLast, dstLast)
}
// Verify stable store uint64 keys.
uint64Keys := []string{"CurrentTerm", "LastVoteTerm"}
for _, key := range uint64Keys {
srcVal, err := src.GetUint64([]byte(key))
if err != nil {
return fmt.Errorf("failed to get source uint64 key %s: %w", key, err)
}
dstVal, err := dst.GetUint64([]byte(key))
if err != nil {
return fmt.Errorf("failed to get destination uint64 key %s: %w", key, err)
}
if srcVal != dstVal {
return fmt.Errorf("stable key %s mismatch: source=%d, destination=%d", key, srcVal, dstVal)
}
}
// Verify stable store byte keys.
byteKeys := []string{"LastVoteCand"}
for _, key := range byteKeys {
srcVal, err := src.Get([]byte(key))
if err != nil {
srcVal = nilView on GitHub (pinned to 482b49bf1a)
Solutions
- Check the source store for corruption or file locking issues
- Re-run the migration once the source is readable
- Restore from snapshot if the stable store is damaged
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at helper/raftutil/migrate.go:285 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of hashicorp/nomad@482b49bf1a (2026-09-04).
Data as JSON: /api/errors/f9983871b1d80c66.
Report an issue: GitHub.