Hello Docker Community,
I’m encountering a persistent connection issue while trying to run ChirpStack FUOTA Server with PostgreSQL in a Docker Compose environment. Here are the key details:
Environment:
- Docker Compose version: Latest
- PostgreSQL Image: postgres:9.6-alpine
- ChirpStack FUOTA Server: GitHub - chirpstack/chirpstack-fuota-server at v3
Issue Description: When launching the containers, the ChirpStack FUOTA Server repeatedly fails to connect to the PostgreSQL database. The error logs consistently show:
level=warning msg="storage: ping PostgreSQL database error, will retry in 2s"
error="dial tcp [::1]:5432: connect: connection refused"
Troubleshooting Steps Already Attempted:
- Verified PostgreSQL container is running
- Checked network configurations
- Confirmed database user, password, and connection strings match
- Tried different Docker Compose network configurations
Docker Compose Configuration:
services:
chirpstack-fuota-server:
volumes:
- /usr/bin/chirpstack-fuota-server:/usr/bin/chirpstack-fuota-server
- /etc/chirpstack-fuota-server:/etc/chirpstack-fuota-server
environment:
- TEST_POSTGRES_DSN=postgres://chirpstack_fuota:chirpstack_fuota@postgres/chirpstack_fuota?sslmode=disable
postgres:
image: postgres:9.6-alpine
environment:
- POSTGRES_USER=chirpstack_fuota
- POSTGRES_PASSWORD=chirpstack_fuota
- POSTGRES_DB=chirpstack_fuota
Specific Questions:
- What could be causing the connection to be refused specifically to
[::1]:5432
? - Are there any known networking quirks with Docker Compose that might prevent PostgreSQL connections?
- How can I definitively diagnose the root cause of this connection issue?
Any guidance or insights would be greatly appreciated. I’m happy to provide additional logs or configuration details if needed.
Thank you in advance for your help!
Best regards,
Pratham