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
121 stars 62 forks source link

License in PRVS File From My.Esri.com Not Available From License Server Administrator After Installing License Server with DSC #381

Open ZianAtFirstWatch opened 2 years ago

ZianAtFirstWatch commented 2 years ago

Community Note

Module Version

Affected Resource(s)

{
    "AllNodes": [{
            "NodeName": "FakePC",
            "DataStoreTypes": [
                "Relational"
            ],
            "Role": [
                "DataStore",
                "Server",
                "SQLServerClient",
                "LicenseManager"
            ],
            "SslCertificates": [{
                    "Path": "C:\\PowerShell DSC Installers\\SSLCertificates\\Wildcard\\example.pfx",
                    "Password": "abcd",
                    "Target": [
                        "Portal"
                    ]
                }
            ]
        }
    ],
    "ConfigData": {
        "Version": "10.9.1",
        "LicenseManagerVersion": "2021.1",
        "ServerContext": "fw_arcgisserver",
        "PortalContext": "fw_arcgisportal",
        "ServerRole": "GeneralPurposeServer",
        "Credentials": {
            "ServiceAccount": {
                "Password": "ABug",
                "UserName": "datacenter\\Little_Bug",
                "IsDomainAccount": true,
                "IsMSAAccount": false
            }
        },
        "SQLServerClient": [{
                "Name": "Microsoft ODBC Driver 17 for SQL Server",
                "InstallerPath": "C:\\PowerShell DSC Installers\\10.9.1\\ODBC17SQLServer_64\\msodbcsql_17.8.1_x64.msi",
                "ProductId": "7453C0F5-03D5-4412-BB8F-360574BE29AF",
                "Arguments": "/L*V \"C:\\users\\fwla\\desktop\\odbc installation.log\" /quiet /qn IACCEPTMSODBCSQLLICENSETERMS=YES ADDLOCAL=ALL"
            }
        ],
        "Server": {
            "LicenseFilePath": "C:\\PowerShell DSC Installers\\10.9.1\\ExampleFromMyEsriDotCom.prvc",
            "Installer": {
                "Path": "C:\\PowerShell DSC Installers\\10.9.1\\ArcGIS_Server_Windows_1091_180041.exe",
                "InstallDir": "C:\\Program Files\\ArcGIS\\Server",
                "InstallDirPython": "C:\\Python27"
            },
            "ServerDirectoriesRootLocation": "C:\\arcgisserver\\directories",
            "ConfigStoreLocation": "C:\\arcgisserver\\config-store",
            "PrimarySiteAdmin": {
                "UserName": "HappyBug",
                "Password": "HappyBugPassword"
            }
        },
        "DataStore": {
            "ContentDirectoryLocation": "C:\\arcgisdatastore",
            "EnableFailoverOnPrimaryStop": false,
            "Installer": {
                "Path": "C:\\PowerShell DSC Installers\\10.9.1\\ArcGIS_DataStore_Windows_1091_180054.exe",
                "InstallDir": "C:\\Program Files\\ArcGIS\\DataStore"
            }
        },
        "LicenseManager": {
            "LicenseFilePath ": "C:\\PowerShell DSC Installers\\ArcGISDesktopStandard_FailoverConcurrentUse_000000.prvs",
            "Installer": {
                "Path": "C:\\PowerShell DSC Installers\\ArcGIS_License_Manager_Windows_2021_1_180127.exe",
                "InstallDir": "C:\\Program Files\\ArcGIS\\LicenseManager"
            }
        }
    }
}

Expected Behavior

License Manager should show 1 available license for ArcGIS Pro.

Actual Behavior

No available licenses.

Steps to Reproduce

  1. Buy 1 license for ArcGIS Desktop Standard Concurrent Use (Commercial License and Perpetual)
  2. Go to My.esri.com, click on the authorization number, and download the license file (ending in ".prvs" where one of the lines near the top starts with "Provision ID="
  3. Put the license file in C:\PowerShell DSC Installers\
  4. Run the following PowerShell commands

$Credential=Get-Credential Invoke-ArcGISConfiguration -ConfigurationParametersFile "C:\Users\FakePerson\Desktop\10.9.1 Initial Install Plus License Manager.json" -Mode InstallLicenseConfigure -Credential $Credential

Important Factoids

License Server does install even though the license is not applied. If I try to authorize the software using the PRVS file as described below, the application stops and asks me to enter:

I have a bad feeling that even though the "Convert ArcGIS Pro Named User Licenses" page in My.Esri.com says the license type is already "Concurrent Use", I still have to go through "Convert ArcGIS Pro Named User Licenses" to get the authorization # and PRVS file. However, even if the Pro stuff is broken and my current PRVS file is actually an ArcMap/ArcCatalog PRVS file, I'd still expect License Server to say that an ArcMap (or "Desktop") license is available.

It's possible that the workflow should be improved by the people who deal with My.Esri.com. Unfortunately, the page that My.Esri.com links to (https://pro.arcgis.com/en/pro-app/latest/get-started/licensing-arcgis-pro.htm) from "Convert ArcGIS Pro Named User Licenses" does not mention that this step is necessary for people who paid for a concurrent license and expected to receive a concurrent license rather than a "Named User" license. There's no hint that the conversion is necessary from "View Authorizations" either.

The Pro documentation says (as of March 4 at 3:32 PM Redlands, CA time) "The Named User license type is the default license type for ArcGIS Pro and is only available for ArcGIS Pro. Using a different license type is possible but requires a conversion of licenses through My Esri and is only available for ArcGIS Pro licenses that are part of an ArcGIS Desktop purchase."

References

cameronkroeker commented 2 years ago

Hi @ZianAtFirstWatch,

Can you open the *.prvs license file with a text editor and check if it contains the Your Organization, Your Industry, Yourself in the //User Information section? For example:

// User Information
First Name=Happy
Last Name=Bug
Organization=Little_Bug
Department=Bug_Finders
Email=bug@abug.com
Address 1=380 New York St.
City=Redlands
State/Province=CA
Location=United States
Location Code=US
Zip/Postal Code=92373
Phone Number=909-793-2853
Your Organization=Commercial/Private Business
Your Industry=Other
Yourself=Other

//Features and authorization numbers
Desktop Advanced=EFLXXXXXXXXX=1

The silent authorization could be failing if any of the //User Information missing from the .prvs file. If you manually edit the file, and try again does it successfully authorize?

Thanks, Cameron K.

ZianAtFirstWatch commented 2 years ago

You're right about the prvs file; those entries were missing from a file I just downloaded from my.esri.com even though I clicked both of the "populate" buttons.

Among other things, PowerShell said:

Dot Sourcing the Configuration:- ArcGISLicense
Starting DSC Job:- ArcGISLicense
VERBOSE: Time taken for configuration job to complete is 0.005 seconds
3/10/2022 4:55:00 PM: [STOUTESRI2]: LCM:  [ Start  Set      ]
3/10/2022 4:55:00 PM: [STOUTESRI2]: LCM:  [ Start  Resource ]  [[ArcGIS_License]ServerLicenseStoutESRI2]
3/10/2022 4:55:01 PM: [STOUTESRI2]: LCM:  [ Start  Test     ]  [[ArcGIS_License]ServerLicenseStoutESRI2]
3/10/2022 4:55:01 PM: [STOUTESRI2]: LCM:  [ End    Test     ]  [[ArcGIS_License]ServerLicenseStoutESRI2]  in 0.0320 seconds.
3/10/2022 4:55:01 PM: [STOUTESRI2]: LCM:  [ Start  Set      ]  [[ArcGIS_License]ServerLicenseStoutESRI2]
3/10/2022 4:55:06 PM: [STOUTESRI2]: LCM:  [ End    Set      ]  [[ArcGIS_License]ServerLicenseStoutESRI2]  in 10.0400 seconds.
3/10/2022 4:55:06 PM: [STOUTESRI2]: LCM:  [ End    Resource ]  [[ArcGIS_License]ServerLicenseStoutESRI2]
3/10/2022 4:55:06 PM: [STOUTESRI2]: LCM:  [ End    Set      ]
3/10/2022 4:55:06 PM: [STOUTESRI2]: LCM:  [ End    Set      ]    in  10.1790 seconds.
Logs Directory: C:\Windows\system32\Logs
Finished DSC Job:- ArcGISLicense. Time Taken - 00:00:10.9245634
ArcGISLicense - Completed

Afterwards, ArcGIS License Server Administrator does not show that an additional concurrent license for ArcGIS Desktop is available.

In case it helps, here's a screenshot from DiffMerge that compares my file with your example. DiffMerge Screenshot

cameronkroeker commented 2 years ago

Hi @ZianAtFirstWatch,

I suspect there still must be something not entirely right with the .prvs file. Looking at the diff image, did you update Location=US to Location=United States to your .prvs file?

Let's also add -DebugSwitch parameter to the Invoke-ArcGISConfiguration command, it might give us additional details. For example, we should see something like:

[[ArcGIS_License]LicenseManagerLicenseLMNodeHostName] RealVersion of ArcGIS Software:- 2021.1
[[ArcGIS_License]LicenseManagerLicenseLMNodeHostName] Licensing from C:\software\auth_files\LocalLMDT_CU.prvs
[[ArcGIS_License]LicenseManagerLicenseLMNodeHostName] Version 10.6 Component LicenseManager
[[ArcGIS_License]LicenseManagerLicenseLMNodeHostName] Licensing Product [LicenseManager] using Software Authorization Utility at C:\Program Files\ArcGIS\LicenseManager\bin\SoftwareAuthorizationLS.exe
[[ArcGIS_License]LicenseManagerLicenseLMNodeHostName] [Running Command] C:\Program Files\ArcGIS\LicenseManager\bin\SoftwareAuthorizationLS.exe -s -ver 10.6 -lif "C:\software\auth_files\LocalLMDT_CU.prvs"
[[ArcGIS_License]LicenseManagerLicenseLMNodeHostName] Re-readings Licenses
[[ArcGIS_License]LicenseManagerLicenseLMNodeHostName] License Manager tool operation successful -
[[ArcGIS_License]LicenseManagerLicenseLMNodeHostName] Finished Licensing Product [LicenseManager]

Thanks, Cameron K.

ZianAtFirstWatch commented 2 years ago

I've replaced it with "Location=United States" and re-run the file with -DebugSwitch.

PowerShell never mentioned "LicenseManagerLicenseLMNodeHostName" in the console output. I probably shouldn't post the entire log file on a public GitHub issue. If you'd like a copy, let me know the best way to send it to you.

PowerShell said:


3/11/2022 4:59:48 PM: [STOUTESRI2]: LCM:  [ Start  Resource ]  [[ArcGIS_Install]LicenseManagerInstall]
3/11/2022 4:59:48 PM: [STOUTESRI2]: LCM:  [ Start  Test     ]  [[ArcGIS_Install]LicenseManagerInstall]
3/11/2022 4:59:48 PM: [STOUTESRI2]:                            [[ArcGIS_Install]LicenseManagerInstall] Installed Version 21.0.472
3/11/2022 4:59:48 PM: [STOUTESRI2]: LCM:  [ End    Test     ]  [[ArcGIS_Install]LicenseManagerInstall]  in 0.0100 seconds.
3/11/2022 4:59:48 PM: [STOUTESRI2]: LCM:  [ Skip   Set      ]  [[ArcGIS_Install]LicenseManagerInstall]
3/11/2022 4:59:48 PM: [STOUTESRI2]: LCM:  [ End    Resource ]  [[ArcGIS_Install]LicenseManagerInstall]

Is it possible that the DSC resource isn't checking to make sure the License Server Administrator has the PVRS file applied despite running "-Mode InstallLicenseConfigure"?

Elsewhere in the PowerShell output, I can see the computer checking the license for AGS.

3/11/2022 4:59:59 PM: [STOUTESRI2]: LCM:  [ Start  Resource ]  [[ArcGIS_License]ServerLicenseStoutESRI2]
3/11/2022 4:59:59 PM: [STOUTESRI2]: LCM:  [ Start  Test     ]  [[ArcGIS_License]ServerLicenseStoutESRI2]
3/11/2022 4:59:59 PM: [STOUTESRI2]:                            [[ArcGIS_License]ServerLicenseStoutESRI2] RealVersion of ArcGIS Software to be Licensed:- 10.9.28388
3/11/2022 4:59:59 PM: [STOUTESRI2]:                            [[ArcGIS_License]ServerLicenseStoutESRI2] Version
3/11/2022 4:59:59 PM: [STOUTESRI2]:                            [[ArcGIS_License]ServerLicenseStoutESRI2] License Check Component:- Server
3/11/2022 4:59:59 PM: [STOUTESRI2]: LCM:  [ End    Test     ]  [[ArcGIS_License]ServerLicenseStoutESRI2]  in 0.0350 seconds.
3/11/2022 4:59:59 PM: [STOUTESRI2]: LCM:  [ Start  Set      ]  [[ArcGIS_License]ServerLicenseStoutESRI2]
3/11/2022 4:59:59 PM: [STOUTESRI2]:                            [[ArcGIS_License]ServerLicenseStoutESRI2] RealVersion of ArcGIS Software:- 10.9.28388
3/11/2022 4:59:59 PM: [STOUTESRI2]:                            [[ArcGIS_License]ServerLicenseStoutESRI2] Licensing from C:\PowerShell DSC Installers\10.9.1\ArcGISGISServerStandard_ArcGISServer_1117397.prvc
3/11/2022 4:59:59 PM: [STOUTESRI2]:                            [[ArcGIS_License]ServerLicenseStoutESRI2] Version 10.9 Component Server Role GeneralPurposeServer
3/11/2022 4:59:59 PM: [STOUTESRI2]:                            [[ArcGIS_License]ServerLicenseStoutESRI2] Licensing Product [Server] using Software Authorization Utility at C:\Program Files\Common Files\ArcGIS\bin\SoftwareAuthorization.exe
3/11/2022 4:59:59 PM: [STOUTESRI2]:                            [[ArcGIS_License]ServerLicenseStoutESRI2] [Running Command] C:\Program Files\Common Files\ArcGIS\bin\SoftwareAuthorization.exe -s -ver 10.9 -lif "C:\PowerShell DSC Installers\10.9.1\ArcGISGISServerStandard_ArcGISServer_1117397.prvc"
3/11/2022 5:00:09 PM: [STOUTESRI2]:                            [[ArcGIS_License]ServerLicenseStoutESRI2] Finished Licensing Product [Server]
3/11/2022 5:00:09 PM: [STOUTESRI2]: LCM:  [ End    Set      ]  [[ArcGIS_License]ServerLicenseStoutESRI2]  in 11.6040 seconds.
3/11/2022 5:00:09 PM: [STOUTESRI2]: LCM:  [ End    Resource ]  [[ArcGIS_License]ServerLicenseStoutESRI2]
cameronkroeker commented 2 years ago

Hi @ZianAtFirstWatch,

This is definitely strange, the module should be doing the ArcGIS Server Authorization and the License Manager authorization. I am not quite sure why its not.

I recommend contacting Esri Technical Support. They have the ability to setup a secure FTP for files, and also ability to screen share to further troubleshoot the issue.

Thanks, Cameron K.

github-actions[bot] commented 3 weeks ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.