API console not working as it is pointing to random IP
This is the api overview.
Production and Sandbox URLs: http://172.17.0.2:8280/phoneverify/2.0.0 https://172.17.0.2:8243/phoneverify/2.0.0
But this is a wrong IP (might be the ip of docker container). But from my host machine, not able to hit it hence API call time out.
Added: It works fine with downloader.
@winster Cloud you please mention which deployment pattern is related to this issue.
docker
@winster Deployed APIs can be invoked If you spawn the container using the following command,
docker run -p 9443:9443 -p 8243:8243 wso2am:2.2.0
@ThilinaManamgoda , @winster I see that my Production and Sandbox Endpoints are pointing to http://172.17.0.2:8280/xxx/yyy Docker here as well. Also new to docker and wso2. Can you please elaborate the solution? thanks ahead...
@prats2017 In this case APIM is picking up the container IP as the host. That is why it showing 172.17.0.2 as the host. Containers are spawned in a separate network which cannot be accessed form outside world. In order to access the ports exposed by a container it is required to map exposed ports to host ports(That's what we are doing with -P).
Thanks @ThilinaManamgoda Thanks for responding. I see what you are saying.
docker inspect --format='{{ .NetworkSettings.IPAddress }}' d3ae95cfbbd1 172.17.0.2 docker inspect --format='{{ .NetworkSettings.Gateway }}' d3ae95cfbbd1 172.17.0.1
I am new to Docker too. So, am reading how docker container, image etc works. Meanwhile can you pls provide command to map exposed ports to host ports. This will help me understand this whole thing better and quicker.