DB connection fails on startup - Server=localhost invalid in Docker #1
Loading…
Reference in New Issue
user.block.title
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
On startup, the server crashes immediately with a DB connection error.
NHibernate (the ORM used for DB access) tries to connect to
127.0.0.1:5432(localhost) but in Docker, the database is only reachable via its service namediiis-na-db.Error
Root Cause
The connection strings in the config files have
Server=localhosthardcoded, which does not resolve inside a Docker network.Affected files:
src/DiIiS-NA/database.Account.configsrc/DiIiS-NA/database.Worlds.configFix
Change
Server=localhost→Server=diiis-na-dbin both files:DB connection fails on startup - Server=localhost invalid in Docker #1to DB connection fails on startup - Server=localhost invalid in Docker