Open raushan2016 opened 5 years ago
curl -v "foobar.cosmosdb.com:2379" -XPOST --cert /home/raushank/go/src/github.com/shiguanghuxian/etcd-manage/bin/tlskey/etcdserver.crt --key /home/raushank/go/src/github.com/shiguanghuxian/etcd-manage/bin/tlskey/etcdserver.key -d '{f1:bar}' -v Note: Unnecessary use of -X or --request, POST is already inferred.
POST / HTTP/1.1 Host: foobar.cosmosdb.com:2379 User-Agent: curl/7.58.0 Accept: / Content-Length: 8 Content-Type: application/x-www-form-urlencoded
I tried running from dev branch. Below is the log.
[[server]] title = "make manager_run" name = "manager_run" address = ["foobar.cosmosdb.com:2379"] key_prefix = "/" desc = "docker way etcd cluster mode" roles = ["admin"] tls_enable = true [server.tls_config] cert_file = "/home/raushank/go/src/github.com/shiguanghuxian/etcd-manage/bin/tlskey/etcdserver.crt" key_file = "/home/raushank/go/src/github.com/shiguanghuxian/etcd-manage/bin/tlskey/etcdserver.key" ca_file = "/home/raushank/go/src/github.com/shiguanghuxian/etcd-manage/bin/tlskey/ca.crt"
{"level":"warn","ts":1571601848.3670743,"caller":"program/http.go:121","msg":"Got etcd as manager_run"} {"level":"info","ts":1571601848.3683703,"caller":"v1/v1.go:522","msg":"Save key","user":"admin","role":"admin"} {"level":"error","ts":1571601856.056904,"caller":"v1/v1.go:202","msg":"Save key error","err":"context deadline exceeded","stacktrace":"github.com/shiguanghuxian/etcd-manage/program/v1.saveEtcdKey.func1\n\t/home/raushank/go/src/github.com/shiguanghuxian/etcd-manage/program/v1/v1.go:202\ngithub.com/shiguanghuxian/etcd-manage/program/v1.saveEtcdKey\n\t/home/raushank/go/src/github.com/shiguanghuxian/etcd-manage/program/v1/v1.go:236\ngithub.com/shiguanghuxian/etcd-manage/program/v1.postEtcdKey\n\t/home/raushank/go/src/github.com/shiguanghuxian/etcd-manage/program/v1/v1.go:154\ngithub.com/shiguanghuxian/etcd-manage/vendor/github.com/gin-gonic/gin.(Context).Next\n\t/home/raushank/go/src/github.com/shiguanghuxian/etcd-manage/vendor/github.com/gin-gonic/gin/context.go:108\ngithub.com/shiguanghuxian/etcd-manage/program.(Program).middlewareEtcd.func1\n\t/home/raushank/go/src/github.com/shiguanghuxian/etcd-manage/program/http.go:132\ngithub.com/shiguanghuxian/etcd-manage/vendor/github.com/gin-gonic/gin.(Context).Next\n\t/home/raushank/go/src/github.com/shiguanghuxian/etcd-manage/vendor/github.com/gin-gonic/gin/context.go:108\ngithub.com/shiguanghuxian/etcd-manage/vendor/github.com/gin-gonic/gin.RecoveryWithWriter.func1\n\t/home/raushank/go/src/github.com/shiguanghuxian/etcd-manage/vendor/github.com/gin-gonic/gin/recovery.go:48\ngithub.com/shiguanghuxian/etcd-manage/vendor/github.com/gin-gonic/gin.(Context).Next\n\t/home/raushank/go/src/github.com/shiguanghuxian/etcd-manage/vendor/github.com/gin-gonic/gin/context.go:108\ngithub.com/shiguanghuxian/etcd-manage/vendor/github.com/gin-gonic/gin.LoggerWithWriter.func1\n\t/home/raushank/go/src/github.com/shiguanghuxian/etcd-manage/vendor/github.com/gin-gonic/gin/logger.go:84\ngithub.com/shiguanghuxian/etcd-manage/vendor/github.com/gin-gonic/gin.(Context).Next\n\t/home/raushank/go/src/github.com/shiguanghuxian/etcd-manage/vendor/github.com/gin-gonic/gin/context.go:108\ngithub.com/shiguanghuxian/etcd-manage/vendor/github.com/gin-gonic/gin.(Engine).handleHTTPRequest\n\t/home/raushank/go/src/github.com/shiguanghuxian/etcd-manage/vendor/github.com/gin-gonic/gin/gin.go:363\ngithub.com/shiguanghuxian/etcd-manage/vendor/github.com/gin-gonic/gin.(Engine).ServeHTTP\n\t/home/raushank/go/src/github.com/shiguanghuxian/etcd-manage/vendor/github.com/gin-gonic/gin/gin.go:328\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2774\nnet/http.(conn).serve\n\t/usr/local/go/src/net/http/server.go:1878"} {"level":"error","ts":1571601858.3689067,"caller":"v1/v1.go:202","msg":"Save key error","err":"context deadline exceeded","stacktrace":"github.com/shiguanghuxian/etcd-manage/program/v1.saveEtcdKey.func1\n\t/home/raushank/go/src/github.com/shiguanghuxian/etcd-manage/program/v1/v1.go:202\ngithub.com/shiguanghuxian/etcd-manage/program/v1.saveEtcdKey\n\t/home/raushank/go/src/github.com/shiguanghuxian/etcd-manage/program/v1/v1.go:236\ngithub.com/shiguanghuxian/etcd-manage/program/v1.postEtcdKey\n\t/home/raushank/go/src/github.com/shiguanghuxian/etcd-manage/program/v1/v1.go:154\ngithub.com/shiguanghuxian/etcd-manage/vendor/github.com/gin-gonic/gin.(Context).Next\n\t/home/raushank/go/src/github.com/shiguanghuxian/etcd-manage/vendor/github.com/gin-gonic/gin/context.go:108\ngithub.com/shiguanghuxian/etcd-manage/program.(Program).middlewareEtcd.func1\n\t/home/raushank/go/src/github.com/shiguanghuxian/etcd-manage/program/http.go:132\ngithub.com/shiguanghuxian/etcd-manage/vendor/github.com/gin-gonic/gin.(Context).Next\n\t/home/raushank/go/src/github.com/shiguanghuxian/etcd-manage/vendor/github.com/gin-gonic/gin/context.go:108\ngithub.com/shiguanghuxian/etcd-manage/vendor/github.com/gin-gonic/gin.RecoveryWithWriter.func1\n\t/home/raushank/go/src/github.com/shiguanghuxian/etcd-manage/vendor/github.com/gin-gonic/gin/recovery.go:48\ngithub.com/shiguanghuxian/etcd-manage/vendor/github.com/gin-gonic/gin.(Context).Next\n\t/home/raushank/go/src/github.com/shiguanghuxian/etcd-manage/vendor/github.com/gin-gonic/gin/context.go:108\ngithub.com/shiguanghuxian/etcd-manage/vendor/github.com/gin-gonic/gin.LoggerWithWriter.func1\n\t/home/raushank/go/src/github.com/shiguanghuxian/etcd-manage/vendor/github.com/gin-gonic/gin/logger.go:84\ngithub.com/shiguanghuxian/etcd-manage/vendor/github.com/gin-gonic/gin.(Context).Next\n\t/home/raushank/go/src/github.com/shiguanghuxian/etcd-manage/vendor/github.com/gin-gonic/gin/context.go:108\ngithub.com/shiguanghuxian/etcd-manage/vendor/github.com/gin-gonic/gin.(Engine).handleHTTPRequest\n\t/home/raushank/go/src/github.com/shiguanghuxian/etcd-manage/vendor/github.com/gin-gonic/gin/gin.go:363\ngithub.com/shiguanghuxian/etcd-manage/vendor/github.com/gin-gonic/gin.(Engine).ServeHTTP\n\t/home/raushank/go/src/github.com/shiguanghuxian/etcd-manage/vendor/github.com/gin-gonic/gin/gin.go:328\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2774\nnet/http.(conn).serve\n\t/usr/local/go/src/net/http/server.go:1878"}