Help? Looking for info on how net/http and net/http2 are supposed to interact in the context of noDialClientConnPool

35 views
Skip to first unread message

Chris Friesen

unread,
Jun 30, 2020, 1:06:16 PM6/30/20
to golang-nuts
Hi all,

I've got a weird bug in Kubernetes where an unclean shutdown of kube-apiserver sometimes causes kubelet to lose connectivity with kube-apiserver and then get stuck in a mode where it's unable to regain connectivity.  Looking at the running "stuck" kubelet process with strace I see it opening up a connection to kube-apiserver, sending and receiving some data, then close()ing the socket.  It's only open for about 5ms or so.  In the typical case the connection stays open indefinitely so I'm not sure what's causing it to get closed.

After attaching delve to the stuck process, it looks like net/http/transport.go is calling into net/http2/transport.go, but that returns an error of ErrNoCachedConn because we're using noDialClientConnPool and there are no cached connections.

I'm still trying to figure out how this is *supposed* to work, so that I can figure out what's going wrong.  The code comment says, "We let the HTTP/1.1 client dial and use its TLS connection instead."

Anyone have any pointers?  Is there any documentation on this?

Thanks,
Chris
Reply all
Reply to author
Forward
0 new messages