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

Upgrade ArcGIS Enterprise from 10.7.1 to 10.8.1 - ServerUpgrade Error #286

Closed gpgis closed 4 years ago

gpgis commented 4 years ago

Community Note

Module Version

Affected Resource(s)

Configuration Files

{
    "AllNodes": [
        {
            "NodeName": "192.168.10.21",
            "DataStoreTypes": [
                "Relational",
                "TileCache",
                "SpatioTemporal"
            ],
            "Role": [
                "Server",
                "Portal",
                "DataStore",
                "ServerWebAdaptor",
                "PortalWebAdaptor"
            ],
            "SslCertificates": [
                {
                    "Path": "E:\\ArcGISEnterpriseDeployment\\SSLCert\\wildcard_gpgis_com.pfx",
                    "Password": "<Removed>",
                    "CNameFQDN": "devservices.gpgis.com",
                    "Target": [
                        "Server",
                        "Portal",
                        "WebAdaptor"
                    ]
                }
            ]
        }
    ],
    "ConfigData": {
        "OldVersion":"10.7.1",
        "Version": "10.8.1",
        "ServerContext": "server",
        "PortalContext": "portal",
        "ServerRole": "GeneralPurposeServer",
        "Credentials": {
           "ServiceAccount": {
                "UserName": "<Removed>",
                "Password": "<Removed>",
                "IsDomainAccount": false
            }
        },
        "SslRootOrIntermediate": [
            {
                "Alias": "devservices.gpgis.com",
                "Path": "E:\\ArcGISEnterpriseDeployment\\SSLCert\\wildcard_gpgis_com.cer"
            }
        ],
        "Server": {
            "LicenseFilePath": "E:\\ArcGISEnterpriseDeployment\\10.8.1\\licenses\\ArcGISGISServerStandard_ArcGISServer_941937_Development.prvc",
            "Installer": {
                "Path": "E:\\ArcGISEnterpriseDeployment\\10.8.1\\setups\\ArcGIS_Server_Windows_1081_175203.exe",
                "InstallDir": "E:\\ArcGIS\\Server",
                "InstallDirPython": "E:\\Python"
            },
            "ServerDirectoriesRootLocation": "E:\\arcgisserver\\directories",
            "ConfigStoreLocation": "E:\\arcgisserver\\config-store",
            "PrimarySiteAdmin": {
                "UserName": "<Removed>",
                "Password": "<Removed>"
            }
        },
        "Portal": {
            "LicenseFilePath": "E:\\ArcGISEnterpriseDeployment\\10.8.1\\licenses\\ArcGIS_Enterprise_Portal_108_329664_20200904_Development.json",
            "PortalLicenseUserTypeId": "creatorUT",
            "Installer": {
                "Path": "E:\\ArcGISEnterpriseDeployment\\10.8.1\\setups\\Portal_for_ArcGIS_Windows_1081_175214.exe",
                "InstallDir": "E:\\ArcGIS\\Portal",
                "WebStylesPath": "E:\\ArcGISEnterpriseDeployment\\10.8.1\\setups\\Portal_for_ArcGIS_Web_Styles_Windows_1081_175215.exe",
                "ContentDir": "E:\\portalforarcgis\\content"
            },
            "ContentDirectoryLocation": "E:\\portalforarcgis\\content\\arcgisportal\\content",
            "PortalAdministrator": {
                "UserName": "<Removed>",
                "Email": "<Removed>",
                "Password": "<Removed>",
                "SecurityQuestionIndex": 1,
                "SecurityAnswer": "<Removed>"
            }
        },
        "DataStore": {
            "ContentDirectoryLocation": "F:\\arcgisdatastore",
            "Installer": {
                "Path": "E:\\ArcGISEnterpriseDeployment\\10.8.1\\setups\\ArcGIS_DataStore_Windows_1081_175216.exe",
                "InstallDir": "F:\\ArcGIS\\DataStore"
            }
        },
        "WebAdaptor": {
            "AdminAccessEnabled": true,
            "Installer": {
                "Path": "E:\\ArcGISEnterpriseDeployment\\10.8.1\\setups\\ArcGIS_Web_Adaptor_for_Microsoft_IIS_1081_175217.exe"
            }
        }
    }
}

Expected Behavior

It should have upgraded the server component and its web adaptor before moving on to the ArcGIS_Data stores as per the config.

Actual Behavior

Error is thrown: `Dot Sourcing the Configuration:- ServerUpgrade Write-NodeMOFFile : Invalid MOF definition for node '192.168.10.21': Exception calling "ValidateInstanceText" with "1" argument(s): "Undefined property LicensePassword At line:61, char:2 Buffer: = "ServerUpgrade"; };^ insta " At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psm1:2369 char:21

Steps to Reproduce

Run this command: Invoke-ArcGISConfiguration -ConfigurationParametersFile "E:\ArcGISEnterpriseDeployment\10.8.1\configs\Dev_ArcGISEnterpriseBaseDeployment.json" -Mode Upgrade -Credential admuser -DebugSwitch

Important Factoids

Our default website was renamed to "Dev ArcGIS Enterprise" at version 10.7.0 and 10.7.1. I reverted it back to "Default Web Site" after we ran into the error shown below when attempting to upgrade the portal & web adaptor. "Unrecognized configuration path 'MACHINE/WEBROOT/APPHOST/Default Web Site/portal"

References

NONE

spitzerr commented 4 years ago

@scma-esrich sounds like your problem today....

scma-esrich commented 4 years ago

@scma-esrich sounds like your problem today....

That's correct. As this issue is not restricted to upgrades, I created a more generic issue here - https://github.com/Esri/arcgis-powershell-dsc/issues/288.

xavierjunod commented 4 years ago

I'm the esri Canada tech support helping @gpgis with this issue. We found that the the error "Undefined property LicensePassword" comes from the line "LicensePassword = $Node.ServerLicensePassword" in the file "\ArcGIS\Configurations-OnPrem\Upgrades\ServerUpgrade.ps1"

Commenting out that line solved the issue.

It looks like a bug: $Node.ServerLicensePassword is an optional variable according to the wiki and was not used in the JSON (see issue details). But it is seen as a required variable.

shailesh91 commented 4 years ago

@xavierjunod thanks for helping out. We will try to fix this issue in the upcoming release.

cameronkroeker commented 4 years ago

@gpgis @scma-esrich we have included a fix for this in release v3.1.1:

https://github.com/Esri/arcgis-powershell-dsc/releases/tag/v3.1.1

Closing the issue but if it's still being encounerted with v3.1.1 please feel free to reopen.

patel1684 commented 2 years ago

Trace-DSCJob : 7/8/2022 7:31:59 PM: Filename: Error: Unrecognized configuration path 'MACHINE/WEBROOT/APPHOST/server' At C:\Program Files\WindowsPowerShell\Modules\ArcGIS\3.3.2\ArcGIS.psm1:261 char:5

Trace-DSCJob : 7/8/2022 7:31:59 PM: PowerShell DSC resource ArcGIS_Install failed to execute Set-TargetResource functionality with error message: Failed to Install ServerWebAdaptor At C:\Program Files\WindowsPowerShell\Modules\ArcGIS\3.3.2\ArcGIS.psm1:261 char:5

Trace-DSCJob : 7/8/2022 7:31:59 PM: The SendConfigurationApply function did not succeed. At C:\Program Files\WindowsPowerShell\Modules\ArcGIS\3.3.2\ArcGIS.psm1:261 char:5