Problem with encryption key

Describe the issue/error/question

Hello,
We have a problem with encryption key.
When we run workflow manually, all is fine, but if we use node “Schedule trigger” to run any workflow I get an error attached below.

We have set the env variable “N8N_ENCRYPTION_KEY” before the first run.

What is the error message (if any)?

ERROR: UNKNOWN ERROR - check the detailed error for more information
Credentials could not be decrypted. 
The likely reason is that a different "encryptionKey" was used to encrypt the data.

Information on your n8n setup

  • n8n version: 0.218.0
  • Database you’re using (default: SQLite): PostgreSQL
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]: Docker

Hey @Majkel97,

Welcome to the community :raised_hands:

Are you running n8n in queue mode? Normally I would only expect to see that if the encryption has changed so it is a bit odd that it works manually.

Thanks for your reply.

Yes, we have the executions mode set to queue:
EXECUTIONS_MODE: queue

Hey @Majkel97,

Do you have the encryption key set to the same value for all of the worker instances?

Yes, should be the same:

n8n-worker:
    image: n8nio/n8n:0.218.0
    environment:
      N8N_ENCRYPTION_KEY: <key_here> <---
      QUEUE_BULL_REDIS_HOST: redis
      ...
      NODE_ENV: production
    deploy:
      replicas: 2 <----
      placement:
        max_replicas_per_node: 2 <---
    networks:
      - n8n
    command: n8n worker

Hey @Majkel97,

That is odd, It might be worth checking the logs for the workers to see if it is only one of them throwing the message.

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