wso2 / api-manager

All issues, tasks, improvements and new features of WSO2 API Manager
Apache License 2.0
34 stars 8 forks source link

[Docker][APIM:4.1.0.0] Container needs a restart after publishing the APIs #1652

Open Chathuratharushka opened 1 year ago

Chathuratharushka commented 1 year ago

Description

In the initial start of the APIM:4.1.0.0 docker image (Ubuntu), server will be publishing the APIs properly. but if we are publishing the APIs after container restarts, API request won't be able to find the resources. response of the API request will give this error.

{"code":404, "type":"Status report", "message":"Not Found", "description":"The requested resource is not available."}

But after restarting the container again API request can be sent without getting above mentioned error.

Note : There won't be any server logs related to the API publishing when we are publishing APIs after container restarts.

Steps to Reproduce

  1. Run the The Docker image of APIM 4.1.0.0 docker run -it -p 9443:9443 -p 8243:8243 docker.wso2.com/wso2am:4.1.0.0

  2. Stop the Docker container docker stop 04063f68c1f2

  3. Start the Docker container again docker Start 04063f68c1f2

4.Publishing the API via the API publisher (https://localhost:9443/publisher)

5.Sending the API request curl -k-X POST https://obam:8243/open-banking/0.1/register

Response of API request
`{"code":404, "type":"Status report", "message":"Not Found", "description":"The requested resource is not available."}`

APIM Server logs 
`[2023-03-24 05:51:15,797] INFO LogMediator STATUS = Message dispatched to the main sequence. Invalid URL., RESOURCE = /open-banking/0.1/register, HEALTH CHECK URL = /open-banking/0.1/register`

Affected Component

APIM

Version

APIM 4.1.0

Environment Details (with versions)

OS version : Ubuntu 20.04.5 LTS (64-bit), Docker version : 20.10.20, Docker Compose version : v2.10.2

Relevant Log Output

`[2023-03-24 05:51:15,797] INFO LogMediator STATUS = Message dispatched to the main sequence. Invalid URL., RESOURCE = /open-banking/0.1/register, HEALTH CHECK URL = /open-banking/0.1/register`

Related Issues

No response

Suggested Labels

No response

DivyaPremanantha commented 1 year ago

Hi APIM Team,

Please consider this urgent, an ongoing customer engagement is affected due to this issue.

Chathuratharushka commented 1 year ago

This issue is existing in docker images of APIM 4.2.0 also.