Troubleshoot API Provisioning Issues
After you provision an adapter, you must create an API to bind the service to, which might require you to troubleshoot the following errors:
Incorrectly Configured Client Secret
If using a secret when you create an API, you must verify that you are correctly referencing the secret.
Diagnosis
To diagnose the issue:
Describe your service instance using the kubectl describe serviceinstance api_instance_name command:
$ kubectl describe serviceinstance inventory-resource-api
In the Status field, a detailed description of the error is displayed:
In the following example, an error occurred due to an extra comma in the stringData section that is provided after the password segment:
apiVersion: v1
kind: Secret
metadata:
name: my-credentials
namespace: nto-payment
type: Opaque
stringData:
user-pass:
'{
"user": "<user>",
"password": "<password>",
}'
API Provisioning Failure
When you provision an API by using Anypoint Service Mesh, the asset (in Exchange) and the API instance (in API Manager) might not be successfully created in Anypoint Platform.
Causes
This error can occur if you are attempting to:
-
Re-create an asset in Exchange that was more than seven days old before being deleted
-
Provision an API with invalid values
Diagnose
To diagnose this issue:
-
Run the
$ asmctl api listcommand.The status of the API is displayed as
ProvisionCallFailed. -
Run the
asmctl api logs --name=<replace_with_api_name> --namespace=<replace_with_namespace>command.The following output illustrates provisioning an API with an invalid version:
DATE MESSAGE 2020-05-29T17:12:36Z Error provisioning ServiceInstance of ClusterServiceClass (K8S: "1c3b2100-5cdc-49ea-9423-dd7170e674b4" ExternalName: "anypoint-platform-api-instance") at ClusterServiceBroker "service-mesh-incluster-broker": Status: 400; ErrorMessage: Bad Request; Description: version: should match pattern "^\d+\.\d+\.\d+(-.+)?$" (ID: 49724b5d-7fad-4cc3-980e-695c2e47b383); ResponseError: <nil> -
If no information is displayed, run the
kubectl describe serviceinstances <replace_with_api_name> -n <replace_with_namespace>command.The
statussection of the resource displays an error message explaining the issue:Error provisioning ServiceInstance of ClusterServiceClass (K8S: "1c3b2100-5cdc-49ea-9423-dd7170e674b4" ExternalName: "anypoint-platform-api-instance") at ClusterServiceBroker "service-mesh-incluster-broker": Status: 410; ErrorMessage: Gone; Description: Error from Exchange: There is no asset matching given parameters. (ID: 79d0cc7f-9969-477b-816d-c822916c0290); ResponseError: <nil>' reason: ProvisionCallFailed
In this case, the error is caused by an attempt to re-create an asset in Exchange that was more than seven days old before being deleted. Because Exchange does not allow that operation, provide a new assetId to create a new asset.



