Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

[BUG] 403 Forbidden when using V-Host #282

Closed
rathnapandi opened this issue May 5, 2020 · 0 comments · Fixed by #283
Closed

[BUG] 403 Forbidden when using V-Host #282

rathnapandi opened this issue May 5, 2020 · 0 comments · Fixed by #283
Assignees
Labels
bug Something isn't working

Comments

@rathnapandi
Copy link
Member

rathnapandi commented May 5, 2020

Swagger-Promote version

Please make sure to use the latest Swagger-Promote version.

API-Manager and Service-Pack Version
7.7.20200130

Expected behavior
vhost should be set

Actual behavior
swagger promote CLI is failing and rolling back the changes.

Log-Output in Debug

10679  ERROR          RestAPICall| Response: 'HTTP/1.1 403 Forbidden'
11095  INFO        RollbackAction| Rollback FE-API: 'Axway Imagine - Weather API' (ID: 'd3c6beb2-1e57-461c-92e2-18813302c5e7')
11539  INFO               Proxies| Sending request to find existing APIs: https://35.171.233.150:8075/api/portal/v1.3/apirepo?field=name&op=like&value=Axway+Imagine+-+Weather+API+HTTP&field=createdOn&op=gt&value=1588650992895
11770  INFO               Proxies| No existing API found based on filter: [ filter=[field=name, op=like, value=Axway Imagine - Weather API HTTP, field=createdOn, op=gt, value=1588650992895]]
11770  INFO       RollbackHandler| Rolled back: '[Frontend-API: true, Backend-API: true]'
11771  ERROR                  App| Cannot update API-Proxy.
com.axway.apim.lib.errorHandling.AppException: Cannot update API-Proxy.
	at com.axway.apim.apiimport.actions.tasks.UpdateAPIProxy.execute(UpdateAPIProxy.java:56)
	at com.axway.apim.apiimport.actions.tasks.props.VhostPropertyHandler.handleVHost(VhostPropertyHandler.java:49)
	at com.axway.apim.apiimport.actions.tasks.props.VhostPropertyHandler.handleVHost(VhostPropertyHandler.java:37)
	at com.axway.apim.apiimport.actions.CreateNewAPI.execute(CreateNewAPI.java:114)
	at com.axway.apim.apiimport.APIImportManager.applyChanges(APIImportManager.java:49)
	at com.axway.apim.App.run(App.java:247)
	at com.axway.apim.App.main(App.java:53)
	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 org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:282)
	at java.lang.Thread.run(Thread.java:748)
Caused by: com.axway.apim.lib.errorHandling.AppException: Unable to parse HTTP-Response
	at com.axway.apim.lib.utils.rest.RestAPICall.parseResponse(RestAPICall.java:73)
	at com.axway.apim.lib.utils.rest.PUTRequest.execute(PUTRequest.java:28)
	at com.axway.apim.apiimport.actions.tasks.UpdateAPIProxy.execute(UpdateAPIProxy.java:54)
	... 12 more
Caused by: com.axway.apim.lib.errorHandling.AppException: Unable to parse response
	at com.axway.apim.apiimport.actions.tasks.UpdateAPIProxy.parseResponse(UpdateAPIProxy.java:81)
	at com.axway.apim.lib.utils.rest.RestAPICall.parseResponse(RestAPICall.java:65)
	... 14 more
Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to org.apache.http.client.methods.HttpEntityEnclosingRequestBase
	at com.axway.apim.apiimport.actions.tasks.UpdateAPIProxy.parseResponse(UpdateAPIProxy.java:77)
	... 15 more

Test case sample

Please describe the steps you have done to replicate the issue
Add a vhost element in config.json to simulate the issue

@rathnapandi rathnapandi added the bug Something isn't working label May 5, 2020
@cwiechmann cwiechmann changed the title [BUG] [BUG] 403 Forbidden when using V-Host May 5, 2020
cwiechmann pushed a commit to cwiechmann/api-lifecycle-demo that referenced this issue May 5, 2020
This version is fixing an issue with V-Hosts causing an exception. See Axway-API-Management-Plus/apimanager-swagger-promote#282
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants