Skip to content

Grpc timeout exception #5721

Closed
Closed

Description

@wisamidris7

Issue with TLS Configuration in Docker Networking

Description

I am experiencing issues with TLS configuration for inter-container communication in Docker Compose. The issue arises when one container attempts to communicate with another using HTTPS, and both configurations I’ve tried have not resolved the problem.
And when the request coming from outside docker compose it worked.

Docker Environment Variables

For EditionsService Container

The following environment variables are set:

ASPNETCORE_Kestrel__Endpoints__Https__Url="https://example.com:10004"
ASPNETCORE_Kestrel__Certificates__Default__Path="/app/certs/{private}.pfx"
ASPNETCORE_Kestrel__Certificates__Default__Password="{private}"
ASPNETCORE_Kestrel__EndpointDefaults__Protocols="Http1AndHttp2"

Issue Details

When IdentityService tries to make a gRPC call to EditionsService, two configurations have been tested, each resulting in different issues:

  1. External URL Configuration

    services__editions-api__https__0="https://example.com:10004/"
    • Problem: This configuration works for external access but times out when used for internal Docker communication between containers.
  2. Internal Network URL Configuration

    services__editions-api__https__0="https://common-api:10004/"
    • Problem: This configuration results in SSL certificate validation issues because common-api is not recognized by the certificate issued for example.com.

Request for Assistance

I am seeking guidance on how to properly configure TLS for secure inter-container communication in Docker Compose. Specifically, I need a solution that addresses both:

  1. Ensuring valid SSL/TLS certificates for internal communication.
  2. Avoiding timeout issues when using external URLs for internal Docker network communication.

Any advice or suggestions on how to resolve these issues would be greatly appreciated.

Activity

  1. locked and limited conversation to collaborators on Jul 29, 2024
  2. converted this issue into a discussion #5739 on Jul 29, 2024
  3. moved this from Backlog to Done in .NET Dockeron Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions