Introduction
Problem
Cause
Solution
Outcome
Confirmation of Problem Resolution:
- Verify the logs after exporting the
CONSUL_GRPC_CACERT
variable to ensure no further certificate-related errors are present (e.g., "tls: bad certificate"). - Confirm that Envoy successfully connects to gRPC without authentication failures.
If the Problem Persists:
- Double-check the
CONSUL_GRPC_CACERT
environment variable to ensure it points to the correct CA file as specified intls.defaults
. - Validate the CA certificate being used for gRPC communication matches the CA trusted by the Consul client.
- Restart the Consul agent and Envoy processes to apply the changes and reinitialize the connection.
- Review any additional configuration discrepancies or logs for unresolved issues.
Additional Information
[2025-01-28 09:47:01.056][907228][warning][config] [./source/extensions/config_subscription/grpc/grpc_stream.h:226] DeltaAggregatedResources gRPC config stream to local_agent closed since 41s ago: 14, upstream connect error or disconnect/reset before headers. reset reason: remote connection failure, transport failure reason: TLS_error:|268435581:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED:TLS_error_end
[2025-01-28 09:47:12.404][907228][warning][config] [./source/extensions/config_subscription/grpc/grpc_stream.h:226] DeltaAggregatedResources gRPC config stream to local_agent closed since 52s ago: 14, upstream connect error or disconnect/reset before headers. reset reason: remote connection failure, transport failure reason: TLS_error:|268435581:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED:TLS_error_end
[2025-01-28 09:47:33.676][907228][warning][config] [./source/extensions/config_subscription/grpc/grpc_stream.h:226] DeltaAggregatedResources gRPC config stream to local_agent closed since 73s ago: 14, upstream connect error or disconnect/reset before headers. reset reason: remote connection failure, transport failure reason: TLS_error:|268435581:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED:TLS_error_end
After exporting the CONSUL_GRPC_CACERT
variable, the logs no longer show any errors.
[2025-01-28 09:50:10.528][913980][info][main] [source/server/server.cc:432] statically linked extensions:
[2025-01-28 09:50:10.528][913980][info][main] [source/server/server.cc:434] envoy.compression.compressor: envoy.compression.brotli.compressor, envoy.compression.gzip.compressor, envoy.compression.zstd.compressor
[2025-01-28 09:50:10.528][913980][info][main] [source/server/server.cc:434] envoy.transport_sockets.downstream: envoy.transport_sockets.alts, envoy.transport_sockets.quic, envoy.transport_sockets.raw_buffer, envoy.transport_sockets.starttls, envoy.transport_sockets.tap, envoy.transport_sockets.tcp_stats, envoy.transport_sockets.tls, raw_buffer, starttls, tls
[2025-01-28 09:50:10.528][913980][info][main] [source/server/server.cc:434] envoy.access_loggers.extension_filters: envoy.access_loggers.extension_filters.cel
[2025-01-28 09:50:10.528][913980][info][main] [source/server/server.cc:434] envoy.dubbo_proxy.filters: envoy.filters.dubbo.router
Reference documents:
-
gRPC CA File Configuration:
Consul Connect - Envoy gRPC CA File -
TLS Verification for gRPC:
Consul Agent Configuration - TLS gRPC Verify Incoming -
Environment Variables for TLS Configuration:
Consul Agent Environment Variables