Difficulty connecting to database

It keeps giving me this error:

2023-12-23 19:39:12,138 ERROR api.database :: Cannot connect to Database
clojure.lang.ExceptionInfo: Timed out after 10.0 s {:message "Timed out after 10.0 s"}
  • postgres server is up and running
  • able to connect to database from parent server (since Metabase is running on a container) and from sibling container
  • from inside Metabase container able to establish connection to database (tested with nc command)

Diagnostic Info:

  "browser-info": {
    "language": "en-US",
    "platform": "Linux x86_64",
    "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36",
    "vendor": "Google Inc."
  "system-info": {
    "file.encoding": "UTF-8",
    "java.runtime.name": "OpenJDK Runtime Environment",
    "java.runtime.version": "11.0.21+9",
    "java.vendor": "Eclipse Adoptium",
    "java.vendor.url": "https://adoptium.net/",
    "java.version": "11.0.21",
    "java.vm.name": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "11.0.21+9",
    "os.name": "Linux",
    "os.version": "4.19.0-13-amd64",
    "user.language": "en",
    "user.timezone": "Asia/Tehran"
  "metabase-info": {
    "databases": [
    "hosting-env": "unknown",
    "application-database": "postgres",
    "application-database-details": {
      "database": {
        "name": "PostgreSQL",
        "version": "13.13 (Debian 13.13-0+deb11u1)"
      "jdbc-driver": {
        "name": "PostgreSQL JDBC Driver",
        "version": "42.6.0"
    "run-mode": "prod",
    "version": {
      "date": "2023-12-19",
      "tag": "v0.48.1",
      "hash": "a8302d4"
    "settings": {
      "report-timezone": null

Please help me out

You connected to another Postgres, this is a networking issue for sure, but I can’t identify where