Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Context deadline exceeded when using with remote etcd which has cert based auth #31

Open
raushan2016 opened this issue Oct 20, 2019 · 1 comment

Comments

@raushan2016
Copy link

raushan2016 commented Oct 20, 2019

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"}

@raushan2016
Copy link
Author

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.

  • Rebuilt URL to: foobar.cosmosdb.com:2379/
  • Trying 40.0.0.0...
  • TCP_NODELAY set
  • Connected to foobar.cosmosdb.com (40.0.0.0) port 2379 (#0)

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

  • upload completely sent off: 8 out of 8 bytes
  • Empty reply from server
  • Connection #0 to host foobar.cosmosdb.com left intact
    curl: (52) Empty reply from server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant