API-Mgr. CLI version
1.0.1
API-Manager and Service-Pack Version
7.6.2 SP4
Expected behavior
Actual behavior
From time to time (I assume it is a caching problem) APIM CLI performs rollback action because of an error (error creating/updating API Access) if I update or delete an API proxy as orgAdmin.
Log-Output in Debug
API-Manager CLI: 1.0.1
To report issues or get help, please visit:
https://github.com/Axway-API-Management-Plus/apim-cli
------------------------------------------------------------------------
Module: API - I M P O R T (1.0.1)
------------------------------------------------------------------------
0 INFO APIManagerAdapter| Successfully connected to API-Manager (7.6.2 SP4) on: ...
235 WARN rOrganizationAdapter| Using OrgAdmin only to load all organizations.
541 INFO IImportConfigAdapter| Reading API-Definition (Swagger/WSDL) from file: 'petstore.json' (relative path)
794 INFO IImportConfigAdapter| Handling configured client-applications.
1073 INFO IImportConfigAdapter| Found existing application: 'Petstore Test' (null) based on given name 'Petstore Test'
1142 INFO IImportConfigAdapter| Found existing application: 'Petstore Test2' (null) based on given name 'Petstore Test2'
1260 INFO APIImportManager| No existing API found, creating new!
1386 INFO CreateNewAPI| Create deleted API: 'Petstore API' 1.0.5 based on Swagger 2.0 specification.
1701 INFO APIManagerAPIAdapter| API: Petstore API successfully deleted
1766 INFO ManageClientApps| Creating API-Access for the following apps: '[[Petstore Test], [Petstore Test2]]'
1767 INFO ManageClientApps| Creating API-Access for application 'Petstore Test'
1849 WARN agerAPIAccessAdapter| Got unexpected error: 'Unknown API' while creating API-Access ... Try again in 1 second.
2917 ERROR agerAPIAccessAdapter| Error creating/updating API Access: APIAccess [apiName=null, apiVersion=null, id=null, apiId=4285df12-2c60-4fd2-8474-b3e499a7f4e9]. Response-Code: 403. Got response: '{"errors":[{"code":403,"message":"Unknown API"}]}'
2920 INFO RollbackAction| Rollback FE-API: 'Petstore API' (ID: '4285df12-2c60-4fd2-8474-b3e499a7f4e9' / State: 'unpublished')
3114 ERROR RollbackAction| Error while deleting FE-API to roll it back
java.lang.NullPointerException
at com.axway.apim.adapter.APIStatusManager.update(APIStatusManager.java:80)
at com.axway.apim.adapter.APIStatusManager.update(APIStatusManager.java:63)
at com.axway.apim.apiimport.rollback.RollbackAPIProxy.rollback(RollbackAPIProxy.java:28)
at com.axway.apim.apiimport.rollback.RollbackHandler.executeRollback(RollbackHandler.java:60)
at com.axway.apim.APIImportApp.importAPI(APIImportApp.java:99)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.axway.apim.cli.APIManagerCLI.run(APIManagerCLI.java:138)
at com.axway.apim.cli.APIManagerCLI.main(APIManagerCLI.java:76)
3155 ERROR APIManagerAPIAdapter| Error deleting Backend-API. Response-Code: 403, Response: '{"errors":[{"code":403,"message":"Forbidden"}]}'
3156 ERROR RollbackAction| Error while deleting BE-API with ID: '7e90ddca-e703-4a1e-b5da-61d095e2102a' to roll it back
com.axway.apim.lib.errorHandling.AppException: Cannot delete Backend-API.
at com.axway.apim.adapter.apis.APIManagerAPIAdapter.deleteBackendAPI(APIManagerAPIAdapter.java:592)
at com.axway.apim.apiimport.rollback.RollbackBackendAPI.rollback(RollbackBackendAPI.java:25)
at com.axway.apim.apiimport.rollback.RollbackHandler.executeRollback(RollbackHandler.java:60)
at com.axway.apim.APIImportApp.importAPI(APIImportApp.java:99)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.axway.apim.cli.APIManagerCLI.run(APIManagerCLI.java:138)
at com.axway.apim.cli.APIManagerCLI.main(APIManagerCLI.java:76)
Caused by: com.axway.apim.lib.errorHandling.AppException: Error deleting Backend-API. Response-Code: 403
at com.axway.apim.adapter.apis.APIManagerAPIAdapter.deleteBackendAPI(APIManagerAPIAdapter.java:589)
... 9 more
3158 INFO RollbackHandler| Rolled back: '[Frontend-API: false, Backend-API: false]'
3159 ERROR APIImportApp| Unable to find API with ID: 4285df12-2c60-4fd2-8474-b3e499a7f4e9. Please have in mind during API-Update the ID is re-created!
API-Mgr. CLI version
1.0.1
API-Manager and Service-Pack Version
7.6.2 SP4
Expected behavior
Actual behavior
From time to time (I assume it is a caching problem) APIM CLI performs rollback action because of an error (error creating/updating API Access) if I update or delete an API proxy as orgAdmin.
Log-Output in Debug
API-Manager CLI: 1.0.1