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
110 stars 61 forks source link

Data Store 11.1 Upgrade - "The computer name was not specified and the configuration directory does not have any configuration files." #508

Closed eanderson2030 closed 6 months ago

eanderson2030 commented 6 months ago

Community Note

Module Version

Affected Resource(s)

Configuration Files

{
    "AllNodes": [
        {
            "NodeName": "prtgii01d.dev.ardentmc.com",
            "Role": [
                "Portal"
            ]
        },
        {
            "NodeName": "hstgii01d.dev.ardentmc.com",
            "Role": [
                "Server"
            ]
        },
        {
            "NodeName": "dstgii01d.dev.ardentmc.com",
            "DataStoreTypes": [
                "Relational"
            ],
            "Role": [
                "DataStore"
            ]
        },
        {
            "NodeName": "webgii01d.dev.ardentmc.com",
            "Role": [
                "WebAdaptor"
            ],
            "WebAdaptorConfig": [
                {
                    "Role": "Portal"
                },
                {
                    "Role": "Server"
                }
            ]
        }
    ],
    "ConfigData": {
        "Version": "11.1",
        "OldVersion": "10.9.1",
        "ServerContext": "host",
        "PortalContext": "gii",
        "ServerRole": "GeneralPurposeServer",
        "Credentials": {
            "ServiceAccount": {
                "Password": "<REDACTED",
                "UserName": "DEV\\svc_esri",
                "IsDomainAccount": true,
                "IsMSAAccount": false
            }
        },
        "Server": {
            "LicenseFilePath": "\\\\agsgii01d\\gis\\software\\_licenses\\111\\ArcGISGISServerAdvanced_ArcGISServer_1395145.prvc",
            "Installer": {
                "Path": "\\\\agsgii01d\\gis\\software\\111\\ArcGIS_Server_Windows_111_185208.exe",
                "InstallDir": "E:\\Programs\\ArcGIS\\Server",
                "InstallDirPython": "E:\\Python27",
                "EnableArcMapRuntime": true,
                "EnableDotnetSupport": false
            },
            "ServerDirectoriesRootLocation": "E:\\arcgisserver\\directories",
            "ConfigStoreLocation": "E:\\arcgisserver\\config-store",
            "PrimarySiteAdmin": {
                "UserName": "arcgis",
                "Password": "<REDACTED>"
            }
        },
        "Portal": {
            "LicenseFilePath": "\\\\agsgii01d\\gis\\software\\_licenses\\111\\ArcGIS_Enterprise_Portal_111_438121_20231114.json",
            "PortalLicenseUserTypeId": "creatorUT",
            "Installer": {
                "Path": "\\\\agsgii01d\\gis\\software\\111\\Portal_for_ArcGIS_Windows_111_185219.exe",
                "WebStylesPath": "\\\\agsgii01d\\gis\\software\\111\\Portal_for_ArcGIS_Web_Styles_Windows_111_185220.exe",
                "InstallDir": "E:\\Programs\\ArcGIS\\Portal",
                "ContentDir": "E:\\arcgisportal"
            },
            "ContentDirectoryLocation": "E:\\arcgisportal\\content",
            "PortalAdministrator": {
                "UserName": "portaladmin",
                "Email": "gii.helpdesk@ardentmc.com",
                "Password": "<REDACTED>",
                "SecurityQuestionIndex": 1,
                "SecurityAnswer": "vanilla"
            }
        },
        "DataStore": {
            "ContentDirectoryLocation": "E:\\arcgisdatastore",
            "EnableFailoverOnPrimaryStop": true,
            "Installer": {
                "Path": "\\\\agsgii01d\\gis\\software\\111\\ArcGIS_DataStore_Windows_111_185221.exe",
                "InstallDir": "E:\\Programs\\ArcGIS\\DataStore"
            }
        },
        "WebAdaptor": {
            "AdminAccessEnabled": true,
            "Installer": {
                "Path": "\\\\agsgii01d\\gis\\software\\111\\ArcGIS_Web_Adaptor_for_Microsoft_IIS_111_185222.exe"
            }
        }
    }
}

Expected Behavior

Upgrade Data Store to 11.1

Actual Behavior

Getting below error when running the command in Steps to Repro. It upgrades Portal, Server, and the web adaptors successfully, but fails when running through Data Store Pre-Install/Upgrade. It does not create the Logs folder with the Data Store machine name, failing before getting to this step. You can see clearly in the config file that the machine name is specified.

ArcGIS DataStore Upgrade DataStore Upgrade to 11.1 Dot Sourcing the Configuration:- DataStoreUpgradePreInstall Starting DSC Job:- DataStoreUpgradePreInstall Start-DscConfiguration : The computer name was not specified and the configuration directory does not have any configuration files. At C:\Program Files\WindowsPowerShell\Modules\ArcGIS\ArcGIS.psm1:256 char:16 ... $Job = Start-DscConfiguration -Path ".\$($ConfigurationName)" -F ...

     CategoryInfo          : NotSpecified: (:) [Start-DscConfiguration], ArgumentException
     FullyQualifiedErrorId : System.ArgumentException,Microsoft.PowerShell.DesiredStateConfiguration.Commands.StartDscConfigurationCommand

Logs Directory: E:\\Logs
Finished DSC Job:- DataStoreUpgradePreInstall. Time Taken - 00:00:00.0189513
DataStoreUpgradePreInstall - 
Data Store Pre Upgrade Install Step failed.
At C:\Program Files\WindowsPowerShell\Modules\ArcGIS\ArcGIS.psm1:3056 char:13
            throw "Data Store Pre Upgrade Install Step failed."
 CategoryInfo          : OperationStopped: (Data Store Pre ...ll Step failed.:String) [], RuntimeException
 FullyQualifiedErrorId : Data Store Pre Upgrade Install Step failed.

Steps to Reproduce

Ran in PowerShell ISE (Admin):

Invoke-ArcGISConfiguration -ConfigurationParametersFile \agsgii01d\gis\powershell\gii\configs\420\dev\dev-portal-host-datastore.json -Mode Upgrade -DebugSwitch

Important Factoids

References

cameronkroeker commented 6 months ago

Hi @eanderson2030,

Since this is a single node data store (not highly available primary/standby), could you try setting ConfigData.DataStore.EnableFailoverOnPrimaryStop to false?

Thanks, Cameron K.

eanderson2030 commented 6 months ago

@cameronkroeker - that was exactly the issue, appreciate the speedy response!