weaviate/weaviate · error
AZURE_STORAGE_ACCOUNT must be set
Error message
AZURE_STORAGE_ACCOUNT must be set
What it means
backup-azure module Init: no SAS/connection-string credential path was taken, and the AZURE_STORAGE_ACCOUNT environment variable is empty, so the storage client cannot be constructed. The module fails during startup wiring; AZURE_STORAGE_KEY is checked next and reported separately if also missing.
Source
Thrown at modules/backup-azure/client.go:87
if strings.HasPrefix(str, "BlobEndpoint") {
blobEndpoint := strings.Split(str, "=")
if len(blobEndpoint) > 1 {
serviceURL = blobEndpoint[1]
if !strings.HasSuffix(serviceURL, "/") {
serviceURL = serviceURL + "/"
}
}
}
}
return &azureClient{client: client, config: *config, serviceURL: serviceURL, dataPath: dataPath, logger: logger, nodeID: nodeID}, nil
}
// Your account name and key can be obtained from the Azure Portal.
accountName := os.Getenv("AZURE_STORAGE_ACCOUNT")
accountKey := os.Getenv("AZURE_STORAGE_KEY")
if accountName == "" {
return nil, errors.New("AZURE_STORAGE_ACCOUNT must be set")
}
// The service URL for blob endpoints is usually in the form: http(s)://<account>.blob.core.windows.net/
serviceURL := fmt.Sprintf("https://%s.blob.core.windows.net/", accountName)
if accountKey != "" {
cred, err := azblob.NewSharedKeyCredential(accountName, accountKey)
if err != nil {
return nil, err
}
client, err := azblob.NewClientWithSharedKeyCredential(serviceURL, cred, nil)
if err != nil {
return nil, err
}
return &azureClient{client: client, config: *config, serviceURL: serviceURL, dataPath: dataPath, logger: logger, nodeID: nodeID}, nil
}
View on GitHub (pinned to 75aa4b6d11)
Solutions
- Export AZURE_STORAGE_ACCOUNT (and AZURE_STORAGE_KEY) before starting Weaviate
- Alternatively configure the backup-azure module with a SAS URL or connection string so env credentials are not required
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at modules/backup-azure/client.go:87 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of weaviate/weaviate@75aa4b6d11 (2026-09-04).
Data as JSON: /api/errors/2fff2ab38a958807.
Report an issue: GitHub.