-
Notifications
You must be signed in to change notification settings - Fork 615
[BUG]: Gateway Container Stuck at "Waiting" with SSL Enabled #2526
Copy link
Copy link
Labels
bugSomething isn't workingSomething isn't workingtriageIssues / Features awaiting triageIssues / Features awaiting triage
Milestone
Description
Problem
When enabling SSL/TLS in docker-compose.yml, the gateway container gets stuck in "starting" state and never becomes healthy.
Steps to Reproduce
-
Enable SSL in
docker-compose.yml:environment: - SSL=true - CERT_FILE=/app/certs/cert.pem - KEY_FILE=/app/certs/key-encrypted.pem - KEY_FILE_PASSWORD=${KEY_FILE_PASSWORD}
-
Generate certificates:
make certs-passphrase
-
Start services:
make docker-prod make compose-up
-
Check status:
docker compose ps
Expected Behavior
Gateway container should show status: Up (healthy)
Actual Behavior
- Gateway shows status:
Up (starting)indefinitely docker compose logs gatewayshows workers stuck at "Waiting for application startup"- Healthcheck never passes
Additional Issues
When SSL is configured:
-
TLS handshake errors appear in gateway logs when nginx connects:
[INFO] TCP handshake failed with error: TlsAcceptError { error: Custom { kind: InvalidData, error: InvalidMessage(InvalidContentType) } } -
502 Bad Gateway from nginx proxy at
http://localhost:8080 -
No documentation for configuring TLS in docker-compose deployments
Environment
- Docker Compose deployment
- HTTP_SERVER: granian (also affects gunicorn)
- Self-signed certificates with passphrase protection
- Container:
mcpgateway/mcpgateway:latest
Root Cause
- Healthcheck issue: Using
curl -fon HTTPS endpoint with self-signed cert fails SSL verification - Nginx connection pool: Reuses old HTTP connections to now-HTTPS gateway
- Missing nginx SSL config: Backend connections not configured for HTTPS
- Missing documentation: No guidance for TLS setup in containers
Proposed Solution
- Fix healthcheck to skip SSL verification:
curl -fk https://localhost:4444/health - Add nginx backend SSL configuration with
proxy_ssl_verify offfor self-signed certs - Create comprehensive TLS configuration documentation
- Update certificate generation to use AES256 encryption properly
🧩 Affected Component
Select the area of the project impacted:
-
mcpgateway- API -
mcpgateway- UI (admin panel) -
mcpgateway.wrapper- stdio wrapper - Federation or Transports
- CLI, Makefiles, or shell scripts
- Container setup (Docker/Podman/Compose)
- Other (explain below)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingtriageIssues / Features awaiting triageIssues / Features awaiting triage