fix: separate the gossip listen address from the advertised one (#8)
KNOX_PEER_ADDR doubled as the bind address, so a container tried to bind the host's overlay IP and the gossip server never started. KNOX_LISTEN_ADDR now controls the bind (defaulting to KNOX_PEER_ADDR for compatibility) and the advertised address stays what peers dial.
This commit is contained in:
@@ -157,7 +157,7 @@ func (w *Watcher) Start() error {
|
||||
// Start the gossip server first so peers can reach us while the initial
|
||||
// seed is still ingesting. Vault/dirs are logged after the seed below.
|
||||
gossipAddr := ListenAddr()
|
||||
node := &Node{Kdb: w.knoxDB, Name: "knox", Addr: gossipAddr, Metrics: w.metrics}
|
||||
node := &Node{Kdb: w.knoxDB, Name: "knox", Addr: AdvertiseAddr(), Metrics: w.metrics}
|
||||
srv := &http.Server{
|
||||
Addr: gossipAddr,
|
||||
Handler: httpauth.Middleware(node.Handler()),
|
||||
|
||||
Reference in New Issue
Block a user