arcgis-powershell-dsc icon indicating copy to clipboard operation
arcgis-powershell-dsc copied to clipboard

Web Adaptor URL set to web adaptor host rather than dsnalias

Open dmoiler opened this issue 8 months ago • 2 comments
trafficstars

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

ConfigData.ServerContext : agsgeoservice
Server.ExternalLoadBalancer : dnsalias.domain.local
AllNodes.NodeName : vmwebserver1.domain.local

Following invoke arcgis, the WebAdaptor URL to be configured via "https://dnsalias.domain.local/agsgeoservice" and for the WebAdaptor URL to be "https://dnsalias.domain.local/agsgeoservice" showing it being configured via the web server dns alias friendly name.

Actual Behavior

The WebAdaptor is configured via WebAdaptor URL of "https://vmwebserver1.domain.local/agsgeoservice".

Steps to Reproduce

Run the configuration for a single ArcGIS Server Role to be federated with portal.

Important Factoids

  • Web Adaptors are configured on a dedicated Web Server
  • This initially caused some errors saying that the https://vmwebserver1.domain.local/agsgeoservice URL was not accessible. It was accessible via a browser, but not via PS for some reason, and required IP address binding to be set to "All Unassigned" for it to work.
  • The same situation occurs on GIS, GeoEvent, Image server roles.
  • I can reconfigure the registration manually, but would be good if it WA configuration were the same for Portal and Server given they share the same web server. If I run the configuration again it'll configures additional WAs with the server.
  • The WebContext URL appears set correctly
  • The Base Install AGS instance is configured via "https://dnsalias.domain.local/agsmapservice"
  • I have tried with and without InternalLoadBalancer & InternalLoadBalancerPort also, with no success to setting the WA URL.

References

https://enterprise.arcgis.com/en/web-adaptor/latest/install/iis/configure-arcgis-web-adaptor-server.htm https://enterprise.arcgis.com/en/web-adaptor/latest/install/iis/configure-arcgis-web-adaptor-portal.htm

Image

dmoiler avatar Feb 26 '25 18:02 dmoiler

Hi @dmoiler,

The web adaptor hostname used for configuring the web adaptor url is defined here:

https://github.com/Esri/arcgis-powershell-dsc/blob/539a5adada7de60e3b5ce801a74020c0e3112d61/Modules/ArcGIS/Configurations-OnPrem/ArcGISWebAdaptor.ps1#L133

Essentially it will first look for and use WebAdaptorConfig.Hostname, if this is not defined in the json then it will look for and use SslCertificates.CNameFQDN, and if neither of those are defined in the json then it will fall back and use the local machine name.

Can you try setting WebAdaptorConfig.Hostname attribute in your json config? For example:

{
   "AllNodes": [
      {
         "NodeName": "vmwebserver1.domain.local",
         "Role": [
            "WebAdaptor"
         ],
         "WebAdaptorConfig": [
            {
               "Role": "Server",
               "Context": "agsgeoservice",
               "AdminAccessEnabled": true,
               "WebSiteId": 1,
               "HostName": "dnsalias.domain.local"
            }
        ]
   }]
}

Thanks, Cameron K.

cameronkroeker avatar Feb 26 '25 18:02 cameronkroeker

Hi Cameron,

That's exactly what I was after! I couldn't find that anywhere in the variables reference.

I do have the CNameFQDN set for the certificates, but thought this was used for the alias of the certificate when installed to portal and to confirm the hostname matches the certificate CN or SAN.

Thanks for the quick response!

Dean

dmoiler avatar Feb 27 '25 08:02 dmoiler