aboutsummaryrefslogtreecommitdiff
path: root/src/proxy_config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/proxy_config.rs')
-rw-r--r--src/proxy_config.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/proxy_config.rs b/src/proxy_config.rs
index 9d07604..3e3e62f 100644
--- a/src/proxy_config.rs
+++ b/src/proxy_config.rs
@@ -86,7 +86,13 @@ fn parse_consul_catalog(catalog: &ConsulNodeCatalog) -> Vec<ProxyEntry> {
for (_, svc) in catalog.services.iter() {
let ip_addr = match svc.address.parse() {
Ok(ip) => ip,
- _ => continue,
+ _ => match catalog.node.address.parse() {
+ Ok(ip) => ip,
+ _ => {
+ warn!("Could not get address for service {} at node {}", svc.service, catalog.node.node);
+ continue;
+ }
+ }
};
let addr = SocketAddr::new(ip_addr, svc.port);
@@ -178,7 +184,8 @@ pub fn spawn_proxy_config_task(consul: Consul) -> watch::Receiver<Arc<ProxyConfi
let will_retry_in = retry_to_time(watch_state.retries, Duration::from_secs(600));
error!(
- "Failed to query consul. Will retry in {}s. {}",
+ "Failed to query consul for node {}. Will retry in {}s. {}",
+ node,
will_retry_in.as_secs(),
e
);