2
votes

I want to test WSO2 docker deployment patterns and build an integrated solution using the patterns. Specifically, I am using apim pattern-0 and ei pattern-5. I deployed the apim pattern and ei pattern on two different docker machines to avoid a port conflict. I also added the following entries in the hosts file on both docker machines as well as the local host machine:

*"ei docker machine's ip" ui.integrator.wso2.com integrator.wso2.com

"apim docker machine's ip" api-manager*

I then created a very simple healthcare api and deployed it on the ei cluster. I verified the healthcare api can be accessed successfully from the host: "curl -v http://integrator.wso2.com:80/healthcare/querydoctor/surgery".

On apim, I implemented and published a new REST API which access the healthcare api from the ei cluster. However, when I access this new apim's API from the host, I always get back 500 response with internal error code 101503 and error description of Error Connecting to the back end. Also, apim's http wire log shows Connection refused or failed for : integrator.wso2.com:80.

My host machine is running Ubuntu 16.04LTS, docker version 17.09.0-ce and using Firefox with HttpRequester add-on.

Any idea why apim is not able to access the healthcare api from ei in my deployment? Or if there is any guideline on how to build an integrated solution using the WSO2 docker patterns would be appreciated.

1
This url should be accessible from inside the apim docker container. Not from the host machine. integrator.wso2.com:80/healthcare/querydoctor/surgery.Anuruddha Lanka Liyanarachchi
Yes, that is the issue. The url doesn't seem accessible from inside the apim docker container, but it is accessible from the host machine. Do you know what could cause it?W. W.

1 Answers

0
votes

This issue may have occurred due to the host only networks that may have been used in the two Docker machines that you have created on your host. The API Manager Docker container would not be able to resolve the domain name of WSO2 Enterprise Integrator (integrator.wso2.com) as there is no DNS resolution mechanism in place between two Docker machines.

The easiest option to solve this problem would be to offset ports of one of the Docker Compose templates and run both API Manager and WSO2 Enterprise Integrator in the same Docker machine. The port offset of each WSO2 component can be set in the repository/conf/carbon.xml file.