kontrol: ERROR 100: Key not found
xuanjiang1985 opened this issue · comments
I got a problem:
[kontrol] CRITICAL Could not create KitesPrefix "/kites": client: etcd cluster is unavailable or misconfigured; error #0: unsupported protocol scheme ""
etcd version: 3.2.9
I started etcd with default config
kontrol -initial
kontrol -ip=127.0.0.1 -port=6000
Could you please test if it works after applying the following patch:
diff --git a/kontrol/etcd.go b/kontrol/etcd.go
index 91a1c81..9b36a5d 100644
--- a/kontrol/etcd.go
+++ b/kontrol/etcd.go
@@ -34,7 +34,7 @@ type Etcd struct {
func NewEtcd(machines []string, log kite.Logger) *Etcd {
if machines == nil || len(machines) == 0 {
- machines = []string{"//127.0.0.1:4001"}
+ machines = []string{"http://127.0.0.1:4001"}
}
cfg := etcd.Config{
@rjeczalik
I found etcd.go and changed,
go install github.com/koding/kite/kontrol/kontrol
kontrol -ip=127.0.0.1 -port=6000
there is another problem:
[kontrol] CRITICAL Could not create KitesPrefix "/kites": client: etcd cluster is unavailable or misconfigured; error #0: dial tcp 127.0.0.1:4001: getsockopt: connection refused
dial tcp 127.0.0.1:4001: getsockopt: connection refused
It basically means your etcd agent is not running.
Would you mind sending a PR with the patch above?
I have no PR
I started etcd with default config
➜ math-register etcd
➜ math-register etcdctl member list
8e9e05c52164694d: name=default peerURLs=http://localhost:2380 clientURLs=http://localhost:2379 isLeader=true
➜ math-register kontrol -initial
➜ math-register kontrol
2017-10-24 15:04:33 [kontrol] CRITICAL Could not create KitesPrefix "/kites": client: etcd cluster is unavailable or misconfigured; error #0: dial tcp 127.0.0.1:4001: getsockopt: connection refused
@xuanjiang1985 Looks like default hostport value changed for etcd, use -machines
flag to point at your etcd, .e.g:
$ kontrol -machines http://localhost:2379
Another problem:
➜ math-register kontrol
2017-10-25 23:31:55 [kontrol] WARNING Key pair storage is not set. Using in memory cache
2017-10-25 23:31:55 [kontrol] INFO New listening: 0.0.0.0:6000
2017-10-25 23:31:55 [kontrol] INFO Serving...
2017-10-25 23:31:55 [kontrol] DEBUG Set: key: /kites/kontrol/unknown/kontrol/0.0.1/unknown/zhougangdeMacBook-Air.local/92829d13-ce39-403d-9896-b625c1b69ce3 value: {"url":"http://127.0.0.1:6000/kite","key_id":"3db6c91a-32a5-4acb-a5bf-ba3b535c6812"} opts: &{ 0 true 1m30s false false false}
2017-10-25 23:31:55 [kontrol] ERROR 100: Key not found (/kites/kontrol) [10]
@xuanjiang1985 Could you try master, which should have this issue fixed? If there's anything more, please reopen this issue with the details.
how to open it again?
@xuanjiang1985 What is the issue?
@xuanjiang1985 Do we have anything to do here?