Cannot connect to app using HTTP/2
search cancel

Cannot connect to app using HTTP/2

book

Article ID: 384548

calendar_today

Updated On:

Products

VMware Tanzu Application Service

Issue/Introduction

Tanzu Application Service supports connections via HTTP/2 by default. If a customer reports that they are unable to connect to any app using HTTP/2 (for example, by using a connection using grpcurl), use the following troubleshooting steps to isolate the problem.

Resolution

Make sure that the customer has not disabled HTTP/2 support (https://techdocs.broadcom.com/us/en/vmware-tanzu/platform/tanzu-platform-for-cloud-foundry/6-0/tpcf/config-networking.html). They may have deselected the Use HTTP/2 protocol check box.

If the default HTTP/2 support is active, have the customer deploy one or more of the sample apps (https://docs.cloudfoundry.org/devguide/http2-protocol.html#sample-apps). If they can connect to the sample app:

./grpcurl sample-app.example.com:443 list

that proves that the foundation supports the protocol.

 

Additional Information

Example of customer using the sample apps to debug an application issue:

The .NET sample app helped to point out that we were missing the configuration of Kestrel server to listen on HTTP/2. Once we added this config to the app, we were able to communicate with the app over HTTP/2 and gRPC:

var builder = WebApplication.CreateBuilder(args); 
// Configure HTTP/2 
builder.WebHost.ConfigureKestrel(options => 
{ 
string port = Environment.GetEnvironmentVariable("PORT") ?? "8080"; 
options.ListenAnyIP(Int32.Parse(port), o => o.Protocols = HttpProtocols.Http2); 
options.AllowAlternateSchemes = true; 
});