Comments (18)
@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.
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.
from n8n.
sometimes we are getting context deadline exceeded.
from n8n.
@shankarmn94 Can you share the full output from the worker nodes when you have queue mode configured as documented?
from n8n.
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.
what is wrong with this.
from n8n.
Hey @shankarmn94,
Can you share the full output from the worker node when it is starting.
from n8n.
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.
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.
@Joffcom schedule / trigger
from n8n.
now i made some changes;
- "n8n:cache:variables"
- "bull:jobs:2"
- "bull:jobs:id"
- "bull:jobs:4"
- "n8n:cache:webhook:POST-2960855a-ff6d-48cb-b2d9-77faf5c78533"
- "workflows:jobs:stalled-check"
- "bull:jobs:priority"
- "bull:jobs:wait"
- "n8n:cache:webhook:POST-2960855a-ff6d-48cb-b2d9-77faf5c78526"
- "n8n:cache:webhook:POST-573da17f-bd25-4604-a542-1d1cc455b6a4"
- "bull:jobs:5"
- "n8n:cache:webhook:POST-2960855a-ff6d-48cb-b2d9-77faf5c78523"
- "bull:jobs:3"
- "bull:jobs:1"
its creating the keys in redis but the worker is not picking this nor main server not runing this
from n8n.
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.
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.
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.
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.
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.
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)
- OpenAI Assistant & gpt4-o HOT 9
- OpenAI Assistant creating new thread everytime HOT 8
- Accessing Ticket Object ID in Hubspot Trigger Node HOT 3
- 1.41.0 - Bug: Number of Executions Shown in Side Panel is Limited to 10 at a Time HOT 6
- ERROR: The DNS server returned an error, perhaps the server is offline HOT 2
- OpenAI Assistant - The requested model ‘gpt-4o’ cannot be used with the Assistants API in v1 HOT 1
- HTTP Request / OpenSSL Error HOT 3
- "Convert to HTML Table" Does Not Add the "Row Attributes" Option HOT 2
- workflows.map is not a function HOT 2
- Renaming the node by leaving the name field empty causes unexpected behavior HOT 5
- Can you add options for multi-branch parallel execution and for nodes to continue the workflow execution even if an error occurs? HOT 1
- Error: HTTP status 403 HOT 7
- Node Max Tries / Wait Values Limits Too Low HOT 7
- Ask AI is not present in the Code node on self-hosted Docker ver 1.41.1 HOT 3
- Pagination Does Not Reset When Re-Testing Node HOT 1
- NPM - Esm modules are not supported, dynamic (async) import fails HOT 6
- http node executes "successfully" but error is returned HOT 3
- Webhook only work in test mode... HOT 3
- IF issue. Wrong type ' NNN' is a string but was expecting a number HOT 1
- RabbitMQ Workflow had to be deactivated HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from n8n.