I installed n8n on my VPS using Docker Manager in Cyberpanel.
n8n is installed and I can access n8n without any problem.
But when I add “webhook” node, it has weird behavior, I try to test the webhook by clicking “Listen for test event”, I use Postman to send the event, it has no problem for the first time, but subsequently all failed.
On n8n editor, I try to click on “Stop listening”, it just not responding, the UI is stuck there.
I think there’s something to do with the virtual host configuration. Can someone assist? Since my server is using CyperPanel, hence it’s powered by OpenLiteSpeed. The OS is Ubuntu 22.04, hosted on Google Cloud Platform.
Hi @KC_Shoo, thanks for reaching out! What does your payload to the webhook endpoint look like? Can you listen for the test event and run the following command from your command line?
When I curl the second time, I got the following response, but again on n8n editor nothing has changed:
{"code":404,"message":"The requested webhook \"31c75305-1aa7-4238-af96-b42b2b6a07f4\" is not registered.","hint":"Click the 'Test workflow' button on the canvas, then try again. (In test mode, the webhook only works for one call after you click this button)"}
The webhook is reacheable from the outside of the network, it seems when the webhook is being triggered, the “backend” is the one that does not receive anything.
Just to give you some context about how I configure the OpenLiteSpeed virtual host, below is the screenshots for your reference:
This sounds like an issue with the Websocket connection going over the reverse-proxy.
Can you please try changing the Web Socket Proxy config (the last screenshot) to use /rest/push for the URI fields (instead of /) ?
Thanks for your reply. I have tried changing the URI for websocket, restart litespeed and try it out. Unfortunately, the problem still persist.
Clearly there’s something wrong with the reverse proxy, but I have no clue where exactly the problem is.
My current situation is, there’s no problem for outside world to communicate with my server, outside the network can receive the response from my webhook…
e.g.
{
"message": "Workflow was started"
}
But internally, there’s no output, so I suspect there’s some problem with the setting of listening port.
Can you please try executing a workflow, while looking at the Websocket connection (url is /rest/push) in your browser devtools?
When everything is setup correctly, this is what it looks like
Yeah. That sounds like your reverse-proxy is not proxying websocket messages, and instead regularly closing the connection instead, making n8n retry opening the connection, leading to so many requests.
Would it be possible for you to use something else like nginx or traefik, something that is more widely supported?