Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArcGIS WebAdaptor 11.1 always reconfigured #466

Closed
Biboba opened this issue May 6, 2023 · 5 comments
Closed

ArcGIS WebAdaptor 11.1 always reconfigured #466

Biboba opened this issue May 6, 2023 · 5 comments
Assignees
Labels
bug Something isn't working HasAWorkaround will fix

Comments

@Biboba
Copy link

Biboba commented May 6, 2023

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request

Module Version

  • 4.1.0

Affected Resource(s)

  • ArcGIS_WebAdaptor

Configuration Files

GisPortalAGSDeployment_anonymous.txt

Expected Behavior

If webAdaptor is already configured, it should not be configured again.

Actual Behavior

If webAdaptor is already configured, it is configured again.

Steps to Reproduce

Run the attached configuration several times: even if web adaptor is already configured, it is configured again.
Here is the log with a webadaptor already installed:

05.05.2023 08:30:02: [AGS01]: LCM:  [ Start  Resource ]  [[ArcGIS_WebAdaptor]ConfigureServerWebAdaptorAGS01]
05.05.2023 08:30:02: [AGS01]: LCM:  [ Start  Test     ]  [[ArcGIS_WebAdaptor]ConfigureServerWebAdaptorAGS01]
05.05.2023 08:30:02: [AGS01]: LCM:  [ End    Test     ]  [[ArcGIS_WebAdaptor]ConfigureServerWebAdaptorAGS01]  in 0.0680 seconds.
05.05.2023 08:30:02: [AGS01]: LCM:  [ Start  Set      ]  [[ArcGIS_WebAdaptor]ConfigureServerWebAdaptorAGS01]
05.05.2023 08:30:02: [AGS01]:                            [[ArcGIS_WebAdaptor]ConfigureServerWebAdaptorAGS01] https://AGS01.company.com/arcgis/webadaptor
05.05.2023 08:30:07: [AGS01]:                            [[ArcGIS_WebAdaptor]ConfigureServerWebAdaptorAGS01] Output of execution:- 
Configuring the ArcGIS Enterprise Web Adaptor with ArcGIS Server.

Configuring Web adaptor...

The ArcGIS Web Adaptor has been successfully configured.
05.05.2023 08:30:07: [AGS01]: LCM:  [ End    Set      ]  [[ArcGIS_WebAdaptor]ConfigureServerWebAdaptorAGS01]  in 2.6780 seconds.
05.05.2023 08:30:07: [AGS01]: LCM:  [ End    Resource ]  [[ArcGIS_WebAdaptor]ConfigureServerWebAdaptorAGS01]

Important Factoids

I debug a little bit and I think the culprit is here:

$WAConfig object is properly retrieved but $WAConfig .url does not exist. It should be $WAConfig.gisserver.url or $WAConfig.portal.url depending on the component to register.

References

Thanks !

@Biboba
Copy link
Author

Biboba commented May 16, 2023

Hi @cameronkroeker,
Any feedback on this issue ? Were you able to reproduce ?
Thanks

@cameronkroeker
Copy link
Contributor

Hi @Biboba,

Great catch! I was able to reproduce it. Here is a workaround that worked for me:

Change:

To:

$WAConfigSiteUrl = if($Component -ieq "Portal"){ $WAConfig.portal.url }else{ $WAConfig.gisserver.url }

Thanks,
Cameron K.

@widsuoids
Copy link

widsuoids commented Jul 11, 2023

The workaround does not work for me:

[[ArcGIS_InstallPatch]PortalInstallPatch]
PowerShell DSC resource ArcGIS_InstallPatch  failed to execute Set-TargetResource
functionality with error message: Error downloading remote file. Error - Exception calling "DownloadFile" with "2"
argument(s): "The remote server returned an error: (404) Not Found."
At C:\Program Files\WindowsPowerShell\Modules\ArcGIS\4.1.0\ArcGIS.psm1:261 char:5
+     Trace-DSCJob -Job $Job -JobName $ConfigurationName -DebugMode $De ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Trace-DSCJob

image

Any ideas? @Biboba @cameronkroeker

@cameronkroeker
Copy link
Contributor

The workaround does not work for me:

[[ArcGIS_InstallPatch]PortalInstallPatch]
PowerShell DSC resource ArcGIS_InstallPatch  failed to execute Set-TargetResource
functionality with error message: Error downloading remote file. Error - Exception calling "DownloadFile" with "2"
argument(s): "The remote server returned an error: (404) Not Found."
At C:\Program Files\WindowsPowerShell\Modules\ArcGIS\4.1.0\ArcGIS.psm1:261 char:5
+     Trace-DSCJob -Job $Job -JobName $ConfigurationName -DebugMode $De ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Trace-DSCJob

image

Any ideas? @Biboba @cameronkroeker

Hi @widsuoids,

Looks like a different issue. It's failing to download portal patches from the internet. The suggested workaround for this topic is to solve an issue where the Webadaptor always configures with portal/server even though it has been configured on previous attempts.

Thanks,
Cameron K.

@cameronkroeker
Copy link
Contributor

This issue has been addressed in release v4.20.

https://github.com/Esri/arcgis-powershell-dsc/releases/tag/v4.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working HasAWorkaround will fix
Projects
None yet
Development

No branches or pull requests

3 participants