mirror of https://github.com/status-im/consul.git
agent: Fixing wrong port usage for server
This commit is contained in:
parent
fac359b4bf
commit
d8ca1f367c
|
@ -148,15 +148,18 @@ func (a *Agent) consulConfig() *consul.Config {
|
||||||
base.SerfWANConfig.MemberlistConfig.AdvertisePort = a.config.Ports.SerfWan
|
base.SerfWANConfig.MemberlistConfig.AdvertisePort = a.config.Ports.SerfWan
|
||||||
}
|
}
|
||||||
if a.config.BindAddr != "" {
|
if a.config.BindAddr != "" {
|
||||||
addr, _ := net.ResolveTCPAddr("tcp", a.config.BindAddr)
|
bindAddr := &net.TCPAddr{
|
||||||
base.RPCAddr = addr
|
IP: net.ParseIP(a.config.BindAddr),
|
||||||
|
Port: a.config.Ports.Server,
|
||||||
|
}
|
||||||
|
base.RPCAddr = bindAddr
|
||||||
}
|
}
|
||||||
if a.config.AdvertiseAddr != "" {
|
if a.config.AdvertiseAddr != "" {
|
||||||
base.SerfLANConfig.MemberlistConfig.AdvertiseAddr = a.config.AdvertiseAddr
|
base.SerfLANConfig.MemberlistConfig.AdvertiseAddr = a.config.AdvertiseAddr
|
||||||
base.SerfWANConfig.MemberlistConfig.AdvertiseAddr = a.config.AdvertiseAddr
|
base.SerfWANConfig.MemberlistConfig.AdvertiseAddr = a.config.AdvertiseAddr
|
||||||
base.RPCAdvertise = &net.TCPAddr{
|
base.RPCAdvertise = &net.TCPAddr{
|
||||||
IP: net.ParseIP(a.config.AdvertiseAddr),
|
IP: net.ParseIP(a.config.AdvertiseAddr),
|
||||||
Port: a.config.Ports.RPC,
|
Port: a.config.Ports.Server,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if a.config.Bootstrap {
|
if a.config.Bootstrap {
|
||||||
|
|
Loading…
Reference in New Issue