Worker doesn't respect port setting

Describe the problem/error/question

Launching a worker on the same machine as the main in queue mode, worker does not respect env variable for a different port.

What is the error message (if any)?

Please share your workflow

n/a

Share the output returned by the last node

n/a

Information on your n8n setup

  • **n8n version: 1.76.2
  • **Database (default: SQLite): postgres
  • **n8n EXECUTIONS_PROCESS setting (default: own, main): queue
  • **Running n8n via (Docker, npm, n8n cloud, desktop app): npm
  • **Operating system: ubuntu

The worker doesnt need a port. As you will never need to access it like that.

And yet, it checks a port, because as the screenshot shows it will not start unless it can get the default one.

I fixed this just a minute ago by changing the main process to port 5679, the worker process appears to be getting that default 5678 from somewhere and it will not start if another process is using that port.

1 Like

Weird, using docker I simply don’t expose the ports on workers and it never is an issue. No idea why NPM install would work like this.
Also I do recommend using Docker over NPM. :slight_smile:

Not using docker, I just installed the package globally from NPM, seemed simple enough to just have two users (one user for the main process, other users for workers) each with their own systemd user-level init.

That works fine, but for the worker getting a hard-coded port from somewhere.

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