Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Last n8n update broke the service #13512

Open
ohmyboroda opened this issue Feb 25, 2025 · 4 comments
Open

Last n8n update broke the service #13512

ohmyboroda opened this issue Feb 25, 2025 · 4 comments
Labels
in linear Issue or PR has been created in Linear for internal review Needs Feedback Waiting for further input or clarification.

Comments

@ohmyboroda
Copy link

Bug Description

The last update broke the service. Rollback version does not help, before that everything worked stably.
The database works without any problems.
Image

To Reproduce

Upgrade from 1.79.4 -> 1.81.0

Expected behavior

Successful service load after restarting the docker container.

Operating System

Ubuntu Linux 22.04

n8n Version

1.79.4

Node.js Version

idk

Database

PostgreSQL

Execution mode

main (default)

@Joffcom
Copy link
Member

Joffcom commented Feb 25, 2025

Hey @ohmyboroda,

We have created an internal ticket to look into this which we will be tracking as "GHC-962"

@Joffcom Joffcom added the in linear Issue or PR has been created in Linear for internal review label Feb 25, 2025
@netroy
Copy link
Member

netroy commented Feb 25, 2025

According to the error in the screenshot, the credentials for the postgres connection are incorrect.
Can you check again if the credentials are valid via another postgres client?

@Joffcom Joffcom added the Needs Feedback Waiting for further input or clarification. label Feb 25, 2025
@ohmyboroda
Copy link
Author

ohmyboroda commented Feb 26, 2025

According to the error in the screenshot, the credentials for the postgres connection are incorrect. Can you check again if the credentials are valid via another postgres client?

Yes, connects successfully through another client. I checked all the credentials.
Everything worked without problems before the update, after restarting the container with the update it stopped working.

Compose file:

services:
  n8n:
    image: docker.n8n.io/n8nio/n8n
    environment:
      - SERVICE_FQDN_N8N_5678
      - 'N8N_EDITOR_BASE_URL=${SERVICE_FQDN_N8N}'
      - 'WEBHOOK_URL=${SERVICE_FQDN_N8N}'
      - 'N8N_HOST=${SERVICE_URL_N8N}'
      - GENERIC_TIMEZONE=Europe/Berlin
      - TZ=Europe/Berlin
      - DB_TYPE=postgresdb
      - 'DB_POSTGRESDB_DATABASE=${POSTGRES_DB:-n8n}'
      - DB_POSTGRESDB_HOST=postgresql
      - DB_POSTGRESDB_PORT=5432
      - DB_POSTGRESDB_USER=$SERVICE_USER_POSTGRES
      - DB_POSTGRESDB_SCHEMA=public
      - DB_POSTGRESDB_PASSWORD=$SERVICE_PASSWORD_POSTGRES
    volumes:
      - 'n8n-data:/home/node/.n8n'
    depends_on:
      postgresql:
        condition: service_healthy
    healthcheck:
      test:
        - CMD-SHELL
        - 'wget -qO- http://127.0.0.1:5678/'
      interval: 5s
      timeout: 20s
      retries: 10
  postgresql:
    image: 'postgres:16-alpine'
    volumes:
      - 'postgresql-data:/var/lib/postgresql/data'
    environment:
      - POSTGRES_USER=$SERVICE_USER_POSTGRES
      - POSTGRES_PASSWORD=$SERVICE_PASSWORD_POSTGRES
      - 'POSTGRES_DB=${POSTGRES_DB:-n8n}'
    healthcheck:
      test:
        - CMD-SHELL
        - 'pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}'
      interval: 5s
      timeout: 20s
      retries: 10

@Joffcom Joffcom removed the Needs Feedback Waiting for further input or clarification. label Feb 26, 2025
@netroy
Copy link
Member

netroy commented Feb 26, 2025

Just tried this compose file:

volumes:
  n8n-data:
  postgresql-data:

services:
  n8n:
    image: n8nio/n8n:1.81.0
    environment:
      - GENERIC_TIMEZONE=Europe/Berlin
      - TZ=Europe/Berlin
      - DB_TYPE=postgresdb
      - DB_POSTGRESDB_HOST=postgresql
      - DB_POSTGRESDB_DATABASE=$POSTGRES_DB
      - DB_POSTGRESDB_USER=$SERVICE_USER_POSTGRES
      - DB_POSTGRESDB_PASSWORD=$SERVICE_PASSWORD_POSTGRES
    volumes:
      - n8n-data:/home/node/.n8n
    depends_on:
      postgresql:
        condition: service_healthy
    healthcheck:
      test:
        - CMD-SHELL
        - 'wget -qO- http://127.0.0.1:5678/'
      interval: 5s
      timeout: 20s
      retries: 10

  postgresql:
    image: postgres:16-alpine
    volumes:
      - postgresql-data:/var/lib/postgresql/data
    environment:
      - POSTGRES_DB=$POSTGRES_DB
      - POSTGRES_USER=$SERVICE_USER_POSTGRES
      - POSTGRES_PASSWORD=$SERVICE_PASSWORD_POSTGRES
    healthcheck:
      test:
        - CMD-SHELL
        - 'pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}'
      interval: 5s
      timeout: 20s
      retries: 10

with .env

POSTGRES_DB=n8n
SERVICE_USER_POSTGRES=n8n
SERVICE_PASSWORD_POSTGRES=password

and had no issues.

Maybe SERVICE_PASSWORD_POSTGRES or SERVICE_USER_POSTGRES has changed in your env, and since postgres only provisions the user/DB once, the credentials probably don't match anymore.

@Joffcom Joffcom added the Needs Feedback Waiting for further input or clarification. label Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in linear Issue or PR has been created in Linear for internal review Needs Feedback Waiting for further input or clarification.
Projects
None yet
Development

No branches or pull requests

3 participants