Trouble updating to the 2.6.x betas

Currently running the self-hosted version 2.5.10 beta with no issues. Over the past week I've been trying to update to the 2.6.x betas. but I'm having a port issue. I'm not sure how to fix.

Running on Debian 11.

This is my log error:

Error: Invalid number value for env variable POSTGRES_PORT = "5442"
at Object.parseEnv (/home/joplin/packages/server/src/env.ts:140:24)
at /home/joplin/packages/server/src/app.ts:102:23
at Generator.next ()
at fulfilled (/home/joplin/packages/server/dist/app.js:5:58)
at processTicksAndRejections (node:internal/process/task_queues:96:5)

Here is my docker-compose.server.yml file which has worked well since the self host option has been available:

version: '3'

services:
db:
image: postgres:13.4
container_name: joplin-postgres
ports:
- "5442:5442"
restart: unless-stopped
volumes:
- ./postgres-data:/var/lib/postgresql/data
environment:
- APP_PORT=22300
- POSTGRES_PASSWORD=password
- POSTGRES_USER=joplin
- POSTGRES_DB=joplin
app:
image: joplin/server:2.6.10-beta
container_name: joplin-server-2610
depends_on:
- db
ports:
- "22300:22300"
restart: unless-stopped
environment:
- APP_BASE_URL=https://joplin.mydomain.com
- DB_CLIENT=pg
- POSTGRES_PASSWORD=password
- POSTGRES_DATABASE=joplin
- POSTGRES_USER=joplin
- POSTGRES_PORT="5442"
- POSTGRES_HOST=db

I'm not sure why the port issue all of a sudden. If I go back to 2.5.10 all is fine. I appreciate any help!

You need to remove the quotes around 5442

Thanks for responding @laurent . Unfortunately when I removed the quotes from 5442 I got the following error in the logs:

2021-11-14 00:59:20: db: Could not connect. Will try again. connect ECONNREFUSED 172.23.0.2:5442

Plus going back to 2.5.10 without the quotes gave me the same results (ECONNREFUSED ). Adding the quotes back fixed it for 2.5.10 but not 2.6.10.

No expert knowledge, just comparing your setup file with mine which is working with 2.5.x and 2.6.x

  • The quotes only need to be removed from POSTGRES_PORT= in the Joplin environment settings.
  • My port for Postgres is the default 5432, have you changed yours?

If you wanted to map 5432 in the postgres container to 5442 on the docker host wouldn't the joplin-postgres settings be:

ports:
- "5442:5432"

Of course this does not explain why this same file works with 2.5.x but not 2.6.x ...

Thanks for the advice @dpoulton. What I ended up doing was migrating to a non-dockerized postgres. That fixed it for me. Currently running 2.6.10 with no issues.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.