0

I'm trying to use a haproxy instance to correctly redirect the requests from the client to the server. But the client can't connect using the haproxy, it only works when I do the request directly to the server.

The unique message error is printed from the client, saying:

Request not completed. Error: Error: 14 UNAVAILABLE: No connection established

I'm creating the certificates using openssl.

I think, there's a problem in the haproxy config file, since works normally when "Client -> Server".

My haproxy config file:

global
    daemon

defaults
    mode http
    timeout connect 5s
    timeout client 60s
    timeout server 60s

frontend grpc-front
    bind *:8000 proto h2 ssl crt /usr/local/etc/haproxy/ca.pem

    default_backend grpc-back

backend grpc-back
    server test-server test-server:8000 check fall 3 proto h2 ssl verify required ca-file /usr/local/etc/haproxy/ca.pem

Observations:

  • The project works normally when connecting directly to the server (Client -> Server);
  • The CN defined in the server's certificate is: test-haproxy;
  • It also works normally when not using TLS;
  • All applications (client, haproxy, server) are dockerized and properly connected to each other.
James Z
  • 12,209
  • 10
  • 24
  • 44

0 Answers0