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

Enterprise 11.1 - Error creating site when using Azure Storage accounts. #520

Open vassilo opened 10 months ago

vassilo commented 10 months ago

Community Note

Module Version

Affected Resource(s)

Configuration Files

            "ConfigStoreCloudStorageAccount":{
                "UserName": "mneustortestesri01.blob.core.windows.net/hosting-config-store",
                "Password": "<AccessKey>",
                "CloudStorageType": "AzureBlob",
                "CloudNamespace": "mneustortestesri01_hosting-config-store",
                "AzureBlobAuthenticationType": "AccessKey"
            }, 

and 

            "ConfigStoreCloudStorageAccount":{
                "UserName": "mneustortestesri01.blob.core.windows.net/hosting-config-store",
                "CloudStorageType": "AzureBlob",
                "AzureBlobAuthenticationType": "ServicePrincipal",
                "AzureBlobServicePrincipal": {
                    "TenantId": "2864f69d-77c3-xxxx-xxxx-97502052391a",
                    "ClientId": "10a7e774-a8fc-xxxxx-xxx-98e7e6e6658a",
                    "ClientSecret": "WZp8Q----------------xkBR402yddjo"
                }
            }, 

Expected Behavior

Connect to the storage account and create the ArcGIS GIS Server site or Portal for ArcGIS site.

Actual Behavior

When using access keys to connect to the storage account

1/18/2024 5:18:11 AM: [mneu-t-a-esri01]: [[ArcGIS_Server]Servermneu-t-a-esri01.anglo.local] Response from CreateSite:- { "status": "error", "messages": [ "No such host is known (mneustortestesri01.table.core.windows.net)." ], "code": 500 } 1/18/2024 5:18:11 AM: [mneu-t-a-esri01]: [[ArcGIS_Server]Servermneu-t-a-esri01.anglo.local] [WARNING] Error while creating site on attempt 1 Error:- CreateSite Failed. Error:- No such host is known (mneustortestesri01.table.core.windows.net). 1/18/2024 5:18:11 AM: [mneu-t-a-esri01]: [[ArcGIS_Server]Servermneu-t-a-esri01.anglo.local] [WARNING] Unable to create Site. Error:- CreateSite Failed. Error:- No such host is known (mneustortestesri01.table.core.windows.net). 1/18/2024 5:18:11 AM: [mneu-t-a-esri01]: [[ArcGIS_Server]Servermneu-t-a-esri01.anglo.local] CreateSite Failed. Error:- No such host is known (mneustortestesri01.table.core.windows.net).

It is seems to be trying to connect to table storage instead of blob storage.

When using a service principle to connect to the storage account

1/19/2024 4:53:57 AM: [mneu-t-a-esri01]: [[ArcGIS_Server]Servermneu-t-a-esri01.anglo.local] Response from CreateSite:- { "status": "error", "messages": [ "Failed to create the site. Configuration store error. Azure cloud storage namespace \u0027null\u0027 schema creation failed in 1 ms. Invalid connection string. " ], "code": 500 } 1/19/2024 4:53:57 AM: [mneu-t-a-esri01]: [[ArcGIS_Server]Servermneu-t-a-esri01.anglo.local] [WARNING] Error while creating site on attempt 1 Error:- CreateSite Failed. Error:- Failed to create the site. Configuration store error. Azure cloud storage namespace 'null' schema creation failed in 1 ms. Invalid connection string. 1/19/2024 4:53:57 AM: [mneu-t-a-esri01]: [[ArcGIS_Server]Servermneu-t-a-esri01.anglo.local] [WARNING] Unable to create Site. Error:- CreateSite Failed. Error:- Failed to create the site. Configuration store error. Azure cloud storage namespace 'null' schema creation failed in 1 ms. Invalid connection string. 1/19/2024 4:53:57 AM: [mneu-t-a-esri01]: [[ArcGIS_Server]Servermneu-t-a-esri01.anglo.local] CreateSite Failed. Error:- Failed to create the site. Configuration store error. Azure cloud storage namespace 'null' schema creation failed in 1 ms. Invalid connection string.

Steps to Reproduce

Create a config to connect to Azure Storage account and configure for ArcGIS GIS Server to use it.

Important Factoids

References

cameronkroeker commented 9 months ago

Hi @vassilo,

ArcGIS Server doesn't support specifying a specific container. Let's try removing the/hosting-config-store from the UserName attribute value. For example:

"ConfigStoreCloudStorageAccount":{
   "UserName": "mneustortestesri01.blob.core.windows.net",
   "Password": "<AccessKey>",
   "CloudStorageType": "AzureBlob",
   "CloudNamespace": "mneustortestesri01_hosting-config-store",
   "AzureBlobAuthenticationType": "AccessKey"
},

Thanks, Cameron K.

vassilo commented 9 months ago

Hi @cameronkroeker

When using a Service Principle Name I still get the

1/22/2024 3:56:32 AM: [mneu-t-a-esri01]: [[ArcGIS_Server]Servermneu-t-a-esri01.anglo.local] Response from CreateSite:- { "status": "error", "messages": [ "Failed to create the site. Configuration store error. Azure cloud storage namespace \u0027null\u0027 schema creation failed in 0 ms. Invalid connection string. " ], "code": 500 }

And when using the Access Key

1/22/2024 4:01:13 AM: [mneu-t-a-esri01]: [[ArcGIS_Server]Servermneu-t-a-esri01.anglo.local] Response from CreateSite:- { "status": "error", "messages": [ "No such host is known (mneustortestesri01.table.core.windows.net)." ], "code": 500 }

Regards, Vassilo

nshampur commented 9 months ago

it appears the storage account is not a general purpose storage account, but a blob only storage account.

The ArcGIS Server config. store needs Table storage endpoints

vassilo commented 9 months ago

Ah ha. Thank you. I will change the account and then test. Maybe the documentation needs to be a bit more specific in the requirements of the storage account. We had selected premium to get it as speedy as possible.

Thanks, Vassilo

vassilo commented 9 months ago

Hi,

I have recreated the storage account to the required one. However, I am still getting the following error when using a SPN.

1/22/2024 9:13:00 AM: [mneu-t-a-esri01]: [[ArcGIS_Server]Servermneu-t-a-esri01.anglo.local] Response from CreateSite:- { "status": "error", "messages": [ "Failed to create the site. Configuration store error. Azure cloud storage namespace \u0027null\u0027 schema creation failed in 0 ms. Invalid connection string. " ], "code": 500 }

Regards, Vassilo

cameronkroeker commented 9 months ago

Hi @vassilo,

Looks like in the json config the AzureBlobAuthenticationType is set to AccessKey rather than ServicePrincipalName. Here is an example for ServicePrincipalName:

"ConfigStoreCloudStorageAccount":{
   "UserName": "mneustortestesri01.blob.core.windows.net",
   "CloudStorageType": "AzureBlob",
   "AzureBlobAuthenticationType": "ServicePrincipal",
   "AzureBlobServicePrincipal": {
      "TenantId": "<tenant>",
      "ClientId": "<appId>",
      "ClientSecret": "<password>"
   },
   "CloudNamespace": "mneustortestesri01_hosting-config-store"
}

Thanks, Cameron K.

vassilo commented 9 months ago

Hi @cameronkroeker

In my initial post I had the config for SPN, which by the looks of it is the same as what you have posted. Could it be a permission issue? The SPN has Storage Blob Data Contributor on the storage account. For the "ClientSecret" do I use the actual password (Value) or the Secret ID?

Regards, Vassilo

cameronkroeker commented 9 months ago

Hi @cameronkroeker

In my initial post I had the config for SPN, which by the looks of it is the same as what you have posted. Could it be a permission issue? The SPN has Storage Blob Data Contributor on the storage account. For the "ClientSecret" do I use the actual password (Value) or the Secret ID?

Regards, Vassilo

Let's check to make sure the storage account has the following:

github-actions[bot] commented 5 days 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.