Error "NoMatchingListenerHostname" when creating AVI Application virtual service from VCF Automation 9.x
search cancel

Error "NoMatchingListenerHostname" when creating AVI Application virtual service from VCF Automation 9.x

book

Article ID: 442014

calendar_today

Updated On:

Products

VCF Automation

Issue/Introduction

  • Creating a Load Balancer with data, (HTTP) creates the LB on the AVI.
  • Next creating the Pool on the newly created LB, succeeds, however doesn't seem visible on  tenant AVI UI or mapped under the LB. 
  • Moving on as the Pool would need to be linked to a virtual service, creating a virtual service, linked to the LB and the pool, succeeds, however the virtual server too is not see on the UI. The VS created, displays a status as Failed. 
  • The VS shows a Event
    Type: Accepted
    Reason : NoMatchingListenerHostname
    Message : Hostname in Gateway Listener doesn't match with any of the hostnames in HTTPRoute

Environment

  • VCF Automation 9.x
  • AVI Load Balancer 32.x

Cause

  • The configured hostname on the virtual service failed to match or comply with any of the valid listeners configured on the Load Balancer created. 

Resolution

  • Reconfigure the Virtual service / Load Balancer.
  • Based on the requirement for Gateway Object created [Full FQDN Based listeners or Wildcard listeners]:
    • Full FQDN: Provide only the subdomain via the dropdown menu.
      • Example: Listener configured using Full FQDN: 
        • Load Balancer (Listener) Configuration
          When creating your initial Load Balancer and defining the Listener with below configurations:
          • Load Balancer Name: test-lb-01
          • IP Address Type: Public
          • Listener Name: test-http-listener-01
          • Subdomain: myapp01.test.local 
          • Protocol: HTTP
          • Port: 80
        • Pool Configuration
          Create a simple pool pointing to your test VMs.
          • Pool Name: test-backend-pool-01
          • Port: 80 (or whatever port your test VM is listening on, such as 8080)
          • Select VM: Select at least one powered-on test VM from your namespace.
        • Virtual Service (Binding) Configuration
          This is where the strict validation happens. When you bring the Listener and the Pool together to create the Virtual Service:
          • Virtual Service Name: test-vs-01
          • Select Load Balancer: Select test-lb-01 (which contains your myapp01.test.local listener).
          • Select Pool: Select test-backend-pool-01.
          • Hostname / Route Match: Do not populate any value in the hostname text field, rather select the subdomain from the drop down, which matches the fqdn for your host. here : myapp01.test.local 

    • Wildcard FQDN: Provide the hostname via the text field and the subdomain via the dropdown menu.
      • Example: Listener configuration using Wildcard subdomain: 
        • Load Balancer (Listener) Configuration
          When creating your initial Load Balancer and defining the Listener with below configurations:
          • Load Balancer Name: test-lb-02
          • IP Address Type: Public
          • Listener Name: test-http-listener-02
          • Subdomain: *.test.local 
          • Protocol: HTTP
          • Port: 80
        • Pool Configuration
          Create a simple pool pointing to your test VMs.
          • Pool Name: test-backend-pool-02
          • Port: 80 (or whatever port your test VM is listening on, such as 8080)
          • Select VM: Select at least one powered-on test VM from your namespace.
        • Virtual Service (Binding) Configuration
          This is where the strict validation happens. When you bring the Listener and the Pool together to create the Virtual Service:
          • Virtual Service Name: test-vs-02
          • Select Load Balancer: Select test-lb-02 (which contains your *.test.local listener).
          • Select Pool: Select test-backend-pool-02.
          • Hostname / Route Match: As wildcard sub domain is used, We would need to (Required object being myapp02.test.local):
            • Select the wildcard sub domain from the Subdomain Drop down field: *.test.local
            • Key in the specific object name in the hostname text field: myapp02

  • For more information refer: Creating an Application Service