Skip to content

Conversation

skirchner989
Copy link
Contributor

This fixes a bug with the ApplicationGatewayHttpListenerInner resulting in null hostnames when utilizing the multiple hostnames and/or wildcard hostnames feature in an HTTP Listener.

Null hostnames results in the following error when applying any changes to an Application Gateway using this feature:
HostName must be specified if RequireServerNameIndication is true in Http Listener

StackTrace: Microsoft.Azure.WebJobs.Host.FunctionInvocationException: Exception while executing function: SetActiveDeploymentSlot ---> System.AggregateException: One or more errors occurred. (HostName must be specified if RequireServerNameIndication is true in Http Listener /subscriptions/REDACTED/resourceGroups/REDACTED/providers/Microsoft.Network/applicationGateways/REDACTED/httpListeners/REDACTED.) ---> Microsoft.Rest.Azure.CloudException: HostName must be specified if RequireServerNameIndication is true in Http Listener /subscriptions/REDACTED/resourceGroups/REDACTED/providers/Microsoft.Network/applicationGateways/REDACTED/httpListeners/REDACTED. at Microsoft.Azure.Management.Network.Fluent.ApplicationGatewaysOperations.BeginCreateOrUpdateWithHttpMessagesAsync(String resourceGroupName, String applicationGatewayName, ApplicationGatewayInner parameters, Dictionary`2 customHeaders, CancellationToken cancellationToken) at Microsoft.Azure.Management.Network.Fluent.ApplicationGatewaysOperations.CreateOrUpdateWithHttpMessagesAsync(String resourceGroupName, String applicationGatewayName, ApplicationGatewayInner parameters, Dictionary`2 customHeaders, CancellationToken cancellationToken) at Microsoft.Azure.Management.Network.Fluent.ApplicationGatewaysOperationsExtensions.CreateOrUpdateAsync(IApplicationGatewaysOperations operations, String resourceGroupName, String applicationGatewayName, ApplicationGatewayInner parameters, CancellationToken cancellationToken) at Microsoft.Azure.Management.Network.Fluent.ApplicationGatewayImpl.CreateInnerAsync(CancellationToken cancellationToken) at Microsoft.Azure.Management.ResourceManager.Fluent.Core.GroupableParentResource`8.CreateResourceAsync(CancellationToken cancellationToken) at Microsoft.Azure.Management.ResourceManager.Fluent.Core.ResourceActions.Creatable`4.Microsoft.Azure.Management.ResourceManager.Fluent.Core.ResourceActions.IResourceCreator<IResourceT>.CreateResourceAsync(CancellationToken cancellationToken) at Microsoft.Azure.Management.ResourceManager.Fluent.Core.DAG.CreatorTaskItem`1.ExecuteAsync(CancellationToken cancellationToken) at Microsoft.Azure.Management.ResourceManager.Fluent.Core.DAG.TaskGroupBase`1.ExecuteNodeTaskAsync(DAGNode`1 node, CancellationToken cancellationToken) at Microsoft.Azure.Management.ResourceManager.Fluent.Core.ResourceActions.CreatableUpdatable`5.ApplyAsync(CancellationToken cancellationToken, Boolean multiThreaded) --- End of inner exception stack trace ---

@weidongxu-microsoft
Copy link
Member

Emm, 2019-09-01 is still hostnames, while latest is now hostNames. I guess backend messed-up again.

I will merge the fix, but please note that this lib is to be deprecated. New lib is https://aka.ms/azsdk/dotnet/mgmt

@weidongxu-microsoft weidongxu-microsoft merged commit 746ec05 into Azure:master Aug 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants