dashersw / cote

A Node.js library for building zero-configuration microservices.

Home Page:http://cote.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Redis discovery using machine host instead of IP

ricardosilvakk opened this issue · comments

Greetings,

I am encountering a problem while using Redis and Cote for microservice communication.

This issue arises when a program on a server creates a requester to communicate with a microservice being hosted on my local machine.

Both programs share the same redis network.

I believe the problem is that the redis network is sharing my machine's hostname with the server (which it cant resolve) instead of the actual IP of my machine.

This is the error I got:

image

I would like to ask if there is any known way to fix this problem?

Thanks

You can set a custom discovery hostname using the DISCOVERY_HOSTNAME environment variable, and control what the service reports as its hostname.