Esri / arcgis-powershell-dsc

This repository contains scripts, code and samples for automating the install and configuration of ArcGIS (Enterprise and Desktop) using Microsoft Windows PowerShell DSC (Desired State Configuration).
Apache License 2.0
112 stars 61 forks source link

DataStoreConfigUpgrade: arcgis/datastoreadmin/configure failed #462

Closed Biboba closed 1 year ago

Biboba commented 1 year ago

Community Note

Module Version

Affected Resource(s)

Configuration Files

# Copy-paste your DSC JSON configurations here - for large configs,
# please use a service like Dropbox and share a link to the ZIP file.

Expected Behavior

The Datastore Upgrade should work.

Actual Behavior

It fails with the following error:

 Request to https://localhost:2443/arcgis/datastoreadmin/configure failed. Response returned NULL 

And the log:

26/04/2023 16:08:29: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = SendConfigurationApply,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' = root/Microsoft/Windows/DesiredStateConfiguration'.
26/04/2023 16:08:34: An LCM method call arrived from computer FOOBAR with user sid S-1-5-21-1526224874-1540688658-1361462980-2802571.
26/04/2023 16:08:34: [MAPS11]: LCM:  [ Start  Set      ]
26/04/2023 16:08:34: [MAPS11]: LCM:  [ Start  Resource ]  [[ArcGIS_DataStoreUpgrade]DataStoreConfigUpgrade]
26/04/2023 16:08:34: [MAPS11]: LCM:  [ Start  Test     ]  [[ArcGIS_DataStoreUpgrade]DataStoreConfigUpgrade]
26/04/2023 16:09:34: [MAPS11]:                            [[ArcGIS_DataStoreUpgrade]DataStoreConfigUpgrade] Response:- {"currentVersion":"11.1.0","relational":{"installed":true,"portalUrl":"https://maps.company.com/geoportal","registered":true,"configureRole":"PRIMARY"},"tileCache":{"installed":true,"portalUrl":"https://maps.company.com/geoportal","registered":true,"configureRole":"PRIMARY"},"upgrading":"inplace","defaultContentDirectory":"D:\\arcgisdatastore\\"}
26/04/2023 16:09:34: [MAPS11]:                            [[ArcGIS_DataStoreUpgrade]DataStoreConfigUpgrade] Upgrade in progress - inplace
26/04/2023 16:09:34: [MAPS11]: LCM:  [ End    Test     ]  [[ArcGIS_DataStoreUpgrade]DataStoreConfigUpgrade]  in 64.7210 seconds.
26/04/2023 16:09:34: [MAPS11]: LCM:  [ Start  Set      ]  [[ArcGIS_DataStoreUpgrade]DataStoreConfigUpgrade]
26/04/2023 16:09:44: [MAPS11]:                            [[ArcGIS_DataStoreUpgrade]DataStoreConfigUpgrade] Retrieved server token successfully
26/04/2023 16:09:44: [MAPS11]:                            [[ArcGIS_DataStoreUpgrade]DataStoreConfigUpgrade] Get-DataStoreInfo with serverURL - https://maps11:6443/arcgis
26/04/2023 16:09:44: [MAPS11]:                            [[ArcGIS_DataStoreUpgrade]DataStoreConfigUpgrade] POST https://localhost:2443/arcgis/datastoreadmin/configure with 309-byte payload
26/04/2023 16:10:14: [MAPS11]: LCM:  [ End    Set      ]  [[ArcGIS_DataStoreUpgrade]DataStoreConfigUpgrade]  in 38.0060 seconds.
26/04/2023 16:10:14: [MAPS11]: LCM:  [ End    Set      ]
26/04/2023 16:10:14: Operation 'Invoke CimMethod' complete.

Steps to Reproduce

Reproductible when POSTING configuration to https://localhost:2443/arcgis/datastoreadmin/configure takes longer than 30 sec. On my side I tried already 2 upgrades, on different VM of relatively small ArcGIS Enterprise deployment (datastores not that big (few Go)), and this issue occurs systematically. I have been using ArcGIS Powershell DSC for a while now for upgrades and I never faced this issue. I don't know whether it's related to ArcGIS Enterprise 11.1 (I am upgrading from 11.0) or disk performance on my infrastructure. The funny thing is that it takes systematically 31 sec...

Important Factoids

In the meantime, as a workaround I edited: https://github.com/Esri/arcgis-powershell-dsc/blob/8621f7a7256d6f8b9431caf4674e01c8d3bce249/Modules/ArcGIS/DSCResources/ArcGIS_DataStoreUpgrade/ArcGIS_DataStoreUpgrade.psm1#L277 to add the TimeoutSec parameter to 60 and it fixed the issue: Invoke-ArcGISWebRequest -Url $DataStoreConfigureUrl -HttpFormParameters $WebParams -Referer $Referer -HttpMethod 'POST' -TimeoutSec 60 -Verbose

Thought it would be interesting to open an issue if others faced the same issue. Maybe it could be slightly increase at the next released ?

References

Thanks for listening and for releasing 4.1.0 only few days after ArcGIS Enterprise 11.1 release !

cameronkroeker commented 1 year ago

Hi @Biboba,

This is interesting, I have not come across this issue in any upgrade testing with v4.1.0. Does the VM meet the minimum hardware requirements of ArcGIS Enterprise 11.1, and/or does it have adequate resources when the request is being made?

The Data Store configure POST request at worst should only take a couple of seconds so it is odd that its taking up to 31 seconds.

Thanks, Cameron K.

Biboba commented 1 year ago

Hi @cameronkroeker,

Thanks for your reply. It does meet the requirements but it's true that I did not face it with all my deployments so might be an issue on my side. I am going to close the issue. At least if anybody face this error, they might know where it comes from.

Thanks.