Windows Environment - error when starting NR in second application

I am running FlowForge in a Windows environment. My first project & NR environment are working properly, however when I try to spin up a second project / environment it won’t start… I looked at the out.log file and the error indicates that the port is already in use:

Error: listen EADDRINUSE: address already in use :::13080
at Server.setupListenHandle [as _listen2] (node:net:1817:16)
at listenInCluster (node:net:1865:12)
at Server.listen (node:net:1953:7)
at AdminInterface.start (C:\flowforge\app\node_modules@flowforge\nr-launcher\lib\admin.js:87:21)
at main (C:\flowforge\app\node_modules@flowforge\nr-launcher\index.js:101:20)
at Object. (C:\flowforge\app\node_modules@flowforge\nr-launcher\index.js:148:1)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions…js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
Emitted ‘error’ event on Server instance at:
at emitErrorNT (node:net:1844:8)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -4091,
syscall: ‘listen’,
address: ‘::’,
port: 13080

Most likely you have an orphaned instance running.

If you shutdown the forge app it doesn’t kill running instances (because you may be doing an update). So if you have running instances and then stop and wipe out the database and start again it will try and re-use the ports the existing instances are running on.

The system should not re-use port numbers for any instances it knows about.

2 choices

  1. reboot the box, this will clear out all orphaned instances still running. FF should restart any missing instances when started.
  2. use the task manager to kill any nodejs processes (node-red and nr-launcher processes)

The only other possibility is that you have some other process using that port number. I don’t know how to check on Windows.

If that’s the case you can change the start port number in the flowforge.yml file by adding a start_port value under driver section:

  type: localfs
    start_port: 12080

The default is 12080 (but each project uses 2 ports first starting at that number and the second is +1000, hence the error about 13080)

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