WebSocket connection failed

Describe the problem/error/question

I have installed n8n community edition on DO droplet using docker/compose/withPosgres/docker-compose.yml configuration.

What is the error message (if any)?

Almost everything works just fine but on Edit Workflow, for webhook, when start “Listen for test event”, it didn’t stop listening, when the request is received. Even when I click on “Stop Listening”, it didn’t stop.
This is the error, I can see in console

Also in log files, I can see The session "kk6qmtql1z" is not registered.

Please share your workflow

  1. Add workflow
  2. Add webhook
  3. Click “Listen for test event”
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 1.31.2
  • Database (default: SQLite): Postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Ubuntu 22.04.3 LTS

Are you running n8n behind a reverse-proxy? like nginx, traefik, or caddy?

Yes, I do. We have nginx.

what version of nginx are you running? it sounds like you might need to either update the config tp handle websockets better, or might need to upgrade nginx.

Here is the nginx version nginx/1.18.0 (Ubuntu)
One more specifics - I installed n8n on subdomain e.g. workflow.example.com if that would make any difference.
Could you please elaborate what should be nginx config adjustments I need to make for the subdomain to make it work?

Sorry, but we can not provide support with any kind of server setup. That would simply eat up a lot of support time. For that reason, do we have multiple ones documented in our docs. Here is for example one for Digital Ocean:

Please follow it, and you should end up with a perfectly running n8n instance. If you run into problems with it, we are happy to help you debugging that one. Thanks!

Thanks guys! In fact this solution here - WebSockets in 1.0 fixed it.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.