[Bug]: getaddrinfo ENOTFOUND base #616

Closed
opened 2026-02-04 20:35:02 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @rowanfuchs on GitHub (Dec 11, 2024).

Where is the problem occurring?

I encountered the problem while interacting with the server (Backend)

What browsers are you seeing the problem on?

Brave

Current behaviour

node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^
Error: getaddrinfo ENOTFOUND base
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26) {
  errno: -3008,
  code: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: 'base'
}
Node.js v18.20.5

Desired behaviour

No response

Steps to reproduce

I am using docker compose within portainer to setup planka, i've tried several BASE_URL's but I can't seem to get it to work properly

urls tried:
http://192.168.2.100:3020
http://192.168.2.100:1337
http://localhost:3020
http://0.0.0.0:3020

I'm not using a proxy, I try to access http://192.168.2.100:3020 but I get the browser error ERR_CONNECTION_REFUSED with the log mentioned prior within docker.

services:
  planka:
    image: ghcr.io/plankanban/planka:latest
    container_name: planka
    restart: unless-stopped
    volumes:
      - /mnt/hdd/config/planka/user-avatars:/app/public/user-avatars
      - /mnt/hdd/config/planka/project-background-images:/app/public/project-background-images
      - /mnt/hdd/config/planka/attachments:/app/private/attachments
    ports:
      - 3020:1337
    environment:
      - TRUST_PROXY=1
      - BASE_URL=http://192.168.2.100:3020
      - DATABASE_URL=planka_postgres://postgres@postgres/planka
      - SECRET_KEY=***
    depends_on:
      planka_postgres:
        condition: service_healthy

  planka_postgres:
    container_name: planka_postgres
    image: postgres:16-alpine
    restart: unless-stopped
    volumes:
      - /mnt/hdd/config/planka/db-data:/var/lib/postgresql/data
    environment:
      - POSTGRES_DB=planka
      - POSTGRES_HOST_AUTH_METHOD=trust
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres -d planka"]
      interval: 10s
      timeout: 5s
      retries: 5

Other information

my hosts is configured as following

cat /etc/hosts
127.0.0.1       nuc.my.domain nuc localhost.localdomain localhost
::1             localhost localhost.localdomain

dns nuc doesn't resolve to this device as i never set that up other than the static ip 192.168.2.100

Originally created by @rowanfuchs on GitHub (Dec 11, 2024). ### Where is the problem occurring? I encountered the problem while interacting with the server (Backend) ### What browsers are you seeing the problem on? Brave ### Current behaviour ``` node:internal/process/promises:288 triggerUncaughtException(err, true /* fromPromise */); ^ Error: getaddrinfo ENOTFOUND base at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26) { errno: -3008, code: 'ENOTFOUND', syscall: 'getaddrinfo', hostname: 'base' } Node.js v18.20.5 ``` ### Desired behaviour _No response_ ### Steps to reproduce I am using docker compose within portainer to setup planka, i've tried several `BASE_URL`'s but I can't seem to get it to work properly urls tried: http://192.168.2.100:3020 http://192.168.2.100:1337 http://localhost:3020 http://0.0.0.0:3020 I'm not using a proxy, I try to access `http://192.168.2.100:3020` but I get the browser error `ERR_CONNECTION_REFUSED` with the log mentioned prior within docker. ``` services: planka: image: ghcr.io/plankanban/planka:latest container_name: planka restart: unless-stopped volumes: - /mnt/hdd/config/planka/user-avatars:/app/public/user-avatars - /mnt/hdd/config/planka/project-background-images:/app/public/project-background-images - /mnt/hdd/config/planka/attachments:/app/private/attachments ports: - 3020:1337 environment: - TRUST_PROXY=1 - BASE_URL=http://192.168.2.100:3020 - DATABASE_URL=planka_postgres://postgres@postgres/planka - SECRET_KEY=*** depends_on: planka_postgres: condition: service_healthy planka_postgres: container_name: planka_postgres image: postgres:16-alpine restart: unless-stopped volumes: - /mnt/hdd/config/planka/db-data:/var/lib/postgresql/data environment: - POSTGRES_DB=planka - POSTGRES_HOST_AUTH_METHOD=trust healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres -d planka"] interval: 10s timeout: 5s retries: 5 ``` ### Other information my hosts is configured as following ``` cat /etc/hosts 127.0.0.1 nuc.my.domain nuc localhost.localdomain localhost ::1 localhost localhost.localdomain ``` dns `nuc` doesn't resolve to this device as i never set that up other than the static ip `192.168.2.100`
Author
Owner

@meltyshev commented on GitHub (Dec 11, 2024):

Hi!

Usually the getaddrinfo error isn't related to BASE_URL, as BASE_URL isn’t used for making connections. In your case, it could be related to DATABASE_URL, since there aren’t any other settings in your compose file that relate to startup connections.

Additionally, I noticed that your DATABASE_URL is incorrectly specified, the protocol should always be postgresql and the host should be planka_postgres in your case. The corrected version: DATABASE_URL=postgresql://postgres@planka_postgres/planka, this seems to be the issue.

@meltyshev commented on GitHub (Dec 11, 2024): Hi! Usually the `getaddrinfo` error isn't related to `BASE_URL`, as `BASE_URL` isn’t used for making connections. In your case, it could be related to `DATABASE_URL`, since there aren’t any other settings in your compose file that relate to startup connections. Additionally, I noticed that your `DATABASE_URL` is incorrectly specified, the protocol should always be `postgresql` and the host should be `planka_postgres` in your case. The corrected version: `DATABASE_URL=postgresql://postgres@planka_postgres/planka`, this seems to be the issue.
Author
Owner

@rowanfuchs commented on GitHub (Dec 11, 2024):

Thank you very much for taking the time to correct my mistake, this was indeed the issue and changing the postgres url resolved the issue.

@rowanfuchs commented on GitHub (Dec 11, 2024): Thank you very much for taking the time to correct my mistake, this was indeed the issue and changing the postgres url resolved the issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/planka#616