-
Notifications
You must be signed in to change notification settings - Fork 19
Description
APIM-CLI version
1.14.4
API-Management version
7.7.20240530
Bug description
A customer is trying to use apim-cli to create a new (BE & FE) API but it fails, producing an error and a Java stack trace.
From the log it looks as if this APIM API call is failing (or not succeeding as expected): https://<API MANAGER URL>:443/api/portal/v1.4/apirepo?field=name&op=eq&value=<API NAME>&field=createdOn&op=gt&value=1752447162445
(some values have been redacted).
The next line is DEBUG: No existing API found based on filter: []
.
At the moment I'm still trying to reproduce the issue internally, hence the missing "steps to reproduce".
I am also consulting with the customer to agree on what information can be shared publicly. For the time being we have only the redacted apim-cli log; see below.
The customer was using v. 1.14.4, which is not the current version, but reports that the issue is exactly the same in 1.14.11.
Any ideas as to what might be the problem here? Thank you in advance.
Steps to reproduce
No response
Relevant log output
2025-07-13 22:52:34,541 [APIManagerCLI] INFO : API-Manager CLI: 1.14.4
2025-07-13 22:52:34,544 [APIManagerCLI] INFO : Module: API - I M P O R T (1.14.4)
2025-07-13 22:52:34,552 [EnvironmentProperties] DEBUG: Trying to load environment properties from file: /agent/_work/1/axway/apim-cli-1.14.4/conf/env.properties ... not found.
2025-07-13 22:52:34,552 [EnvironmentProperties] DEBUG: Trying to load environment properties from file: /agent/_work/1/axway/apim-cli-1.14.4/conf/env.sit.properties ... not found.
2025-07-13 22:52:45,162 [RestAPICall] DEBUG: Http verb:GET and URI: https://<API MANAGER URL>:443/api/portal/v1.4/proxies/b33f97dc-ac94-4d0d-85af-af98c1d25c1f/operations
2025-07-13 22:52:45,302 [CreateNewAPI] DEBUG: Number of Methods : 1
2025-07-13 22:52:45,305 [CreateNewAPI] DEBUG: backendBasePath from config : https://<API PATH>.apps.wovg-nonprod-cluster.australiaeast.aroapp.io/domain/v1
2025-07-13 22:52:45,305 [CreateNewAPI] INFO : Updating API backendBasePath with value : https://<API PATH>.apps.wovg-nonprod-cluster.australiaeast.aroapp.io/domain/v1
2025-07-13 22:52:45,305 [APIManagerAPIAdapter] DEBUG: Updating API-Proxy: <API NAME>1.0.0 ( b33f97dc-ac94-4d0d-85af-af98c1d25c1f )
2025-07-13 22:52:45,330 [RestAPICall] DEBUG: Http verb:PUT and URI: https://<API MANAGER URL>:443/api/portal/v1.4/proxies/b33f97dc-ac94-4d0d-85af-af98c1d25c1f
2025-07-13 22:52:45,917 [APIStatusManager] DEBUG: Desired and actual status equal. No need to update status!
2025-07-13 22:52:45,920 [APIQuotaManager] INFO : Updating System default quota for API: <API NAME>
2025-07-13 22:52:45,921 [APIQuotaManager] DEBUG: System default-Restrictions: Desired: [], Actual: null
2025-07-13 22:52:45,921 [APIManagerQuotaAdapter] DEBUG: Load quotas with ID: 00000000-0000-0000-0000-000000000000 from API-Manager URI : https://<API MANAGER URL>:443/api/portal/v1.4/quotas/00000000-0000-0000-0000-000000000000
2025-07-13 22:52:45,921 [RestAPICall] DEBUG: Http verb:GET and URI: https://<API MANAGER URL>:443/api/portal/v1.4/quotas/00000000-0000-0000-0000-000000000000
2025-07-13 22:52:46,127 [APIQuotaManager] DEBUG: Current Default Quota : APIQuota [id=00000000-0000-0000-0000-000000000000, type=API, restrictions=[QuotaRestriction [api=*, method=*, type=throttle, config={messages=100, period=second, per=1}]]]
2025-07-13 22:52:46,130 [RestAPICall] DEBUG: Http verb:PUT and URI: https://<API MANAGER URL>:443/api/portal/v1.4/quotas/00000000-0000-0000-0000-000000000000
2025-07-13 22:52:46,395 [APIQuotaManager] INFO : Updating Application default quota for API: <API NAME>
2025-07-13 22:52:46,395 [APIQuotaManager] DEBUG: Application default-Restrictions: Desired: [QuotaRestriction [api=*, method=*, type=throttle, config={period=second, per=60, messages=5000}]], Actual: null
2025-07-13 22:52:46,396 [APIManagerQuotaAdapter] DEBUG: Load quotas with ID: 00000000-0000-0000-0000-000000000001 from API-Manager URI : https://<API MANAGER URL>:443/api/portal/v1.4/quotas/00000000-0000-0000-0000-000000000001
2025-07-13 22:52:46,396 [RestAPICall] DEBUG: Http verb:GET and URI: https://<API MANAGER URL>:443/api/portal/v1.4/quotas/00000000-0000-0000-0000-000000000001
2025-07-13 22:52:47,091 [APIQuotaManager] DEBUG: Current Default Quota : APIQuota [id=00000000-0000-0000-0000-000000000001, type=APPLICATION, restrictions=[QuotaRestriction [api=6a402830-ccf1-4715-9490-143a69c397c1, method=*, type=throttle, config={messages=5000, period=second, per=60}], QuotaRestriction [api=5a25ff26-e5f5-4d21-948f-3a8045539b26, method=*, type=throttle, config={messages=5000, period=second, per=60}], QuotaRestriction [api=1104858f-8c3f-471a-9015-b592e5bf6359, method=*, type=throttle, config={messages=5000, period=second, per=60}], QuotaRestriction [api=6bf0b497-af1c-4f10-ba19-bf9c2fb5ed58, method=*, type=throttle, config={messages=5000, period=second, per=60}], QuotaRestriction [api=5d0c45cb-84ff-4543-bfa1-aaca011daf07, method=*, type=throttle, config={messages=5000, period=second, per=60}], QuotaRestriction [api=5877bec6-3d85-4145-8014-6482736f16a8, method=*, type=throttle, config={messages=5000, period=second, per=60}], QuotaRestriction [api=83a458f3-0b9a-47d5-9243-b583cba3ec3b, method=*, type=throttle, config={messages=5000, period=second, per=60}], QuotaRestriction [api=a1a2ec45-594f-4eac-988d-6004956788ad, method=*, type=throttle, config={messages=5000, period=second, per=60}], QuotaRestriction [api=a33a22e7-d77d-4271-b129-ef86802eaa91, method=*, type=throttle, config={messages=5000, period=second, per=60}], QuotaRestriction [api=6afdc454-17b6-4943-8f0e-db47dd528ced, method=*, type=throttle, config={messages=5000, period=second, per=60}], QuotaRestriction [api=baeeffd6-9cda-4baf-8455-8da9224bac92, method=*, type=throttle, config={messages=5000, period=second, per=60}], QuotaRestriction [api=e6ef6415-30d2-4d76-959b-29e3185e1a41, method=*, type=throttle, config={messages=5000, period=second, per=60}], QuotaRestriction [api=1011c58c-ea42-4fb8-b8f6-e5001c9dec83, method=*, type=throttle, config={messages=5000, period=second, per=60}], QuotaRestriction [api=8e181e60-658c-47b8-9550-ec5b732db13b, method=*, type=throttle, config={messages=5000, period=second, per=60}], QuotaRestriction [api=1ceb8de5-5f1e-429b-bc3f-440b6ef7686f, method=*, type=throttle, config={messages=5000, period=second, per=60}], QuotaRestriction [api=d28ccd94-7b12-4042-81d2-c71b43c73361, method=*, type=throttle, config={messages=5000, period=second, per=60}], QuotaRestriction [api=4b2dfbc2-6842-4699-bb45-ffb2aee64575, method=*, type=throttle, config={messages=5000, period=second, per=60}], QuotaRestriction [api=ca1013d0-3e88-48ca-b386-76ea40076a49, method=*, type=throttle, config={messages=5000, period=second, per=60}], QuotaRestriction [api=d2cfca86-1caa-4f88-b977-c70dfcf34ae8, method=*, type=throttle, config={messages=5000, period=second, per=60}], QuotaRestriction [api=c5fe10a4-4f0c-49e3-add5-487fae0a882e, method=*, type=throttle, config={messages=5000, period=second, per=60}]]]
2025-07-13 22:52:47,094 [RestAPICall] DEBUG: Http verb:PUT and URI: https://<API MANAGER URL>:443/api/portal/v1.4/quotas/00000000-0000-0000-0000-000000000001
2025-07-13 22:52:47,163 [APIManagerQuotaAdapter] WARN : Got unexpected error: 'API not found' while saving quota configuration ... Try again in 10000 milliseconds. (you may set -retryDelay <milliseconds>)
2025-07-13 22:52:57,163 [RestAPICall] DEBUG: Http verb:PUT and URI: https://<API MANAGER URL>:443/api/portal/v1.4/quotas/00000000-0000-0000-0000-000000000001
2025-07-13 22:52:57,234 [RollbackAPIProxy] INFO : Rollback FE-API: <API NAME>(ID: b33f97dc-ac94-4d0d-85af-af98c1d25c1f / State: unpublished)
2025-07-13 22:52:57,234 [RestAPICall] DEBUG: Http verb:GET and URI: https://<API MANAGER URL>:443/api/portal/v1.4/proxies/b33f97dc-ac94-4d0d-85af-af98c1d25c1f
2025-07-13 22:52:57,356 [APIManagerAPIAdapter] DEBUG: Found: 1 exposed API(s):
2025-07-13 22:52:57,356 [APIStatusManager] DEBUG: Desired and actual status equal. No need to update status!
2025-07-13 22:52:57,356 [APIManagerAPIAdapter] DEBUG: Deleting API-Proxy with Name : <API NAME>and Id: b33f97dc-ac94-4d0d-85af-af98c1d25c1f
2025-07-13 22:52:57,357 [RestAPICall] DEBUG: Http verb:DELETE and URI: https://<API MANAGER URL>:443/api/portal/v1.4/proxies/b33f97dc-ac94-4d0d-85af-af98c1d25c1f
2025-07-13 22:52:57,780 [APIManagerAPIAdapter] INFO : API: <API NAME>1.0.0 ( b33f97dc-ac94-4d0d-85af-af98c1d25c1f ) successfully deleted
2025-07-13 22:52:57,780 [APIManagerAPIAdapter] DEBUG: Deleting Backend API : 1e4085a1-ec1b-4ef1-8ec0-83e3c076dcd6
2025-07-13 22:52:57,780 [RestAPICall] DEBUG: Http verb:DELETE and URI: https://<API MANAGER URL>:443/api/portal/v1.4/apirepo/1e4085a1-ec1b-4ef1-8ec0-83e3c076dcd6
2025-07-13 22:53:00,517 [RestAPICall] DEBUG: Http verb:GET and URI: https://<API MANAGER URL>:443/api/portal/v1.4/apirepo?field=name&op=eq&value=<API NAME>&field=createdOn&op=gt&value=1752447162445
2025-07-13 22:53:04,360 [APIManagerAPIAdapter] DEBUG: No existing API found based on filter: []
2025-07-13 22:53:04,360 [RollbackHandler] INFO : Rolled back: [Frontend-API: false, Backend-API: true]
2025-07-13 22:53:04,361 [APIImportApp] ERROR: Can't update Quota-Configuration in API-Manager.
| Can't update API-Manager Quota-Configuration. Response: '{"errors":[{"code":102,"message":"API not found"}]}'
com.axway.apim.lib.error.AppException: Can't update Quota-Configuration in API-Manager.
at com.axway.apim.adapter.apis.APIManagerQuotaAdapter.saveQuota(APIManagerQuotaAdapter.java:173)
at com.axway.apim.apiimport.actions.APIQuotaManager.updateRestrictions(APIQuotaManager.java:83)
at com.axway.apim.apiimport.actions.APIQuotaManager.execute(APIQuotaManager.java:50)
at com.axway.apim.apiimport.actions.CreateNewAPI.execute(CreateNewAPI.java:98)
at com.axway.apim.apiimport.APIImportManager.applyChanges(APIImportManager.java:47)
at com.axway.apim.APIImportApp.importAPI(APIImportApp.java:94)
at com.axway.apim.APIImportApp.importAPI(APIImportApp.java:52)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.axway.apim.cli.APIManagerCLI.run(APIManagerCLI.java:129)
at com.axway.apim.cli.APIManagerCLI.main(APIManagerCLI.java:72)
Caused by: com.axway.apim.lib.error.AppException: Can't update API-Manager Quota-Configuration. Response: '{"errors":[{"code":102,"message":"API not found"}]}'
at com.axway.apim.adapter.apis.APIManagerQuotaAdapter.saveQuota(APIManagerQuotaAdapter.java:161)
... 12 more
2025-07-13 22:53:04,362 [APIManagerAdapter] DEBUG: Closing cache ...
2025-07-13 22:53:04,363 [RestAPICall] DEBUG: Http verb:DELETE and URI: https://<API MANAGER URL>:443/api/portal/v1.4/login