Instance is not reporting status for environment group

This page applies to Apigee and Apigee hybrid.

View Apigee Edge documentation.

Symptoms

Deployments of API proxies or shared flows fail with the Instance INSTANCE_NAME is not reporting status for environment group ENV_GROUP_NAME error in the Apigee hybrid UI.

Error Messages

The Instance INSTANCE_NAME is not reporting status for environment group ENV_GROUP_NAME error is displayed in the API proxies menu under the Overview tab when hovering over the red exclamation mark appearing in the Status column of Deployments section:

instance-not-reporting-status

Possible Causes

Cause Description
The selector app: apigee-ingressgateway is missing When using the Apigee ingress, the overrides.yaml file needs to have the selector app: apigee-ingressgateway under virtualhosts section.
Stale ApigeeRoute or environment deleted only in the control plane An environment or deployment was removed from the control plane or cluster without completing the full deletion workflow, leaving stale ApigeeRoute or environment resources in the cluster.
Blocked network egress to Google APIs Cluster worker nodes cannot establish outbound connections to Google authentication and Apigee control plane APIs on *.googleapis.com:443.
Ingress gateway or runtime pods are not ready The apigee-ingressgateway pods are not running with all containers ready (2/2), or apigee-runtime pods are not ready (0/1) due to a failed READINESS:VersionLoadProbe check.

Cause: The selector app: apigee-ingressgateway is missing

When using the Apigee ingress gateway, the overrides.yaml file includes a section for virtualhosts configuration in which the selector app: apigee-ingressgateway needs to be configured.

Diagnosis

First, confirm that you are using the Apigee ingress gateway which is available with Hybrid version 1.8 and later (the following configuration does not work for customer-managed Istio ASM). In your overrides.yaml file which includes the environment group mentioned in the error, find the virtualhosts section and check if the following selectors are missing:

  selector:
    app: apigee-ingressgateway
    ingress_name: INGRESS_NAME

Resolution

Edit the overrides.yaml file so that the virtualhosts[].selector section looks similar to the following example:

    virtualhosts:
    - name: my-environment-group
      sslCertPath: my-cert.crt
      sslKeyPath: my-cert.key
      selector:
        app: apigee-ingressgateway
        ingress_name: INGRESS_NAME
  

After editing the overrides.yaml file apply the new configuration using Helm:

Dry run:

helm upgrade ENV_GROUP_RELEASE_NAME apigee-virtualhost/ \
--namespace APIGEE_NAMESPACE \
--atomic \
--set envgroup=ENV_GROUP \
-f OVERRIDES_FILE \
--dry-run=server

Make sure to include all of the settings shown, including --atomic so that the action rolls back on failure.

Your installation may or may not have been set up using an ENV_GROUP_RELEASE_NAME that differs from ENV_GROUP. For information on the settings, see Install Apigee hybrid using Helm.

Install the chart:

helm upgrade ENV_GROUP_RELEASE_NAME apigee-virtualhost/ \
--namespace APIGEE_NAMESPACE \
--atomic \
--set envgroup=ENV_GROUP \
-f OVERRIDES_FILE

Cause: Stale ApigeeRoute or environment deleted only in the control plane

When an environment or runtime deployment is removed from the control plane or cluster without completing the full deletion workflow, stale ApigeeRoute or environment resources can remain in the cluster. When apigee-watcher attempts to reconcile routing for the environment group and encounters a missing Kubernetes service, deployment, or control plane environment, it cannot complete the route update or report deployment status to the control plane.

Diagnosis

  1. Check the apigee-watcher pod logs for missing service or environment errors:

    kubectl logs -n APIGEE_NAMESPACE -l app=apigee-watcher --since=2h
    

    Look for log entries similar to the following:

    • A stale ApigeeRoute references a deleted runtime service or deployment:

      {"level":"error","caller":"watcher/watcher.go:60","msg":"error during watch","name":"ingressstatus","error":"INTERNAL: NOT_FOUND: failed to get service: services \"apigee-runtime-ORG_ENV_HASH\" not found"}
    • An environment was deleted in the control plane while its runtime resources remain in the cluster:

      {"level":"error","caller":"watcher/watcher.go:60","msg":"error during watch","name":"ingress","error":"INVALID_ARGUMENT: err fetching environment data: NOT_FOUND: {\n  \"error\": {\n    \"code\": 404,\n    \"message\": \"generic::not_found: resource organizations/ORG_NAME/environments/ENV_NAME not found\",\n    \"status\": \"NOT_FOUND\"\n  }\n}"}
  2. Inspect the ApigeeRoute resources in your namespace (apigee by default) to identify any route pointing to a non-existent ApigeeDeployment or service:

    kubectl get ApigeeRoute -n APIGEE_NAMESPACE
    kubectl describe ApigeeRoute APIGEE_ROUTE_NAME -n APIGEE_NAMESPACE
    

