FreePBX / issue-tracker

The unified FreePBX issue tracker.
https://www.freepbx.org
GNU General Public License v3.0
9 stars 1 forks source link

[bug]: Filestore S3 backup error #480

Open bradmclean4898 opened 2 weeks ago

bradmclean4898 commented 2 weeks ago

FreePBX Version

FreePBX 17

Issue Description

After upgrading to FPBX 17 backups to an AWS S3 bucket fail with an error of "Undefined variable $adapterOptions". I have selected the option for storage class to "Not applicable (uncommon)" but cannot get the backup to run. I was able to downgrade to Filestore to 17.0.2.17 which works perfectly.

Operating Environment

FPBX Framework - 17.0.19.13 Asterisk - 21.4.3 Backup Module - 17.0.5.60 Filestore - 17.0.2.30

Relevant log output

Finished Cleaning up
Finished created backup file: 20241007-140444-1728327884-17.0.19.13-1253552745.tar.gz
Performing Local Maintenance
Finished Local Maintenance
Performing Remote Maintenance
Undefined variable $adapterOptions
Finished Remote Maintenance
Saving to selected Filestore locations
Undefined variable $adapterOptions
Finished Saving to selected Filestore locations
There were errors during the backup process
        Undefined variable $adapterOptions
        Undefined variable $adapterOptions
There were warnings during the backup process
        The module miscdests returned no data, No backup created
        The module setcid returned no data, No backup created
        The module ttsengines returned no data, No backup created
jissphilip commented 2 weeks ago

filestore version 17.0.2.31

bradmclean4898 commented 2 weeks ago

Installed 17.0.2.31 and now I get this:

Finished created backup file: 20241008-092418-1728397458-17.0.19.13-1415709667.tar.gz Performing Local Maintenance Finished Local Maintenance Performing Remote Maintenance Finished Remote Maintenance Saving to selected Filestore locations Unable to write file at location: Daily-Backup/. Error executing "PutObject" on "https://aws-bucket-uri/Daily-Backup/"; AWS HTTP error: Client error: PUT https://aws-bucket-uri/Daily-Backup/ resulted in a 400 Bad Request response: AccessControlListNotSupportedThe bucket does not all (truncated...) AccessControlListNotSupported (client): The bucket does not allow ACLs - AccessControlListNotSupportedThe bucket does not allow ACLsZ1JNEFPG5DCR9T8GUUVfTgSVK0OdwBLplGpG/ZBCRLS7xN3jfU8K7PSG45bIN7kaeeZjBQD5FFFd4XgimfudSewUwqY=Finished Saving to selected Filestore locations There were errors during the backup process   Unable to write file at location: Daily-Backup/. Error executing "PutObject" on "https://aws-bucket-uri/Daily-Backup/"; AWS HTTP error: Client error: PUT https://bucketnam.s3.amazonaws.com/folder/Daily-Backup/ resulted in a 400 Bad Request response: AccessControlListNotSupportedThe bucket does not all (truncated...) AccessControlListNotSupported (client): The bucket does not allow ACLs - AccessControlListNotSupportedThe bucket does not allow ACLsZ1JNEFPG5DCR9T8GUUVfTgSVK0OdwBLplGpG/ZBCRLS7xN3jfU8K7PSG45bIN7kaeeZjBQD5FFFd4XgimfudSewUwqY=There were warnings during the backup process   The module miscdests returned no data, No backup created   The module setcid returned no data, No backup created   The module ttsengines returned no data, No backup created Generated Backup process result email to notify@example.com. Status: Failure

Akarsh04 commented 2 weeks ago

@bradmclean4898

Please review your S3 bucket permissions and let us know if the issue still persists after ensuring proper write permissions to the bucket.

Thanks

bradmclean4898 commented 2 weeks ago

I haven’t made any changes to any permissions on my bucket. When I downgrade Filestore to 17.0.2.17 it works fine and is able to write to the bucket.

Since the Storage Class was added to the module I have not been able to save to the bucket.

Thanks

From: Akarsh04 @.> Sent: Wednesday, October 9, 2024 5:48 AM To: FreePBX/issue-tracker @.> Cc: Brad McLean @.>; Mention @.> Subject: Re: [FreePBX/issue-tracker] [bug]: Filestore S3 backup error (Issue #480)

Please review your S3 bucket permissions and let us know if the issue still persists after ensuring proper write permissions to the bucket.

Thanks

Akarsh04 commented 2 weeks ago

Hi @bradmclean4898

We tried our best to identify the cause of this issue but unfortunately could not find any problem on our end.

There are many changes in the recent version of Filestore, including upgraded Composer packages.

As mentioned in your previous comment, the error seems to be related to access control.

Unable to write file at location: Daily-Backup/. Error executing "PutObject" on "https://aws-bucket-uri/Daily-Backup/"; AWS HTTP error: Client error: PUT https://aws-bucket-uri/Daily-Backup/ resulted in a 400 Bad Request response:
AccessControlListNotSupportedThe bucket does not all (truncated...)
AccessControlListNotSupported (client): The bucket does not allow ACLs - AccessControlListNotSupportedThe bucket does not allow ACLsZ1JNEFPG5DCR9T8GUUVfTgSVK0OdwBLplGpG/ZBCRLS7xN3jfU8K7PSG45bIN7kaeeZjBQD5FFFd4XgimfudSewUwqY=

I suggest checking the access control settings once more. If the issue still persists, please provide us with system access to investigate further, if possible.

Thanks

kguptasangoma commented 2 weeks ago

also @bradmclean4898 could you please try to check another versions to see if you can find exactly which version you are seeing this stopped working like 17.0.2.20, 17.0.2.15, 17.0.2.28 etc

bradmclean4898 commented 6 days ago

I ran a number of tests on different versions. 17.0.2.18 works with no issue.

Finished Cleaning up Finished created backup file: 20241018-092350-1729261430-17.0.19.16-23079784.tar.gz Performing Local Maintenance Removing /var/spool/asterisk/backup/Daily-Backup/20241013-020003-1728802803-17.0.19.13-990404542.tar.gz Finished Local Maintenance Performing Remote Maintenance Finished Remote Maintenance Saving to selected Filestore locations   Saving to: S3:'AWS' instance ,File location: awsfolder/Daily-Backup/20241018-092350-1729261430-17.0.19.16-23079784.tar.gz Finished Saving to selected Filestore locations There were warnings during the backup process   The module miscdests returned no data, No backup created   The module setcid returned no data, No backup created   The module ttsengines returned no data, No backup created

If I upgrade to any version 17.0.2.19 or later backup fails trying to save to the AWS bucket.

kguptasangoma commented 6 days ago

Hi @bradmclean4898 by chance possible for you to create a temp user/credential in S3 for us to test? if yes then please send me email with details to kgupta@sangoma.com

thanks