Stackgres Backup to Azure Blob Container Failing Due to Authentication Issue

Naveen Singh Padiyar 25 Reputation points
2025-04-17T17:11:59.04+00:00

Hi All,

I have deployed Stackgres on an Azure AKS Cluster and am trying to schedule a backup on Stackgres to place the backup files onto an Azure Blob Container.

I have generated the SAS key for the container and used it to create a Backup secret on Stackgres. However, the scheduled backups are failing due to an authentication issue.

Here are the details:

PS C:\temp\Stackgres\mustang> kubectl get sgbackup -n myspace

NAME                                  CLUSTER           MANAGED   STATUS

mustang-cluster-2025-04-17-14-15-08   mustang-cluster   true      Failed

mustang-cluster-2025-04-17-14-15-13   mustang-cluster   true      Failed

mustang-cluster-2025-04-17-14-15-30   mustang-cluster   true      Failed

mustang-cluster-2025-04-17-14-15-56   mustang-cluster   true      Failed

mustang-cluster-2025-04-17-14-30-07   mustang-cluster   true      Failed

mustang-cluster-2025-04-17-14-30-12   mustang-cluster   true      Failed

mustang-cluster-2025-04-17-14-30-29   mustang-cluster   true      Failed

mustang-cluster-2025-04-17-14-31-00   mustang-cluster   true      Failed

PS C:\temp\Stackgres\mustang> kubectl describe sgbackup mustang-cluster-2025-04-17-14-31-00 -n myspace

Name:         mustang-cluster-2025-04-17-14-31-00

Namespace:    myspace

Labels:       stackgres.io/scheduled-backup=true

              stackgres.io/scheduled-backup-job-name=mustang-cluster-backup-29081670

Annotations:  stackgres.io/operatorVersion: 1.16.0

              stackgres.io/scheduled-backup: true

API Version:  stackgres.io/v1

Kind:         SGBackup

Metadata:

  Creation Timestamp:  2025-04-17T14:31:01Z

  Generation:          4

  Resource Version:    35047

  UID:                 e1856089-c3ec-476d-86d6-f6e9e4b8ba94

Spec:

  Managed Lifecycle:       true

  Reconciliation Timeout:  300

  Sg Cluster:              mustang-cluster

Status:

  Backup Path:  sgbackups.stackgres.io/myspace/mustang-cluster/2025-04-17-14-14-16/17

  Process:

    Failure:  Backup failed while performing backup-push:

INFO: 2025/04/17 14:31:02.019993 Backup will be pushed to storage: default

INFO: 2025/04/17 14:31:02.027039 Doing full backup.

INFO: 2025/04/17 14:31:02.032253 Calling pg_start_backup()

INFO: 2025/04/17 14:31:02.171086 Initializing the PG alive checker (interval=1m0s)...

INFO: 2025/04/17 14:31:02.171121 Starting a new tar bundle

INFO: 2025/04/17 14:31:02.171150 Walking ...

INFO: 2025/04/17 14:31:02.171423 Starting part 1 ...

INFO: 2025/04/17 14:31:02.337208 Packing ...

INFO: 2025/04/17 14:31:02.341070 Finished writing part 1.

ERROR: 2025/04/17 14:31:02.386415 upload blob "sgbackups.stackgres.io/myspace/mustang-cluster/2025-04-17-14-14-16/17/basebackups_005/base_000000010000000000000008/tar_partitions/part_001.tar.lz4": write error: ===== RESPONSE ERROR (ErrorCode=AuthenticationFailed) =====

Description=Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.

RequestId:dc7df33e-e01e-004c-35a5-af9efe000000

Time:2025-04-17T14:31:02.3696895Z, Details:

   AuthenticationErrorDetail: The MAC signature found in the HTTP request 'WuMnPGypvsHk1ylG4j1zrVxixqDC8gFcHYtlxq6KOYA=' is not the same as any computed signature. Server used following string to sign: 'PUT

4357457

application/octet-stream

x-ms-date:Thu, 17 Apr 2025 14:31:02 GMT

x-ms-version:2020-10-02

/mustangstorage/mustangbackups/sgbackups.stackgres.io/myspace/mustang-cluster/2025-04-17-14-14-16/17/basebackups_005/base_000000010000000000000008/tar_partitions/part_001.tar.lz4

blockid:/qmbai43RMl9Qw75+Mi86wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==

comp:block'.

ERROR: 2025/04/17 14:31:02.386430 upload: could not upload 'base_000000010000000000000008/tar_partitions/part_001.tar.lz4'

ERROR: 2025/04/17 14:31:02.386432 upload blob "sgbackups.stackgres.io/myspace/mustang-cluster/2025-04-17-14-14-16/17/basebackups_005/base_000000010000000000000008/tar_partitions/part_001.tar.lz4": write error: ===== RESPONSE ERROR (ErrorCode=AuthenticationFailed) =====

Description=Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.

RequestId:dc7df33e-e01e-004c-35a5-af9efe000000

Time:2025-04-17T14:31:02.3696895Z, Details:

   AuthenticationErrorDetail: The MAC signature found in the HTTP request 'WuMnPGypvsHk1ylG4j1zrVxixqDC8gFcHYtlxq6KOYA=' is not the same as any computed signature. Server used following string to sign: 'PUT

4357457

application/octet-stream

x-ms-date:Thu, 17 Apr 2025 14:31:02 GMT

x-ms-version:2020-10-02

/mustangstorage/mustangbackups/sgbackups.stackgres.io/myspace/mustang-cluster/2025-04-17-14-14-16/17/basebackups_005/base_000000010000000000000008/tar_partitions/part_001.tar.lz4

blockid:/qmbai43RMl9Qw75+Mi86wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==

comp:block'.

ERROR: 2025/04/17 14:31:02.386435 Unable to continue the backup process because of the loss of a part 1.

command terminated with exit code 1

    Job Pod:  mustang-cluster-backup-29081670-g2g6n

    Status:   Failed

  Sg Backup Config:

    Base Backups:

      Compression:  lz4

    Storage:

      Azure Blob:

        Azure Credentials:

          Secret Key Selectors:

            Access Key:

              Key:   AZURE_SAS_TOKEN

              Name:  mustang-backup-secret

            Storage Account:

              Key:   AZURE_STORAGE_ACCOUNT

              Name:  mustang-backup-secret

        Bucket:      mustangbackups

      Type:          azureBlob

Events:              

I tested the Storage account using azcopy to copy a file from my local machine, and it worked as expected.

I am not sure where the problem is and need some advice on how to troubleshoot this issue.

Azure Blob Storage
Azure Blob Storage

An Azure service that stores unstructured data in the cloud as blobs.


1 answer

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.