No path to datacenter
- Dominant language
- Go
- Stars
- 30.1k
- Forks
- 4.6k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 43
Description
We have consul server setup in multi-region in linux servers.Example region1=dc1 and region2=dc2. I am trying to extract the list of nodes from one region/datacenter to another region/datacenter by giving below command I get this message:-
consul catalog nodes -datacenter=dc2
"Error listing nodes: Unexpected response code: 500 (No path to datacenter)"
But when I login to the other cluster node in different datacenter/region i.e. dc2 and give below command:-
consul catalog nodes -datacenter=dc1. (This works fine and returns results)
Basically I need to use this functionality to be able to access(lookup/update) kv store at dc2 from dc1.
I have checked regarding this error here https://learn.hashicorp.com/consul/security-networking/datacenters#inlinecode-no-path-to-datacenter which says below:-
-------------------------------------Details-----------------------------------------
The most likely cause of these errors is that bind_addr is set to a private address preventing the RPC server from accepting connections across the WAN. Setting bind_addr to a public address (or one that can be routed across the WAN) will resolve this issue. Be aware that exposing the RPC server on a public port should only be done after firewall rules have been established.
----------------------------------------end-------------------------------------------------
I have following questions:-
1) What command on the linux node I need to give to check whether bind_addr is set to private or not
2) What exact changes I need to do to fix this?
3) Do I need to perform a restart to get the changes applied?
Thank you
Contributor guide
Assessment
This issue has not been assessed yet.