benbjohnson/litestream · error
cannot specify url & path for abs replica
Error message
cannot specify url & path for abs replica
What it means
Validation guard in newABSReplicaClientFromConfig that rejects an Azure Blob Storage replica config specifying both the full replica 'url' and its constituent 'path' field; the URL already determines the object prefix. Fires when ReplicaConfig.URL and ReplicaConfig.Path are both non-empty.
Source
Thrown at cmd/litestream/main.go:1761
}
// Ensure required settings are set.
if bucket == "" {
return nil, fmt.Errorf("bucket required for gs replica")
}
// Build replica.
client := gs.NewReplicaClient()
client.Bucket = bucket
client.Path = configPath
return client, nil
}
// newABSReplicaClientFromConfig returns a new instance of abs.ReplicaClient built from config.
func newABSReplicaClientFromConfig(c *ReplicaConfig, _ *litestream.Replica) (_ *abs.ReplicaClient, err error) {
// Ensure URL & constituent parts are not both specified.
if c.URL != "" && c.Path != "" {
return nil, fmt.Errorf("cannot specify url & path for abs replica")
} else if c.URL != "" && c.Bucket != "" {
return nil, fmt.Errorf("cannot specify url & bucket for abs replica")
}
// Build replica.
client := abs.NewReplicaClient()
client.AccountName = c.AccountName
client.AccountKey = c.AccountKey
client.SASToken = c.SASToken
client.Bucket = c.Bucket
client.Path = c.Path
client.Endpoint = c.Endpoint
// Apply settings from URL, if specified.
if c.URL != "" {
u, err := url.Parse(c.URL)
if err != nil {
return nil, errView on GitHub (pinned to 4ed7a308f6)
Solutions
- Keep only one of url or path in the abs replica config
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at cmd/litestream/main.go:1761 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of benbjohnson/litestream@4ed7a308f6 (2026-09-06).
Data as JSON: /api/errors/dd2dcc22de03cfbd.
Report an issue: GitHub.