Resolution

  1. Delete the invalid ApigeeRoute resource:

    kubectl delete ApigeeRoute APIGEE_ROUTE_NAME -n APIGEE_NAMESPACE
    
  2. Recreate the route configuration by reapplying the apigee-virtualhost Helm chart:

    helm upgrade ENV_GROUP_RELEASE_NAME apigee-virtualhost/ \
      -n APIGEE_NAMESPACE \
      --atomic \
      --set envgroup=ENV_GROUP \
      -f OVERRIDES_FILE
    
  3. If an environment was deleted only in the control plane (causing err fetching environment data: NOT_FOUND), uninstall the environment's Helm release (helm delete ENV_RELEASE_NAME -n APIGEE_NAMESPACE) and remove the environment from your overrides.yaml file as described in Delete environments.

Cause: Blocked network egress to Google APIs

The apigee-synchronizer component polls the Apigee control plane to download runtime configuration contracts for the apigee-runtime pods, and apigee-watcher connects to the control plane to fetch ingress configuration and report deployment status. If outbound traffic from cluster worker nodes to Google APIs is blocked, these components cannot authenticate or communicate with the control plane.

Diagnosis

  1. Check the apigee-synchronizer pod logs for authentication and connection timeout errors:

    kubectl logs -n APIGEE_NAMESPACE -l app=apigee-synchronizer --since=2h
    

    Look for GoogleAuthException timeout errors when fetching an access token:

    "logger":"CONTRACT-REPLICATION","exceptionStackTrace":"com.google.auth.oauth2.GoogleAuthException: Error getting access token for service account: connect timed out, iss: SERVICE_ACCOUNT_EMAIL"
  2. Check the apigee-watcher pod logs for control-plane connectivity failures:

    kubectl logs -n APIGEE_NAMESPACE -l app=apigee-watcher --since=2h
    

    Look for control-plane connectivity test failed errors with a TCP timeout to port 443:

    {"level":"error","caller":"issuescan/cp_connectivity_scanner.go:68","msg":"control-plane connectivity test failed","organization":"ORG_NAME","error":"Get \"https://apigee.googleapis.com/v1/organizations/ORG_NAME\": oauth2: cannot fetch token: Post \"https://oauth2.googleapis.com/token\": dial tcp IP_ADDRESS:443: i/o timeout"}

Resolution

Verify that your outbound firewall rules, NAT gateways, network ACLs, and HTTP or HTTPS forward proxy configurations allow cluster worker nodes to reach *.googleapis.com:443 (including apigee.googleapis.com and oauth2.googleapis.com). For the full list of required domains and connectivity troubleshooting steps, see Google Cloud URLs to allow for Hybrid and No network connectivity between runtime plane and control plane.

Cause: Ingress gateway or runtime pods are not ready

To verify and report deployment status, apigee-watcher retrieves routing configuration dumps from the apigee-ingressgateway pods and checks the readiness of the apigee-runtime pods. If ingress gateway pods are not running and ready, or if runtime pods have not loaded the environment contract, deployment status reporting fails.

Diagnosis

  1. Check the status of the apigee-ingressgateway pods:

    kubectl get pods -n APIGEE_NAMESPACE -l app=apigee-ingressgateway
    

    Verify that all apigee-ingressgateway pods are in the Running state with 2/2 containers ready. If ingress gateway pods are not running 2/2, apigee-watcher cannot retrieve the Envoy configuration dump needed to verify the deployment.

  2. Check the status of the apigee-runtime pods:

    kubectl get pods -n APIGEE_NAMESPACE -l app=apigee-runtime
    

    If apigee-runtime pods are Running but not ready (0/1), inspect the pod events and logs:

    kubectl describe pod RUNTIME_POD_NAME -n APIGEE_NAMESPACE
    kubectl logs RUNTIME_POD_NAME -n APIGEE_NAMESPACE
    

    Look for readiness probe failures (Readiness probe failed: HTTP probe failed with statuscode: 500) and READINESS:VersionLoadProbe errors indicating that the runtime contract is not loaded:

    {"level":"SEVERE","className":"com.apigee.probe.ProbeServiceImpl","severity":"SEVERE","message":"probe \"READINESS:VersionLoadProbe\" execution failed due to Version not loaded by Message Processor","logger":"ProbeServiceImpl"}

Resolution

Resolve any pod startup failures, cluster resource constraints (CPU or memory limits), or synchronizer contract download issues so that apigee-ingressgateway pods reach 2/2 ready and apigee-runtime pods reach 1/1 ready before redeploying. For additional steps to troubleshoot apigee-runtime readiness failures, see Message processor troubleshooting guide.

References