From f2de4f20193f014e8bcab3031edfe15b13ff8998 Mon Sep 17 00:00:00 2001 From: Diptanu Choudhury Date: Sat, 14 May 2016 01:09:05 -0700 Subject: [PATCH] Using advertise addr for the http address --- command/agent/agent.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/command/agent/agent.go b/command/agent/agent.go index 288058fd3..78c463913 100644 --- a/command/agent/agent.go +++ b/command/agent/agent.go @@ -158,6 +158,9 @@ func (a *Agent) serverConfig() (*nomad.Config, error) { conf.SerfConfig.MemberlistConfig.BindPort = port } a.serverHTTPAddr = fmt.Sprintf("%v:%v", a.config.Addresses.HTTP, a.config.Ports.HTTP) + if a.config.AdvertiseAddrs.HTTP != "" { + a.serverHTTPAddr = a.config.AdvertiseAddrs.HTTP + } if gcThreshold := a.config.Server.NodeGCThreshold; gcThreshold != "" { dur, err := time.ParseDuration(gcThreshold)