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

Redis Server #10543

Closed
rafaeld03 opened this issue Aug 25, 2024 · 6 comments · Fixed by #10560
Closed

Redis Server #10543

rafaeld03 opened this issue Aug 25, 2024 · 6 comments · Fixed by #10560
Labels
in linear Issue or PR has been created in Linear for internal review Released

Comments

@rafaeld03
Copy link

rafaeld03 commented Aug 25, 2024

Bug Description

I created a redis database managed by Digital Ocean
The data below for connection.
N8n Cannot connect

username = default
password = ************************
host = db-redis-XXXXXXXXX-do-user-XXXXXX.f.db.ondigitalocean.com
port = 25061

LOG
2024-08-24T18:33:36.059Z | warn | Redis unavailable - trying to reconnect... "{ file: 'redis-client.service.js' }"
2024-08-24T18:33:36.060Z | warn | Redis unavailable - trying to reconnect... "{ file: 'redis-client.service.js' }"
2024-08-24T18:33:36.565Z | warn | Error with Redis: "{\n errno: -32,\n code: 'EPIPE',\n syscall: 'write',\n file: 'RedisServiceBaseClasses.js'\n}"
2024-08-24T18:33:36.566Z | warn | Redis unavailable - trying to reconnect... "{ file: 'redis-client.service.js' }"
2024-08-24T18:33:36.567Z | warn | Redis unavailable - trying to reconnect... "{ file: 'redis-client.service.js' }"
2024-08-24T18:33:37.071Z | warn | Error with Redis: "{\n errno: -32,\n code: 'EPIPE',\n syscall: 'write',\n file: 'RedisServiceBaseClasses.js'\n}"
2024-08-24T18:33:37.071Z | warn | Redis unavailable - trying to reconnect... "{ file: 'redis-client.service.js' }"
2024-08-24T18:33:37.072Z | warn | Redis unavailable - trying to reconnect... "{ file: 'redis-client.service.js' }"
2024-08-24T18:33:37.576Z | warn | Redis unavailable - trying to reconnect... "{ file: 'redis-client.service.js' }"
2024-08-24T18:33:37.577Z | warn | Redis unavailable - trying to reconnect... "{ file: 'redis-client.service.js' }"
2024-08-24T18:33:38.082Z | warn | Error with Redis: "{\n errno: -104,\n code: 'ECONNRESET',\n syscall: 'write',\n file: 'RedisServiceBaseClasses.js'\n}"
2024-08-24T18:33:38.083Z | warn | Redis unavailable - trying to reconnect... "{ file: 'redis-client.service.js' }"
2024-08-24T18:33:38.083Z | warn | Redis unavailable - trying to reconnect... "{ file: 'redis-client.service.js' }"
2024-08-24T18:33:38.588Z | warn | Redis unavailable - trying to reconnect... "{ file: 'redis-client.service.js' }"
2024-08-24T18:33:38.588Z | warn | Redis unavailable - trying to reconnect... "{ file: 'redis-client.service.js' }"
2024-08-24T18:33:39.092Z | warn | Error with Redis: "{\n errno: -104,\n code: 'ECONNRESET',\n syscall: 'write',\n file: 'RedisServiceBaseClasses.js'\n}"
2024-08-24T18:33:39.093Z | warn | Redis unavailable - trying to reconnect... "{ file: 'redis-client.service.js' }"
2024-08-24T18:33:39.093Z | warn | Redis unavailable - trying to reconnect... "{ file: 'redis-client.service.js' }"

To Reproduce

  - EXECUTIONS_MODE=queue
  - QUEUE_BULL_REDIS_HOST=db-redis-XXXXXXXXX-do-user-XXXXXX.f.db.ondigitalocean.com
  - QUEUE_BULL_REDIS_PORT=25061
  - QUEUE_BULL_REDIS_USERNAME=default
  - QUEUE_BULL_REDIS_PASSWORD=**************
  - QUEUE_BULL_REDIS_TLS=TRUE

Expected behavior

redis connection

Operating System

Debian 12

n8n Version

1.55.3

Node.js Version

18.12.0

Database

PostgreSQL

Execution mode

queue

@Joffcom
Copy link
Member

Joffcom commented Aug 25, 2024

Hey @rafaeld03,

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

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

netroy commented Aug 26, 2024

Can you please check that

  1. The redis instance actually supports TLS. If not, please try removing QUEUE_BULL_REDIS_TLS
  2. The host n8n is running on is allowed to connect to the redis server with all that same config. it's possible that the DO has some kind of firewall that you might need to add rules to.

@rafaeld03
Copy link
Author

rafaeld03 commented Aug 26, 2024

  • The redis instance actually supports TLS. If not, please try removing QUEUE_BULL_REDIS_TLS

yes, it is mandatory

  • The host n8n is running on is allowed to connect to the redis server with all that same config. it's possible that the DO has some kind of firewall that you might need to add rules to.

I have this scenario working in version 1.40.0 of n8n
it didn't work in the new version

@netroy
Copy link
Member

netroy commented Aug 26, 2024

@rafaeld03 Can you please try setting QUEUE_BULL_REDIS_TLS to true instead of TRUE, and let us know if that fixes the issue 🙏🏽

@rafaeld03
Copy link
Author

rafaeld03 commented Aug 26, 2024

@rafaeld03 Can you please try setting QUEUE_BULL_REDIS_TLS to true instead of TRUE, and let us know if that fixes the issue 🙏🏽
@netroy
the change works
it still appears in the log that every 5 minutes it shows a connection error
but n8n is working
what could be happening every 5 minutes?

LOG
2024-08-26T18:13:17.766066492Z Initializing n8n process
2024-08-26T18:13:18.264122245Z n8n ready on 0.0.0.0, port 5678
2024-08-26T18:13:21.251783490Z Version: 1.55.3
2024-08-26T18:13:21.262291560Z
2024-08-26T18:13:21.262323043Z Editor is now accessible via:
2024-08-26T18:13:21.262326400Z https://paineleditor2.site.com.br:5678/
2024-08-26T18:18:19.036695128Z Redis unavailable - trying to reconnect...
2024-08-26T18:18:22.249822262Z Redis unavailable - trying to reconnect...
2024-08-26T18:18:22.350141899Z Redis unavailable - trying to reconnect...
2024-08-26T18:23:20.135361266Z Redis unavailable - trying to reconnect...
2024-08-26T18:23:23.047100113Z Redis unavailable - trying to reconnect...
2024-08-26T18:23:23.348389186Z Redis unavailable - trying to reconnect...

@janober
Copy link
Member

janober commented Aug 28, 2024

Fix got released with [email protected]

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 Released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants