consul-alerts
consul-alerts copied to clipboard
Running for leader election.. Forever
Hi,
When trying to run it, I get these "Running for leader election" forever and nothing happens, I use Consul 0.5.2 so maybe it's related
root@somehost:~$ ./consul-alerts start --alert-addr=127.0.0.1:9000 --consul-addr=127.0.0.1:8500 --consul-dc=dc1 --consul-acl-token=""
INFO[0000] Checking consul agent connection...
INFO[0001] otherserver::Serf Health Status is now pending status change from passing to critical.
INFO[0018] Consul ACL Token:
INFO[0018] Consul Alerts daemon started
INFO[0018] Consul Alerts Host: somehost.domain
INFO[0018] Consul Agent: 127.0.0.1:8500
INFO[0018] Consul Datacenter: dc1
INFO[0018] Running for leader election...
INFO[0018] Running for leader election...
INFO[0018] Running for leader election...
INFO[0018] Running for leader election...
INFO[0018] Running for leader election...
Same issue here. Consul is running on v0.5.2
Same issue here with consul-alerts 0.3.2. But 0.3.0 && 0.3.1 are ok.
It works fine for me in v0.5.2. when I use the same dc where the current host is the master:
consul@admin:/srv/consul_alert/bin$ ./consul-alerts start --alert-addr=localhost:9000 --consul-addr=localhost:8500 --consul-dc=central
INFO[0000] Checking consul agent connection...
.....
INFO[0000] Consul ACL Token: ""
INFO[0000] Consul Alerts daemon started
INFO[0000] Consul Alerts Host:
When I use a different Datacenter I get the same error as the others:
consul@admin:/srv/consul_alert/bin$ ./consul-alerts start --alert-addr=localhost:9000 --consul-addr=localhost:8500 --consul-dc=acc1
INFO[0000] Checking consul agent connection...
...
INFO[0000] Consul ACL Token: ""
INFO[0000] Consul Alerts daemon started
INFO[0000] Consul Alerts Host:
This should be fixed with PR #87. Will put out a new build soon.
Thanks @darkcrux!
Hello,
I'm seeing this issue too, both with the latest version of the acaleph/consul-alerts docker image, as well as if I build my own image with the latest source:
INFO[0001] Started Consul-Alerts API
INFO[0001] Running for leader election...
INFO[0001] Now watching for events.
INFO[0001] Now watching for health changes.
INFO[0011] Running for leader election...
INFO[0013] There is current no consul-alerts leader... waiting for one.
INFO[0018] There is current no consul-alerts leader... waiting for one.
INFO[0021] Running for leader election...
INFO[0023] There is current no consul-alerts leader... waiting for one.
INFO[0028] There is current no consul-alerts leader... waiting for one.
INFO[0031] Running for leader election...
INFO[0033] There is current no consul-alerts leader... waiting for one.
INFO[0038] There is current no consul-alerts leader... waiting for one.
INFO[0041] Running for leader election...
INFO[0043] There is current no consul-alerts leader... waiting for one.
INFO[0048] There is current no consul-alerts leader... waiting for one.
INFO[0051] Running for leader election...
INFO[0053] There is current no consul-alerts leader... waiting for one.
INFO[0058] There is current no consul-alerts leader... waiting for one.
INFO[0061] Running for leader election...
INFO[0063] There is current no consul-alerts leader... waiting for one.
INFO[0068] There is current no consul-alerts leader... waiting for one.
INFO[0071] Running for leader election...
INFO[0081] Running for leader election...
same here, running docker version
if you define dc then it works fine
if you define dc then it works fine
is there a special option for it when launching container? or you use docker exec after it is running? ok I have found it - "--consul-dc", anyway in my case I'm still seeing There is current no consul-alerts leader
I have created consul-alerts/leader as here - https://github.com/AcalephStorage/consul-alerts/blob/master/leader-election.go#L9 but still no success. Myabe some knows if I need to set up special ACL permissions for consul-alerts/leader key? Is is definetly ACL issue, It runs with master token. I will create separate issue to check minimal ACL permissions.
👍 doesnt even work with
key "consul-alerts" { policy = "write" }
service "" { policy = "write" }
event "" { policy = "write" }
node "" { policy = "write" }
session "" { policy = "write" }
agent "" { policy = "write" }
query "" { policy = "write" }
acl "" { policy = "write" }
keyring = "write"
operator = "write"