0

I created the sample micro-integrator project using integration studio which runs fine while running in Embedded Micro-Integrator. But when deployed the same via docker, the endpoint seems to be unreachable.

Deployment command:

docker run -it -p 8290:8290 -p 8253:8253 --name micro-integrator oprabin/wso2mi:1.0.0 

There is no issue with the deployment but when the integrated project is triggered via postman, the following log shows up.

[2022-03-20 04:01:01,129]  INFO {TimeoutHandler} - This engine will expire all callbacks after GLOBAL_TIMEOUT: 120 seconds, irrespective of the timeout action, after the specified or optional timeout
[2022-03-20 04:01:01,137]  WARN {ConnectCallback} - Connection refused or failed for : localhost/127.0.0.1:9090
[2022-03-20 04:01:01,142]  WARN {EndpointContext} - Endpoint : GrandOakEP with address http://localhost:9090/grandoaks/categories/{uri.var.category}/reserve will be marked SUSPENDED as it failed
[2022-03-20 04:01:01,143]  WARN {EndpointContext} - Suspending endpoint : GrandOakEP with address http://localhost:9090/grandoaks/categories/{uri.var.category}/reserve - current suspend duration is : 30000ms - Next retry after : Sun Mar 20 04:01:31 GMT 2022

The endpoint has no issue and is up and running when checked separately. The endpoint URL is:

http://localhost:9090/grandoaks/categories/{uri.var.category}/reserve
Community
  • 1
  • 1
  • 1
    Seems you are trying to access the host computer backend through a Docker container. Try this issue and you will able to find some solution https://stackoverflow.com/questions/24319662/from-inside-of-a-docker-container-how-do-i-connect-to-the-localhost-of-the-mach – dhanushka Mar 20 '22 at 09:34
  • @dhanushka has the right answer I think ,did you try it? – Dilara Şeyma Şahbaz Mar 22 '22 at 21:42

1 Answers1

0

From the error logs, it seems that the micro integrator is unable to connect to localhost:9090. Is this service (http://localhost:9090/grandoaks/categories/{uri.var.category}/reserve) deployed within the micro integrator it self (the MI server in the docker container). If this endpoint is deployed in the host machine and not the MI in the docker container, you will not be able to use localhost to access it.