Skip to content

Connect-go with Istio #619

Closed Answered by ymmt2005
ymmt2005 asked this question in Q&A
Oct 30, 2023 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

We found the cause.
It was because we didn't create the httpClient as instructed.

As in the doc, we should've created it as:

func newInsecureClient() *http.Client {
  return &http.Client{
    Transport: &http2.Transport{
      AllowHTTP: true,
      DialTLS: func(network, addr string, _ *tls.Config) (net.Conn, error) {
        // If you're also using this client for non-h2c traffic, you may want
        // to delegate to tls.Dial if the network isn't TCP or the addr isn't
        // in an allowlist.
        return net.Dial(network, addr)
      },
      // Don't forget timeouts!
    },
  }
}

https://connectrpc.com/docs/go/deployment#h2c

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@akshayjshah
Comment options

@ymmt2005
Comment options

@akshayjshah
Comment options

@ymmt2005
Comment options

Answer selected by akshayjshah
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants