diff --git a/cluster/cluster.go b/cluster/cluster.go index f44091cb..5881a7e7 100644 --- a/cluster/cluster.go +++ b/cluster/cluster.go @@ -217,6 +217,9 @@ func (p *Peer) Join( n, err := p.mlist.Join(p.resolvedPeers) if err != nil { level.Warn(p.logger).Log("msg", "failed to join cluster", "err", err) + if reconnectInterval != 0 { + level.Info(p.logger).Log("msg", fmt.Sprintf("will retry joining cluster every %v", reconnectInterval.String())) + } } else { level.Debug(p.logger).Log("msg", "joined cluster", "peers", n) } diff --git a/cmd/alertmanager/main.go b/cmd/alertmanager/main.go index e331b566..4e0aa6d8 100644 --- a/cmd/alertmanager/main.go +++ b/cmd/alertmanager/main.go @@ -196,7 +196,7 @@ func main() { *probeInterval, ) if err != nil { - level.Error(logger).Log("msg", "Unable to initialize gossip mesh", "err", err) + level.Error(logger).Log("msg", "unable to initialize gossip mesh", "err", err) os.Exit(1) } } @@ -262,8 +262,7 @@ func main() { *peerReconnectTimeout, ) if err != nil { - level.Error(logger).Log("msg", "Unable to join gossip mesh", "err", err) - os.Exit(1) + level.Warn(logger).Log("msg", "unable to join gossip mesh", "err", err) } ctx, cancel := context.WithTimeout(context.Background(), *settleTimeout) defer func() {