The host was not found for the specified address of MessageBus in Kubernetes

11/2/2018

I am working on one green field project using of containerized(Docker) Micro Service Architecture and each Micro Service is host in Kubernetes. Sometimes, Based on the requirement, Need to communicate one service(MicroService_2) to another service(MicroService_1) using RabbitMQ.

Below image describes that how my project architecture looks and communicate.

enter image description here

When all services are hosted in Kubernetes at that time I am facing below error.

MassTransit.EndpointNotFoundException : The host was not found for the specified address: rabbitmq://localhost:31001/Service_2 (This is MessageBus URL)

But If I deleted these services (Microservice_1 & MicroService_2) from Kubernetes and run locally then its working fine.

Is there any different URL of MessageBus when we deploy the services into Kubernetes?

-- Dipak Delvadiya
docker
kubernetes
microservices
rabbitmq
rabbitmq-exchange

0 Answers