element-hq / element-hq/dendrite

No DB connection from docker

Open
#2,988 3 comments 0 reactions 0 assignees View on GitHub
T-Other
Dominant language
Go
Stars
967
Forks
102
PR merge metrics
No merged PRs in 30d

Description

*This issue was originally created by [**@fierg**](https://github.com/fierg) at .*

### Background information

- **Dendrite version or git SHA**: Dendrite release 0.11.1 (image)
- **SQLite3 or Postgres?**: Postgres
- **Running in Docker?**: Docker
- **`go version`**: go1.19.6 linux/amd64

- **Client used (if applicable)**:

### Description

- **What** is the problem:
Cannot connect to the database in docker
- **Who** is affected: Just Me
- **How** is this bug manifesting: (monolith_1 | time="2023-02-23T08:08:08.295379567Z" level=panic msg="Failed to set up global database connections" error="failed to find maximum connections: dial tcp 127.0.0.1:5432: connect: connection refused")
- **When** did this first appear: right after the first installation

### Steps to reproduce

- pull repo
- generate passwords, fill dedrite.yaml
- start docker-compose

The database is up and running, i can access it via pgAdmin, but the dendrite container cannot.

Contributor guide

Open the contributing guide

Research direction

Start with the docker-compose setup and dendrite.yaml, then compare the configured PostgreSQL host with the container log showing a connection attempt to 127.0.0.1:5432. Reproduce the first-install startup and verify that the Dendrite container can connect to the running database; done means the global database connections initialize without the panic.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose, go, postgresql
Domain
backend, databases, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.