Skip to content

grpcs:// URLs don't work out-of-the-box for some strict load balancers #243

@jasonschroeder-sfdc

Description

@jasonschroeder-sfdc

I was setting up bb-browser (which depends on bb-storage for CAS/AC) and hit a confusing error:

connection error: desc = "transport: authentication handshake failed: tls: first record does not look like a TLS handshake"

After much debugging, it seems this default is the problem:

tlsConfig.ServerName = configuration.ServerName

If the configuration.ServerName is empty (which is the default), the LoadBalancer in front of a gRPC service may deny the connection.

As a better default, I suggest to use the server name from the URI. After configuring like this:

  blobstore: {
    actionCache: {
      grpc: {
        address: 'rbe.internal.company.com:7443',
        tls: {
            server_name: 'rbe.internal.company.com',
        },
      },
    },

Everything worked beautifully ✨

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions