NO_BACKEND_SELECTED with Load Balancer on Custom Domain (3 NEGs)

Hi,

I’m having the Load Balancer not selecting any of my NEGs (a custom domain for my principal Cloud Run service, plus two NEGs associated with other two Cloud Run services for regional balancing). I tried to play around with URL Rules but nothing changed:

Any clues ?

Thank you

6 Likes

Hi @rmalesani ,

Not sure why the LB is not selecting any of your Network Endpoint Groups (NEGs). Your question lacks details needed to determine the cause of the problem. For now, if you are following any documentation prior to this setup, please share it.

Double-check that your NEGs are correctly configured and associated with the corresponding Cloud Run services. Make sure that the NEGs are in the same region as the Load Balancer and the Cloud Run services. Also, check the LB’s backend config, and make sure it is referencing the correct NEGs. Lastly, verify if firewall rules are blocking traffic between the Load Balancer and the NEGs.

I am also not sure how your URL rules look like, but you can check and base on mine:

**Load Balancer Configuration**

```yaml
resources:
  - name: my-load-balancer
    type: compute.v1.loadBalancer
    properties:
      region: us-central1
      backendService:
      - group: my-backend-service
        balancingMode: UTILIZATION
        capacityScaler: 1.0
        connectionDraining:
          drainingTimeoutSec: 300
      urlMap:
        - defaultService: my-backend-service
          hostRules:
            - hosts: ["example.com"]
              pathMatcher: path-matcher-1
          pathMatchers:
            - name: path-matcher-1
              defaultService: my-backend-service
              routeRules:
                - priority: 1
                  urlPrefix: /
                  service: my-neg-1
                - priority: 2
                  urlPrefix: /region-2
                  service: my-neg-2
5 Likes

Hi @Marvin_Lucero and thanks a lot for getting back. Everything looks fine on my side, on the configurations. Are you available for a super quick desktop-sharing call where I may show you the settings ? It would be great and very appreciated and helpful!

4 Likes