azure-cli-extensions
azure-cli-extensions copied to clipboard
"az appservice kube create" throwing Internal server error
- If the issue is to do with Azure CLI 2.0 in-particular, create an issue here at Azure/azure-cli
Related command
az appservice kube create
Extension name (the extension in question)
appservice-kube
Description of issue (in as much detail as possible)
I was following the doc Set up an Azure Arc-enabled Kubernetes cluster to run App Service, Functions, and Logic Apps (Preview) to deploy App Service to my Arc-enabled Kubernetes cluster, but failed at the last step "Create the App Service Kubernetes environment":
Internal server error occurred. Couldn't confirm connectivity to Arc-enabled cluster: /subscriptions/4dd59660-430d-4771-835d-b17a17362e07/resourceGroups/AzureArcTest/providers/Microsoft.Kubernetes/connectedClusters/my-cluster-1. Exception: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Identity.Client, Version=4.40.0.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'Microsoft.Identity.Client, Version=4.40.0.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae'
at Microsoft.Web.Hosting.Administration.Kube.ArcClient.AcquirePoPTokenForCluster(String host, String tenantId, String clusterApiServerId, String subscriptionId)
at Microsoft.Web.Hosting.Administration.Kube.K8SEHelper.GetRefreshedKubeConfig(String originalKubeConfig, String subscriptionId, String kubernetesEnvironmentName)
at Microsoft.Web.Hosting.Administration.Kube.K8SEHelper.RefreshKubeConfigAccessTokenIfNeeded(String kubeconfig, String& refreshedKubeConfig, String kubernetesEnvironmentName, String subscriptionId, Boolean forceRefresh)
at Microsoft.Web.Hosting.Administration.GeoScale.Csm.Controllers.KubeEnvironmentsCsmController.GetK8SEClient(AppServiceOnArcInfo info, KubeEnvironment newKubeEnvironment)
at Microsoft.Web.Hosting.Administration.GeoScale.Csm.Controllers.KubeEnvironmentsCsmController.CheckAccessToArcCluster(AppServiceOnArcInfo info, KubeEnvironment newKubeEnvironment)
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
All the steps before this one succeeded without any error messages, and I'm able to connect to my cluster using az connectedk8s proxy so I think it's connected to Azure.
My appservice-kube extension version is 0.1.7.
route to CXP team
This looks to indicate that the Kubernetes cluster is no longer connected to Azure Arc. What is the status of the connected cluster? This can be found either through cli - az connectedk8s -n
The command az connectedk8s show shows that the cluster is connected:

And now I tried the command again, it shows a different error:
Internal server error occurred. Error obtaining Arc information System.Exception: Extension not installed succesfully. ProvisioningState: "Failed". InstallState: "Failed". ErrorInfo: "". Extension details: Id: /subscriptions/4dd59660-430d-4771-835d-b17a17362e07/resourceGroups/AzureArcTest/providers/Microsoft.Kubernetes/connectedClusters/my-cluster-1/providers/Microsoft.KubernetesConfiguration/extensions/appservice-ext//appservice-ext. Type Microsoft.Web.Appservice. Custom Location: /subscriptions/4dd59660-430d-4771-835d-b17a17362e07/resourcegroups/azurearctest/providers/microsoft.extendedlocation/customlocations/cluster-1-appservice-1.
at Microsoft.Web.Hosting.Administration.Kube.ArcClient.GetExtension(CustomLocationInfo customLocation, String kubernetesEnvironmentName)
at Microsoft.Web.Hosting.Administration.Kube.ArcClient.ObtainAppServiceOnArcInfo(String customLocationId, String kubernetesEnvironmentName)
at Microsoft.Web.Hosting.Administration.GeoScale.Csm.Controllers.KubeEnvironmentsCsmController.CreateOrUpdateArcEnvironment(IRepositoryContext context, Subscription dbSub, ResourceGroup dbResourceGroup, GeoRegionLocation dbGeoRegionLocation, KubeEnvironment dbKubeEnv, KubeEnvironment kubeEnvironment, Dictionary`2 tags)
Now I wonder if there's something I missed during the set up?
Some additional information
- The cluster is deploy via AKS on HCI
- I didn't deploy Log Analytic Workspace since it's not mandatory
@johnliu55-msft Are you still having issues? @apwestgarth Any suggestions on this.
Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!