Code Monkey home page Code Monkey logo

Comments (18)

Joffcom avatar Joffcom commented on June 21, 2024

@shankarmn94 this doesn't appear to be a bug and looks to probably be around your configuration.

For general support I would recommend posting on the community support forum.

To start with this make sure you have followed our documentation on setting up queue mode (both all instances need to be set to run in queue) it would also be handy to know how you are triggering your workflow, if you are doing it from the UI then I would expect the main n8n instance to process the job but if it is a webhook or a schedule the worker should take it.

from n8n.

shankarmn94 avatar shankarmn94 commented on June 21, 2024

could you just share that please i got confused after trying these que mode with different configs.

https://docs.n8n.io/hosting/scaling/queue-mode/#set-encryption-key

this is what i tried.

from n8n.

shankarmn94 avatar shankarmn94 commented on June 21, 2024

@Joffcom

from n8n.

shankarmn94 avatar shankarmn94 commented on June 21, 2024

sometimes we are getting context deadline exceeded.

from n8n.

Joffcom avatar Joffcom commented on June 21, 2024

@shankarmn94 Can you share the full output from the worker nodes when you have queue mode configured as documented?

from n8n.

shankarmn94 avatar shankarmn94 commented on June 21, 2024

WEBHOOK_URL=http://10.51.112.8:5678/
N8N_BASIC_AUTH_USER=cloudquen8n
N8N_BASIC_AUTH_PASSWORD=n8ncloudque
DB_TYPE=postgresdb
DB_POSTGRESDB_DATABASE=workflow
DB_POSTGRESDB_HOST=10.51.112.8
DB_POSTGRESDB_PORT=5432
DB_POSTGRESDB_USER=workflow
DB_POSTGRESDB_PASSWORD=workflow
#N8N_PAYLOAD_SIZE_MAX=56MB
EXECUTIONS_DATA_PRUNE=true
EXECUTIONS_DATA_PRUNE_MAX_COUNT=5000000
EXECUTIONS_DATA_SAVE_ON_ERROR=all
EXECUTIONS_DATA_SAVE_ON_SUCCESS=all
NODE_OPTIONS="--max-old-space-size=16048 --require /root/.n8n/set-max-listeners.js"
EXECUTIONS_MODE=queue
N8N_ENCRYPTION_KEY=Zwyi2FIVHTJEYb5+KY74esTPlKn4Vjru
QUEUE_BULL_REDIS_HOST=10.51.112.9
QUEUE_BULL_PREFIX=workflows
QUEUE_BULL_REDIS_DB=0
QUEUE_BULL_REDIS_PORT=6379

i kept this in two node.. one i started as main like n8n start and in other server n8n worker..

services will start..

worker wont get any request or take workflows...

if i trigger workflow in main nodes, below errror is mentioned

ReplyError: ERR Error running script (call to 8f55ae4a3be429c6d38c5d5db3e80edf89197b64): @user_script:56: script tried accessing undeclared key
ERR Error running script (call to 8f55ae4a3be429c6d38c5d5db3e80edf89197b64): @user_script:56: script tried accessing undeclared key

from n8n.

shankarmn94 avatar shankarmn94 commented on June 21, 2024

what is wrong with this.

from n8n.

Joffcom avatar Joffcom commented on June 21, 2024

Hey @shankarmn94,

Can you share the full output from the worker node when it is starting.

from n8n.

shankarmn94 avatar shankarmn94 commented on June 21, 2024

root@cs-dev-5:~/.n8n# /usr/bin/n8n start
User settings loaded from: /root/.n8n/config
Initializing n8n process
n8n ready on 0.0.0.0, port 5678
Version: 1.27.3

Start Active Workflows:

  • "Azure AD" (ID: tkMWYzIlDPXaEMsf)
    => Started
  • "Notification" (ID: UM4I7ViMzs0len3Q)
    => Started
  • "Notification Schedule" (ID: UtMRYFmttChIW7aO)
    => Started
  • "Notification for ticket template" (ID: bjvdGelpVJjzfzGC)
    => Started
  • "Notification manual ticket current flow" (ID: tKjOmB4MKwypv6CO)
    => Started
  • "Notification test schedule" (ID: rZNzKxFYsAGgsf9d)
    => Started

Editor is now accessible via:
http://localhost:5678/

Press "o" to open in Browser.
ReplyError: ERR Error running script (call to 8f55ae4a3be429c6d38c5d5db3e80edf89197b64): @user_script:56: script tried accessing undeclared key
ERR Error running script (call to 8f55ae4a3be429c6d38c5d5db3e80edf89197b64): @user_script:56: script tried accessing undeclared key

ReplyError: ERR Error running script (call to 8f55ae4a3be429c6d38c5d5db3e80edf89197b64): @user_script:56: script tried accessing undeclared key
ERR Error running script (call to 8f55ae4a3be429c6d38c5d5db3e80edf89197b64): @user_script:56: script tried accessing undeclared key
ReplyError: ERR Error running script (call to 8f55ae4a3be429c6d38c5d5db3e80edf89197b64): @user_script:56: script tried accessing undeclared key
ERR Error running script (call to 8f55ae4a3be429c6d38c5d5db3e80edf89197b64): @user_script:56: script tried accessing undeclared key

/usr/bin/n8n worker
User settings loaded from: /root/.n8n/config

n8n worker is now ready

  • Version: 1.27.3
  • Concurrency: 10

from n8n.

Joffcom avatar Joffcom commented on June 21, 2024

Hey @shankarmn94,

I don't see any issue from the worker not connecting to the redis queue to pick up jobs, When you are testing to show it isn't working are you running the workflow on a schedule or using the test button in the n8n interface?

from n8n.

shankarmn94 avatar shankarmn94 commented on June 21, 2024

@Joffcom schedule / trigger

from n8n.

shankarmn94 avatar shankarmn94 commented on June 21, 2024

now i made some changes;

  1. "n8n:cache:variables"
  2. "bull:jobs:2"
  3. "bull:jobs:id"
  4. "bull:jobs:4"
  5. "n8n:cache:webhook:POST-2960855a-ff6d-48cb-b2d9-77faf5c78533"
  6. "workflows:jobs:stalled-check"
  7. "bull:jobs:priority"
  8. "bull:jobs:wait"
  9. "n8n:cache:webhook:POST-2960855a-ff6d-48cb-b2d9-77faf5c78526"
  10. "n8n:cache:webhook:POST-573da17f-bd25-4604-a542-1d1cc455b6a4"
  11. "bull:jobs:5"
  12. "n8n:cache:webhook:POST-2960855a-ff6d-48cb-b2d9-77faf5c78523"
  13. "bull:jobs:3"
  14. "bull:jobs:1"

its creating the keys in redis but the worker is not picking this nor main server not runing this

from n8n.

Joffcom avatar Joffcom commented on June 21, 2024

Hey @shankarmn94

I am not sure what those settings are that you have there but if they are in Redis I would recommend not playing with them.

Can you share the current configuration for your main instance and your worker as they currently are so I can check them again I suspect you still don't have it configured correctly.

from n8n.

shankarmn94 avatar shankarmn94 commented on June 21, 2024

as i mentioned earlier:

WEBHOOK_URL=http://10.51.112.8:5678/
N8N_BASIC_AUTH_USER=cloudquen8n
N8N_BASIC_AUTH_PASSWORD=n8ncloudque
DB_TYPE=postgresdb
DB_POSTGRESDB_DATABASE=workflow
DB_POSTGRESDB_HOST=10.51.112.8
DB_POSTGRESDB_PORT=5432
DB_POSTGRESDB_USER=workflow
DB_POSTGRESDB_PASSWORD=workflow
#N8N_PAYLOAD_SIZE_MAX=56MB
EXECUTIONS_DATA_PRUNE=true
EXECUTIONS_DATA_PRUNE_MAX_COUNT=5000000
EXECUTIONS_DATA_SAVE_ON_ERROR=all
EXECUTIONS_DATA_SAVE_ON_SUCCESS=all
NODE_OPTIONS="--max-old-space-size=16048 --require /root/.n8n/set-max-listeners.js"
EXECUTIONS_MODE=queue
N8N_ENCRYPTION_KEY=Zwyi2FIVHTJEYb5+KY74esTPlKn4Vjru
QUEUE_BULL_REDIS_HOST=10.51.112.9
QUEUE_BULL_PREFIX=workflows
QUEUE_BULL_REDIS_DB=0
QUEUE_BULL_REDIS_PORT=6379

from n8n.

Joffcom avatar Joffcom commented on June 21, 2024

Hey @shankarmn94,

I just wanted to check again as the first post you had queue mode disabled which would have been an issue.

So assuming you have those settings on workers and the main instance it will work although there are some tweaks you can make as 2 of those keys don't exist anymore so in theory the below would work.

WEBHOOK_URL=http://10.51.112.8:5678/
DB_TYPE=postgresdb
DB_POSTGRESDB_DATABASE=workflow
DB_POSTGRESDB_HOST=10.51.112.8
DB_POSTGRESDB_PORT=5432
DB_POSTGRESDB_USER=workflow
DB_POSTGRESDB_PASSWORD=workflow
EXECUTIONS_DATA_PRUNE=true
EXECUTIONS_DATA_PRUNE_MAX_COUNT=5000000
EXECUTIONS_DATA_SAVE_ON_ERROR=all
EXECUTIONS_DATA_SAVE_ON_SUCCESS=all
NODE_OPTIONS="--max-old-space-size=16048 --require /root/.n8n/set-max-listeners.js"
EXECUTIONS_MODE=queue
N8N_ENCRYPTION_KEY=Zwyi2FIVHTJEYb5+KY74esTPlKn4Vjru
QUEUE_BULL_REDIS_HOST=10.51.112.9
QUEUE_BULL_PREFIX=workflows

How are you actually setting the env options?

from n8n.

shankarmn94 avatar shankarmn94 commented on June 21, 2024

am able to figure out the issue i had:

We were using dragonflydb which is alternative of redis.. while workers fails to get keys from dragonflydb later on i checked with redis where all my workers started take the triggered workflows and finish those..

i donno is that issue with n8n worker or dragonflydb.

from n8n.

Joffcom avatar Joffcom commented on June 21, 2024

Hey @shankarmn94,

We only officially support Redis so I would recommend sticking with that and not something that is Redis compatible, For now I am going to mark this as closed as it doesn't look like we have an issue here.

Thanks for the update 👍🏻

from n8n.

shankarmn94 avatar shankarmn94 commented on June 21, 2024

But Dragonlfydb is very big platform i donno why you dont support that. Anyway thanks for response. Have a great day...

from n8n.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.