{"action":"closed","issue":{"url":"https://api.github.com/repos/victorcoder/dkron/issues/133","repository_url":"https://api.github.com/repos/victorcoder/dkron","labels_url":"https://api.github.com/repos/victorcoder/dkron/issues/133/labels{/name}","comments_url":"https://api.github.com/repos/victorcoder/dkron/issues/133/comments","events_url":"https://api.github.com/repos/victorcoder/dkron/issues/133/events","html_url":"https://github.com/victorcoder/dkron/issues/133","id":157728415,"number":133,"title":"No cluster leadership acquired","user":{"login":"aromm","id":19671873,"avatar_url":"https://avatars.githubusercontent.com/u/19671873?v=3","gravatar_id":"","url":"https://api.github.com/users/aromm","html_url":"https://github.com/aromm","followers_url":"https://api.github.com/users/aromm/followers","following_url":"https://api.github.com/users/aromm/following{/other_user}","gists_url":"https://api.github.com/users/aromm/gists{/gist_id}","starred_url":"https://api.github.com/users/aromm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aromm/subscriptions","organizations_url":"https://api.github.com/users/aromm/orgs","repos_url":"https://api.github.com/users/aromm/repos","events_url":"https://api.github.com/users/aromm/events{/privacy}","received_events_url":"https://api.github.com/users/aromm/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/victorcoder/dkron/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-05-31T17:38:21Z","updated_at":"2016-06-01T22:23:56Z","closed_at":"2016-06-01T22:23:56Z","body":"Hi there,\r\n\r\nI am very new to dkron and am currently in the process of setting up a cluster. By now I have been able to join my three nodes but the leader election process is not working.\r\n\r\nMy nodes all have the following dkron config file:\r\n```\r\n{\r\n  \"backend\": \"consul\", \r\n  \"backend_machine\": \"127.0.0.1:8500\",\r\n  \"server\": true,\r\n  \"log-level\": \"debug\",\r\n  \"tags\": {\r\n    \"role\": \"test\",\r\n    \"datacenter\": \"east\"\r\n  },\r\n  \"keyspace\": \"cron\",\r\n  \"encrypt\": \"{{ encrypt value }}\",\r\n  \"http_addr\": \":8080\",\r\n  \"join\": [\r\n    \"10.64.0.23\",\r\n    \"10.64.0.26\",\r\n    \"10.64.0.28\"\r\n  ]\r\n}\r\n```\r\n\r\nI have determined that the three nodes do \"find\" each other and the dashboard displays all three nodes as well. However the dashboard nor `curl http://127.0.0.1:8500/v1/leader` show any leader.\r\n\r\nI have been trying to figure out the problem and it turns out I can manually run bash scripts on all three clusters using the API and clicking \"Run\" on the dashboard/jobs page and they successfully run/execute (the script emails me and I get an email but the dashboard graph also says the scripts are getting errors.\" When I run a job I can even find they kv store by running `curl 127.0.0.1:8500/v1/kv/?recurse` and every execution and job shows up.\r\n\r\nI read through some of the code and found that there should be a consul key created called cron/leader but it has not been created. Also I found that there should have been a new consul session created in `NewLock()` with no name but I could not find the consul session either. \r\n\r\nThe dkron.log file shows on all 3 nodes\r\n```\r\ntime=\"2016-05-31T17:10:00Z\" level=info msg=\"agent: Cluster leadership lost\" node=ip-10-64-0-28 \r\ntime=\"2016-05-31T17:10:10Z\" level=info msg=\"agent: Running for election\" node=ip-10-64-0-28 \r\ntime=\"2016-05-31T17:10:10Z\" level=info msg=\"agent: Cluster leadership lost\" node=ip-10-64-0-28 \r\ntime=\"2016-05-31T17:10:20Z\" level=info msg=\"agent: Running for election\" node=ip-10-64-0-28 \r\ntime=\"2016-05-31T17:10:20Z\" level=info msg=\"agent: Cluster leadership lost\" node=ip-10-64-0-28 \r\ntime=\"2016-05-31T17:10:31Z\" level=info msg=\"agent: Running for election\" node=ip-10-64-0-28 \r\ntime=\"2016-05-31T17:10:31Z\" level=info msg=\"agent: Cluster leadership lost\" node=ip-10-64-0-28 \r\n```\r\nwith the occasional \r\n```\r\ntime=\"2016-05-27T21:33:19Z\" level=fatal msg=\"Unexpected response code: 500\" node=ip-10-64-0-28 \r\n```\r\n\r\nI am using consul v.0.6.3 protocol 3 and dkron v.0.7.1\r\n\r\nI am very confused because it seems like dkron is working with consul well but I dont understand why the session still was not created even though kv stores for jobs are being created. Any help/advice would be appreciated. I am not entirely sure if I set this up properly but I could not find solutions anywhere else.\r\n"}}
{"actor":{"display_login":"victorcoder"}}