arcgis-powershell-dsc
arcgis-powershell-dsc copied to clipboard
Federation Fails because it's already configured
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.4
Affected Resource(s)
- ArcGIS Server
Configuration Files
"ConfigData": {
"Version": "11.4",
"ServerRole": "GeoEvent",
"ServerContext": "agsgeoservice",
"SkipPatchInstalls": true,
"Credentials": {
"ServiceAccount": {
"UserName": "DOMAIN\\user-account$",
"IsDomainAccount": true,
"IsMSAAccount": true
}
},
"Server": {
"LicenseFilePath": "E:\\administration\\licenses\\11.4\\ArcGISGeoEventServer_ArcGISServer_1507710.prvc",
"Installer": {
"Path": "E:\\software\\esri\\Enterprise\\114\\ArcGIS_Server_Windows_114_192938.exe",
"VolumePaths": [
"E:\\software\\esri\\Enterprise\\114\\ArcGIS_Server_Windows_114_192938.exe.001"
],
"InstallDir": "E:\\apps\\esri\\Server",
"PatchesDir": "E:\\software\\esri\\Enterprise\\Patches\\Installers",
"PatchInstallOrder": []
},
"ServerDirectoriesRootLocation": "E:\\agstore\\arcgisserver\\directories",
"ConfigStoreLocation": "E:\\agstore\\arcgisserver\\config-store",
"ExternalLoadBalancer": "dnsalias.domain.local",
"PrimarySiteAdmin": {
"UserName": "site-admin-account",
"PasswordFilePath": "E:\\administration\\configuration\\upgrade\\"site-admin-account_secure.txt"
}
},
"GeoEventServer": {
"LicenseFilePath": "E:\\administration\\licenses\\11.4\\ArcGISGeoEventServer_ArcGISServer_1507710.prvc",
"Installer": {
"Path": "E:\\software\\esri\\Enterprise\\114\\ArcGIS_GeoEvent_Server_114_192949.exe",
"PatchesDir": "E:\\software\\esri\\Enterprise\\Patches\\Installers",
"PatchInstallOrder": []
},
"EnableGeoeventSDK": false,
"UserBackupConfigFiles": true
},
"WebAdaptor": {
"AdminAccessEnabled": true,
"Installer": {
"Path": "E:\\software\\esri\\Enterprise\\114\\ArcGIS_Web_Adaptor_for_Microsoft_IIS_114_192944.exe"
}
},
"Federation": {
"PortalHostName": "dnsalias.domain.local",
"PortalPort": "443",
"PortalContext": "arcgis",
"PortalAdministrator": {
"UserName": ""site-admin-account",
"PasswordFilePath": "E:\\administration\\configuration\\upgrade\\"site-admin-account_secure.txt"
}
}
}
Expected Behavior
Federation to complete without error if federation already exists.
Actual Behavior
I receive an error indicating the federation already exists.
Trace-DSCJob : 27/02/2025 08:21:39: PowerShell DSC resource ArcGIS_Federation
failed to execute Set-TargetResource functionality with error message:
[ERROR]:- Federation Failed after multiple attempts.
Error:- @{code=400; message=The ArcGIS Server site with services URL 'https://dnsalias.domain.local/agsgeoservice' is already federated with Portal for ArcGIS.
Verify the URL is correct and try again.; details=}
Steps to Reproduce
Run the configuration for a single ArcGIS Server Role to be federated with portal.
Important Factoids
- Not sure whether this is expected if the federation is in the configuration file, but would have thought it should just say "already federated".
- I've tried changing the federation to use web server friendly name & 443, web adaptor alias & 443, portal fqdn host & 7443
- The federation is validating fine, I'm just wanting to confirm the configuration is working to completion.
Does this mean the federation in the configuration is somehow different in the config json from what is configured, or will it always try to federate if the federate flag is in the json?
References
N/A
Hi @dmoiler,
Yes this means the federation parameters being passed in by the dsc config do not match the existing federation parameters. As long as they match then federation will be skipped. Check the federated services url and federated administrative url. The values being passed in by dsc may be recorded in the logs and you can use those to compare with the ones defined in portaladmin federation endpoint.
These parameters are formed based on values passed in for ConfigData.Server.ExternalLoadBalancer/ConfigData.Server.InternalLoadBalancer, or if those are not defined then it will use WA Url and/or internal machine urls. If only the ConfigData.Server.ExternalLoadBalancer and AdminAccessEnabled is set to true then it will use it for both the federated services url and federated admin url. So there are different outcomes based on which attributes are being used.
https://github.com/Esri/arcgis-powershell-dsc/blob/539a5adada7de60e3b5ce801a74020c0e3112d61/Modules/ArcGIS/ArcGIS.psm1#L2306-L2342
Thanks, Cameron K.
Hi Cameron,
That's brilliant, thank you for confirming that's exactly as I was hoping.
Initial configuration was changed in attempt to resolve the web adaptor hostname issue you helped me with in another thread.
I've now gone through and managed to get it to complete successfully without any errors:
Thanks!
Dean
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
This issue has been automatically closed due to inactivity.