A valid APIcast Policies endpoint must be provided

Solution Verified - Updated -

Environment

  • Red Hat 3scale API Management Platform (3scale API Management)
    • 2 (On Premise)
    • SaaS
  • registryURL configured using the procedure explained in the solution: Removing the embedded APICast

Issue

  • In the UI of 3scale API Manager's admin portal (under Integration -> Policies) the following error message can be observed for every product:

    A valid APIcast Policies endpoint must be provided
    Failed to fetch APIcast policies from 'http://apicast-staging:8090/policies'. Error: Connection refused - Connection refused - connect(2) for "0.0.0.0" port 0 (0.0.0.0:0)
    

Resolution

  • Ensure that the registryURL value in the APIManager CRD has a value that starts with http://
  • Verify that the APICAST_REGISTRY_URL variable in the ConfigMap named system-environment has the same value as given in registryURL.
  • After modifying them accordingly, rollout system-app again.

Root Cause

The APIcast registry URL points to the apicast policy registry and it requires that its value starts with http://

i.e

invalid registryURL/APICAST_REGISTRY_URL value:

apicast-staging:8090/policies
valid registryURL/APICAST_REGISTRY_URL value:

http://apicast-staging:8090/policies

Diagnostic Steps

Actual registryURL/APICAST_REGISTRY_URL values can be checked by running the following commands from the terminal:

$ oc get apimanager my-api-manager-name -o yaml |grep registry

output:
  f:registryURL: {}
  registryURL: http://apicast-staging:8090/policies
$ oc get configmap system-environment -o yaml | grep APICAST

output:
  APICAST_REGISTRY_URL: http://apicast-staging:8090/policies
  f:APICAST_REGISTRY_URL: {}

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments