Axway-API-Management-Plus / apim-cli

Axway API-Management CLI - Manage your platform from the command line or with your CI/CD pipeline
Apache License 2.0
45 stars 17 forks source link

Api import error with apps #521

Open olitho74 opened 1 day ago

olitho74 commented 1 day ago

APIM-CLI version

1.14.1

API-Management version

7.7.0

Bug description

When I execute import command in Azure devops pipeline :

Formatted command: exec bash '/home/tfs/axway-apim/apim-cli/scripts/apim.sh' - - api import - --apidefinition https://coreapi-addresses.qual.apps.sig-ge.ch/swagger/v1/swagger.json - --config ../DevopsTemplates/axway/api/rest-int-apikey-apikey/api-config.json - --host v966.sig-ge.ch - --username apiadmin - --password *** - -port 8075 - -overrideSpecBasePath - -clearCache ALL - -force - -ignoreCache - -clientAppsMode add

I get an error once every 3 or 4 times.

Error is :

2024-11-12 11:08:34,797 [APIImportApp] ERROR: Cannot read APIs from API-Manager | Error cant load subscribes applications from API-Manager. com.axway.apim.lib.error.AppException: Cannot read APIs from API-Manager at com.axway.apim.adapter.apis.APIManagerAPIAdapter.getAPIs(APIManagerAPIAdapter.java:99) at com.axway.apim.adapter.apis.APIManagerAPIAdapter.getAPI(APIManagerAPIAdapter.java:105) at com.axway.apim.APIImportApp.importAPI(APIImportApp.java:93) at com.axway.apim.APIImportApp.importAPI(APIImportApp.java:53) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:569) at com.axway.apim.cli.APIManagerCLI.run(APIManagerCLI.java:133) at com.axway.apim.cli.APIManagerCLI.main(APIManagerCLI.java:77) Caused by: com.axway.apim.lib.error.AppException: Error cant load subscribes applications from API-Manager. at com.axway.apim.adapter.client.apps.APIMgrAppsAdapter.getAppsSubscribedWithAPI(APIMgrAppsAdapter.java:161) at com.axway.apim.adapter.apis.APIManagerAPIAdapter.addClientApplications(APIManagerAPIAdapter.java:431) at com.axway.apim.adapter.apis.APIManagerAPIAdapter.getAPIs(APIManagerAPIAdapter.java:87)

Steps to reproduce

No response

Relevant log output

No response

olitho74 commented 1 day ago

What could be the origin of this error ?

rathnapandi commented 21 hours ago

Can you update the CLI to the latest version and test it again?