Solved

Cannot Deploy ANY Csutomizations- Getting StorageException Error

  • 24 August 2023
  • 6 replies
  • 90 views

Userlevel 4
Badge

I have a customer that I cannot publish ANY customizations for. (This is on my development server.)

I have 12 different customers running on this server. All of them are fine. However, when I try to publish ant customizations for one particular customer, I get errors.

Here is the process:

  1. I backup the customer’s database using SQL Server Backup and restore it to my local SQL Server.
  2. I create a new Application Instance using AcumaticaConfig.exe, attaching it to an existing database (done in step 1)
  3. I start up the application in IIS
  4. I go to the customizations page, and of course all customizations are unpublished
  5. I try to publish ANY of them -- even the Acumatica Github Customizations (eg PXLineCostForAccrue) -- ANYTHING, and I get this error:
[2023-08-24 19:01:46.663] Compiled projects: PXLineCostForAccrue[07.17.23]
[2023-08-24 19:01:46.720] Validation started.
[2023-08-24 19:01:46.766] Microsoft.WindowsAzure.Storage.StorageException: The remote server returned an error: (403) Forbidden. ---> System.Net.WebException: The remote server returned an error: (403) Forbidden.
at System.Net.HttpWebRequest.GetResponse()
at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[T](RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext)
--- End of inner exception stack trace ---
at PX.SM.BlobStorageProviderDefinition.CheckInitError()
at PX.SM.PXBlobStorage.Load(Guid id)
at PX.SM.UploadFileRevision.get_Data()
at Customization.CstBinFile.GetFileFromDb()
at Customization.CstBinFile.SaveFiles(FilesCollection context)
at Customization.CstDocument.GetFiles(FilesCollection context)
at Customization.CstManager.ValidateDocument(CstDocument doc, ICustomizationLogger logger, Boolean patchLibInDB)
at PX.Customization.CstValidationProcess.ValidateCurrentDocument(ICustomizationLogger logger)
at PX.Customization.CstValidationProcess.CompileInternal()
Request Information
RequestID:7cd7b5da-001e-0001-57bc-d6ca18000000
RequestDate:Thu, 24 Aug 2023 18:55:29 GMT
StatusMessage:This request is not authorized to perform this operation.
[2023-08-24 19:01:46.766] An error has occurred. Please report this error to the technical support and attach the information provided above.

I’ve tried recreating and reimporting the database, deleting and reinstalling the IIS application. Nothing works. This only happens with this customer. Every other customer running on this server works fine (and I followed the same steps as listed above) I think the issue must be in the customer’s data file somehow.

It seems like some database file is locked or something. But I don’t know how to go about fixing this.

Any ideas?

 

 

icon

Best answer by darylbowman 24 August 2023, 23:37

View original

6 replies

Badge +11

Have you checked if External File Storage is configured in any way?

Userlevel 4
Badge

I’m not sure what you mean by this? You mean is the Extension Library of the customization project set to something?

Badge +11

 Does SM202540 look like this?

 

Userlevel 4
Badge

I think you are on to something! Because I get this:

The remote server returned an error: (403) Forbidden.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Net.WebException: The remote server returned an error: (403) Forbidden.

 

Well… I found it and removed the record and I am am closer. But I still can’t publish. Now instead of a 403 error, I am getting

a null reference error, so there must be something else I need to change.

Grrr!

 

For the record, the BlobStorage is defined in:

 

SELECT TOP (1000) [CompanyID]
      ,[Provider]
      ,[AllowWrite]
      ,[IsActive]
  FROM [ADW215].[dbo].[BlobStorageConfig]

 

 

Badge +11

I'm a little confused. Was there an provider configured on that screen?

Userlevel 4
Badge

(The SQL code I showed was just showing where the info was stored in gthe SQL database) 

But, to your question: Yes! They had an Azure storage blob defined. I didn’t have permission to hit that Azure server, apparently, which is why I was out of luck. 

I am only guessing based on what I am finding as I slog through this… Here’s what I think I know:

Apparently every File attached to the customization is stored somewhere in a database. This is so when you unpublish your customizations, and then want to publish them again, Acumatica knows what Dlls to include. The DLLS are stored as blobs -- normally in the regular SQL server database tables somewhere. But when you define an external data source, Acumatica stores these blobs there instead. That is why no customization was allowed to publish. They all needed the external file storage to get the DLLs, and weren’t allowed access.

BUT since it had been defined once, even taking it out of the SQL table BlobStorageConfig did not remove the problem. So, I had to switch the external storage to FILE and then it started complaining because when it tried to find the DLLs, they weren’t there. But, luckily, they gave me the exact file name there were looking for (eg 1cea9d4d-e29f-46c8-a615-de088560999f.bin) and I just created text files and renamed them, so creating empty bin files one by one as they were shown as missing. 

Then it went ahead with the publish. It nagged me about the DLLs being unmanaged code (unmanaged is putting it mildly, they were freakin empty!) but it published. Then I was able to drop the Dlls into the Bin directory, detect modified files, and save it back out.

As of right now, I think this has done an end around all of the mess, and I am operational again. (So now I can start debugging MY code… yay!) 

Thanks for pointing me in the right direction Daryl!

 

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved