-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Rabbit MQ triggers do not work in test mode #8871
Comments
Hey @DRIMOL, Thanks for reporting this, I have created If you want us to add this I would recommend creating a feature request on the community support forum and we can track the popularity of this and look at adding it in the future. |
I thought it was a BUG, because in version 1.24.1 it creates the queue if it doesn't exist. Thanks |
Where can I track the progress? |
Hey @DRIMOL, This is the best place to check, Once fixed we will put a note on here to let you know. You can also keep an eye on the PR list to see if any of them contain Right now this is sat with a high priority and is waiting to be picked up. |
Actually, better to have an option like "Create if no queue" to avoid misconfigurations. But I can imagine only one scenario when it might be needed - If someone by mistake has deleted a queue |
Hey @Joffcom , bug with the 404 instead of creating a queue is still there... |
Thanks to a quick review from @netroy it looks like the option to make the queue is there already under Add Option > Assert Queue. This should resolve the issue of the queue not being created automatically. |
Well, I can't check it right now as the latest docker version is 1.39.1 :) |
@barn4k latest should be 1.41.0 now 😄 |
@Joffcom And I see that the node tried to consume the message but it stucked there (Unacked state) Even after I have stopped the execution, it still holds the message I've tried both: using the current RabbitMQ node and creating a totally new one |
|
yes, it already exists in the trigger, but the interesting thing would be if it was in the "Send a Message to RabbitMQ", because then we would be able to create queues dynamically. |
Será que ainda vão resolver ? 😞 |
@Joffcom Setting Up
|
This will be fixed very soon. |
I would like to add a bug that I noticed these days also about the rabbit If I inactivate or delete an n8n flow where there is a rabbit trigger, the consumer is not automatically deleted from the rabbit, and continues to be sent to a ghost consumer, even though it has been deleted, the problem is only solved by updating n8n with prune , by doing this he excludes ghost consumers. |
When you deactivate the workflow, do you see any error in the container logs saying something like |
I will try to check if I should look at this log in the n8n workers or in the RabbitMQ container? |
Please check in the n8n worker logs. |
I tried to catch the bug here, but it excluded the consumer, it could have happened because the queue had a stuck message, for example when "parse json" is marked and the message arrives outside of the json format, in this case or something similar does not exclude, but by deleting a trigger that is "healthy" here the consumers were excluded from the rabbit |
Same error as mine |
This error makes me wonder if the @ianpogi5 Are you running n8n on docker? and do you have any custom or community nodes installed? |
We are using docker version. |
and do you have any custom or community nodes installed? |
I need a way to reproduce this, to be able to fix this. Are you able to reproduce this on a new n8n instance, with a minimal workflow? |
Here's my workflow: {
"name": "RabbitMQ test",
"nodes": [
{
"parameters": {},
"id": "f8f644e7-754e-44e1-a013-01dc0b309d8e",
"name": "When clicking ‘Test workflow’",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
440,
500
]
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "4c738ba4-d63b-4196-9297-e71e1f45ebca",
"name": "name",
"value": "Hello world!",
"type": "string"
}
]
},
"options": {}
},
"id": "d8530558-9790-4966-b529-0ae36ed22966",
"name": "Edit Fields",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
680,
500
]
},
{
"parameters": {
"queue": "n8n-test",
"options": {}
},
"id": "cce5f6c4-bb8a-4307-86a5-9c454a7b1349",
"name": "RabbitMQ",
"type": "n8n-nodes-base.rabbitmq",
"typeVersion": 1.1,
"position": [
940,
500
],
"credentials": {
"rabbitmq": {
"id": "poc4UQ08c1GLjORk",
"name": "RabbitMQ account"
}
}
},
{
"parameters": {
"queue": "n8n-test",
"options": {}
},
"id": "09021137-6b9f-48d7-b500-8989f2247359",
"name": "RabbitMQ Trigger",
"type": "n8n-nodes-base.rabbitmqTrigger",
"typeVersion": 1,
"position": [
600,
820
],
"credentials": {
"rabbitmq": {
"id": "poc4UQ08c1GLjORk",
"name": "RabbitMQ account"
}
}
},
{
"parameters": {
"operation": "deleteMessage"
},
"id": "09bf2dc7-8c18-4eae-941e-c7c6ed60c94a",
"name": "RabbitMQ1",
"type": "n8n-nodes-base.rabbitmq",
"typeVersion": 1.1,
"position": [
820,
820
],
"credentials": {
"rabbitmq": {
"id": "poc4UQ08c1GLjORk",
"name": "RabbitMQ account"
}
}
}
],
"pinData": {},
"connections": {
"When clicking ‘Test workflow’": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields": {
"main": [
[
{
"node": "RabbitMQ",
"type": "main",
"index": 0
}
]
]
},
"RabbitMQ Trigger": {
"main": [
[
{
"node": "RabbitMQ1",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "09d1bd6f-6980-482e-80a7-76d1fbf65830",
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "1b06549ea40930d40bbf0844d3f62a7083d8cbe5e465acde61c9b6fda9870a55"
},
"id": "sSFuUAFfIUkqbU7l",
"tags": []
} |
This was fixed 2 weeks ago . Are you on an older version? |
I just upgraded from 1.47.3 from 1.47.2 just now and still got the same error and broken rabbitmq trigger icon(points to png which should be svg just like the action). Disabled browser cache with same error. |
Hey @ianpogi5 The icon issue has been fixed can you try 1.48.0? |
I have upgraded to 1.48.3. I confirm the icon issue now fixed. But the rabbitmq trigger in test mode is still not working. Btw after upgrade, I tested the trigger. When I clicked "Test step" button, I see that it creates a consumer connection on rabbitmq. When I click "Stop Listening" in the trigger, the consumer connection doesn't go away. If I do it again, it will again create a new consumer. I think this may point us to where the issue is. |
I think the issue might be that when we start manually testing a trigger node, and stop it before the node is actually triggered, we were not calling the cleanup function on that node. I've tried to address this in #9980, and created a custom docker image |
I confirm that the open connections is now gone after I click the stop listening. Thank you very much! But testing mode still does not work. When clicking test step button, I immediately see in the logs "Overwrite NodeExecuteFunctions.getExecuteTriggerFunctions.emit function". Then I would see in RabbitMQ that it did got a message: The Unackowledge becomes 1 but the trigger is still listening. I expect it would stop listening and show the data in output section just like other types of nodes. Let me know if this is correct expectation. When I stop listening, Unack becomes 0 and Ready goes back to 3. |
@netroy thank you for all your help but it would also be great if you can do a PR on 'n8n-nodes-netsuite'. |
|
@netroy In version 1.52 the Rabbit Trigger node still does not work. The connection is opened, the queue item is set to unaked but is not displayed in the N8N interface. All tests give the same log:
|
Hey @luizeof, I have just given this a test and I can confirm it is working in 1.52 Are you able to share your full workflow and how you have n8n configured as it may be something else, In your log snippet which like is for the RabbitMQ test are you also testing this with a wait? |
Simple Workflow The Workflow only has the Rabbit node to isolate the test The connection is made in rabbit and the item is fetched But it is not displayed on the interface. Using the n8n next docker image, without custom nodes. This message is displayed in the editor container, no error message appears in the worker:
|
@luizeof Can you reproduce this error right after restarting the instance? |
This was the exact same thing we fixed in #9980 . So, it's a little perplexing that you are still seeing this 😕 |
I updated to 1.52.0 and got all the same results as @luizeof |
Hi @Joffcom and @ianpogi5 , I did a new installation from scratch with the Same error, but @Joffcom, in the interface I get a message in the console that could be the problem: This installation has 1 workflow that has 1 Rabbit Trigger, this message appears as soon as the message is obtained by Rabbit. The message is obtained in the rabbit, so that it remains as Unaked. It is just not displayed in the interface itself. |
Same issue as @luizeof . My WF setup: n8n Log:
RabbitMQ log when n8n had an issue
compose file: version: '3'
services:
rabbitmq:
image: rabbitmq:management
container_name: rabbitmq
environment:
- RABBITMQ_DEFAULT_USER=user1
- RABBITMQ_DEFAULT_PASS=password1
ports:
- "5672:5672"
- "15672:15672"
n8n:
image: n8nio/n8n:next
container_name: n8n_next
environment:
- N8N_LOG_LEVEL=debug
- N8N_LOG_OUTPUT=console,file
- N8N_SECURE_COOKIE=false
ports:
- "5678:5678"
links:
- rabbitmq
volumes:
- n8n_data:/home/node/.n8n
volumes:
n8n_data:
networks:
default:
driver: bridge Trigger WF
Sample WF
Restarted the n8n and the situation is the same:
|
I'm finally able to reproduce this.
This fails because we are starting the rabbitmq consumer before |
hello, any time line to fix the bug in this node? Edit ago, 22th: in portainer logs I have the following errors in loop. version 1.52.2 running on docker swarm 27.1.2 in test mode: There was a problem with the RabbitMQ Trigger node "RabbitMQ Trigger1" in workflow "PXV8z92cNFHdjSAm": "Overwrite NodeExecuteFunctions.getExecuteTriggerFunctions.emit function" running live, it consumes the queue correctly, but not working in test mode makes it hard to debug and build new flows. |
Any update on this please? It's a pain to design workflows without test mode. |
This will be fixed in #10663 |
Fix got released with |
Thank you! |
Bug Description
A - Does not pull the item from the queue in test mode
B - If you write a message to a queue that does not exist, it returns an error.
ERROR: Operation failed: QueueDeclare; 404 (NOT-FOUND) with message "NOT_FOUND - no queue 'test_queue' in vhost 'default'
To Reproduce
A1 - adicione uma nova mensagem no rabbit mq
A2 - coloque o triggers em modo de escuta
A PS: No painel do rabbit MQ a messagem entra em Unacked, mas, no workflow do n8n nada acontece
B1 - try to write a message to a queue that doesn't exist
Expected behavior
A - Test message reception by rabbit MQ
B - Create new queues through the RabbitMQ node
Operating System
UbuntoLinux 20
n8n Version
1.31.2
Node.js Version
v18.19.1
Database
PostgreSQL
Execution mode
queue
The text was updated successfully, but these errors were encountered: