Introduction
Problem
When attempting to restore or save a Vault snapshot on integrated storage, the following error is returned from the CLI:
Error installing the snapshot: context deadline exceeded
You may also observe the following error in the Vault Operational Log:
2023-04-28T14:04:52.007Z [ERROR] storage.raft.snapshot: failed to close snapshot decompressor: error="stream error: stream ID 1; CANCEL"
2023-04-28T14:04:52.007Z [ERROR] core: raft snapshot restore: failed to write snapshot: error="failed to read snapshot file: failed to read or write snapshot data: stream error: stream ID 1; CANCEL"
Cause
This issue can be due to a large snapshot which causes a client timeout on the CLI. The default Client timeout for vault is 60 seconds.
Solution
Set the VAULT_CLIENT_TIMEOUT
environment variable to a larger value to allow for the snapshot to be completely loaded before the timeout occurs.
Additional Information
Please see the following documentation regarding Large Raft Snapshots: