There was an error shutting down n8n. Error: The "activeWorkflows" instance did not get initialized yet

Describe the issue/error/question

I just upgraded to the last version and the upgrade did not go as usual, since then I get these errors when N8N start, all my https://osintukraine.com project is stalled because everything depends on N8N.

What is the error message (if any)?

Jul 30 10:30:46 n8n ready on 0.0.0.0, port 5678

Jul 30 10:30:46 Version: 0.188.0

Jul 30 10:31:46 2022-07-30T08:31:46.011Z | debug | Wait tracker querying database for waiting executions "{ file: 'WaitTracker.js', function: 'getwaitingExecutions' }"

Jul 30 10:32:46 2022-07-30T08:32:46.014Z | debug | Wait tracker querying database for waiting executions "{ file: 'WaitTracker.js', function: 'getwaitingExecutions' }"

Jul 30 10:33:46 2022-07-30T08:33:46.017Z | debug | Wait tracker querying database for waiting executions "{ file: 'WaitTracker.js', function: 'getwaitingExecutions' }"

Jul 30 10:34:46 2022-07-30T08:34:46.022Z | debug | Wait tracker querying database for waiting executions "{ file: 'WaitTracker.js', function: 'getwaitingExecutions' }"

Jul 30 10:35:46 2022-07-30T08:35:46.026Z | debug | Wait tracker querying database for waiting executions "{ file: 'WaitTracker.js', function: 'getwaitingExecutions' }"

Jul 30 10:36:46 2022-07-30T08:36:46.030Z | debug | Wait tracker querying database for waiting executions "{ file: 'WaitTracker.js', function: 'getwaitingExecutions' }"

Jul 30 10:37:46 2022-07-30T08:37:46.034Z | debug | Wait tracker querying database for waiting executions "{ file: 'WaitTracker.js', function: 'getwaitingExecutions' }"

Jul 30 10:38:46 2022-07-30T08:38:46.046Z | debug | Wait tracker querying database for waiting executions "{ file: 'WaitTracker.js', function: 'getwaitingExecutions' }"

Jul 30 10:39:46 2022-07-30T08:39:46.051Z | debug | Wait tracker querying database for waiting executions "{ file: 'WaitTracker.js', function: 'getwaitingExecutions' }"

Jul 30 10:40:46 2022-07-30T08:40:46.055Z | debug | Wait tracker querying database for waiting executions "{ file: 'WaitTracker.js', function: 'getwaitingExecutions' }"

Jul 30 10:41:46 2022-07-30T08:41:46.058Z | debug | Wait tracker querying database for waiting executions "{ file: 'WaitTracker.js', function: 'getwaitingExecutions' }"

Jul 30 10:42:46 2022-07-30T08:42:46.063Z | debug | Wait tracker querying database for waiting executions "{ file: 'WaitTracker.js', function: 'getwaitingExecutions' }"

Jul 30 10:43:46 2022-07-30T08:43:46.066Z | debug | Wait tracker querying database for waiting executions "{ file: 'WaitTracker.js', function: 'getwaitingExecutions' }"

Jul 30 10:44:46 2022-07-30T08:44:46.075Z | debug | Wait tracker querying database for waiting executions "{ file: 'WaitTracker.js', function: 'getwaitingExecutions' }"

Jul 30 10:45:46 2022-07-30T08:45:46.075Z | debug | Wait tracker querying database for waiting executions "{ file: 'WaitTracker.js', function: 'getwaitingExecutions' }"

Jul 30 10:46:46 2022-07-30T08:46:46.085Z | debug | Wait tracker querying database for waiting executions "{ file: 'WaitTracker.js', function: 'getwaitingExecutions' }"

Jul 30 10:47:46 2022-07-30T08:47:46.091Z | debug | Wait tracker querying database for waiting executions "{ file: 'WaitTracker.js', function: 'getwaitingExecutions' }"

Jul 30 10:48:46 2022-07-30T08:48:46.091Z | debug | Wait tracker querying database for waiting executions "{ file: 'WaitTracker.js', function: 'getwaitingExecutions' }"

Jul 30 10:49:46 2022-07-30T08:49:46.091Z | debug | Wait tracker querying database for waiting executions "{ file: 'WaitTracker.js', function: 'getwaitingExecutions' }"

Jul 30 10:50:46 2022-07-30T08:50:46.094Z | debug | Wait tracker querying database for waiting executions "{ file: 'WaitTracker.js', function: 'getwaitingExecutions' }"

Jul 30 10:51:46 2022-07-30T08:51:46.097Z | debug | Wait tracker querying database for waiting executions "{ file: 'WaitTracker.js', function: 'getwaitingExecutions' }"

Jul 30 10:52:46 2022-07-30T08:52:46.102Z | debug | Wait tracker querying database for waiting executions "{ file: 'WaitTracker.js', function: 'getwaitingExecutions' }"

Jul 30 10:53:06 2022-07-30T08:53:06.427Z | debug | Add editor-UI session "{ sessionId: 'zz79yy8g5lj', file: 'Push.js', function: 'add' }"

Jul 30 10:53:46 2022-07-30T08:53:46.105Z | debug | Wait tracker querying database for waiting executions "{ file: 'WaitTracker.js', function: 'getwaitingExecutions' }"

Jul 30 10:54:31 ERROR RESPONSE

Jul 30 10:54:31 Error: The "activeWorkflows" instance did not get initialized yet.

Jul 30 10:54:31 at ActiveWorkflowRunner.remove (/app/code/node_modules/n8n/dist/src/ActiveWorkflowRunner.js:480:15)

Jul 30 10:54:31 at /app/code/node_modules/n8n/dist/src/Server.js:537:49

Jul 30 10:54:31 at processTicksAndRejections (node:internal/process/task_queues:96:5)

Jul 30 10:54:31 at async /app/code/node_modules/n8n/dist/src/ResponseHelper.js:90:26

Jul 30 10:54:35 ERROR RESPONSE

Jul 30 10:54:35 Error: The "activeWorkflows" instance did not get initialized yet.

Jul 30 10:54:35 at ActiveWorkflowRunner.remove (/app/code/node_modules/n8n/dist/src/ActiveWorkflowRunner.js:480:15)

Jul 30 10:54:35 at /app/code/node_modules/n8n/dist/src/Server.js:537:49

Jul 30 10:54:35 at processTicksAndRejections (node:internal/process/task_queues:96:5)

Jul 30 10:54:35 at async /app/code/node_modules/n8n/dist/src/ResponseHelper.js:90:26

Jul 30 10:54:46 2022-07-30T08:54:46.108Z | debug | Wait tracker querying database for waiting executions "{ file: 'WaitTracker.js', function: 'getwaitingExecutions' }"

Jul 30 10:55:46 2022-07-30T08:55:46.112Z | debug | Wait tracker querying database for waiting executions "{ file: 'WaitTracker.js', function: 'getwaitingExecutions' }"

Jul 30 10:56:46 2022-07-30T08:56:46.130Z | debug | Wait tracker querying database for waiting executions "{ file: 'WaitTracker.js', function: 'getwaitingExecutions' }"

Jul 30 10:57:19 2022-07-30T08:57:19.150Z | info |

Jul 30 10:57:19 Stopping n8n... "{ file: 'start.js', function: 'stopProcess' }"

Jul 30 10:57:19 2022-07-30T08:57:19.152Z | verbose | Call to remove all active workflows received (removeAll) "{ file: 'ActiveWorkflowRunner.js', function: 'removeAll' }"

Jul 30 10:57:19 There was an error shutting down n8n. Error: The "activeWorkflows" instance did not get initialized yet.

Jul 30 10:57:19 at ActiveWorkflowRunner.remove (/app/code/node_modules/n8n/dist/src/ActiveWorkflowRunner.js:480:15)

Jul 30 10:57:19 at ActiveWorkflowRunner.removeAll (/app/code/node_modules/n8n/dist/src/ActiveWorkflowRunner.js:102:38)

Jul 30 10:57:19 at processTicksAndRejections (node:internal/process/task_queues:96:5)

Jul 30 10:57:19 at async Promise.all (index 0)

Jul 30 10:57:19 at async process.stopProcess (/app/code/node_modules/n8n/dist/commands/start.js:44:13)

Please share the workflow

I can’t, I can’t even open them, when I try to activate or deactivate, all I get is

Jul 30 11:20:22 Error: The "activeWorkflows" instance did not get initialized yet.
Jul 30 11:20:22 at ActiveWorkflowRunner.remove (/app/code/node_modules/n8n/dist/src/ActiveWorkflowRunner.js:480:15)
Jul 30 11:20:22 at /app/code/node_modules/n8n/dist/src/Server.js:537:49
Jul 30 11:20:22 at processTicksAndRejections (node:internal/process/task_queues:96:5)
Jul 30 11:20:22 at async /app/code/node_modules/n8n/dist/src/ResponseHelper.js:90:26
Jul 30 11:20:37 2022-07-30T09:20:37.872Z | debug | Wait tracker querying database for waiting executions "{ file: 'WaitTracker.js', function: 'getwaitingExecutions' }"
Jul 30 11:21:28 ERROR RESPONSE
Jul 30 11:21:28 Error: The "activeWorkflows" instance did not get initialized yet.
Jul 30 11:21:28 at ActiveWorkflowRunner.remove (/app/code/node_modules/n8n/dist/src/ActiveWorkflowRunner.js:480:15)
Jul 30 11:21:28 at /app/code/node_modules/n8n/dist/src/Server.js:537:49
Jul 30 11:21:28 at processTicksAndRejections (node:internal/process/task_queues:96:5)
Jul 30 11:21:28 at async /app/code/node_modules/n8n/dist/src/ResponseHelper.js:90:26
Jul 30 11:21:29 ERROR RESPONSE
Jul 30 11:21:29 Error: The "activeWorkflows" instance did not get initialized yet.
Jul 30 11:21:29 at ActiveWorkflowRunner.remove (/app/code/node_modules/n8n/dist/src/ActiveWorkflowRunner.js:480:15)
Jul 30 11:21:29 at /app/code/node_modules/n8n/dist/src/Server.js:537:49
Jul 30 11:21:29 at processTicksAndRejections (node:internal/process/task_queues:96:5)
Jul 30 11:21:29 at async /app/code/node_modules/n8n/dist/src/ResponseHelper.js:90:26
Jul 30 11:21:30 ERROR RESPONSE
Jul 30 11:21:30 Error: The "activeWorkflows" instance did not get initialized yet.
Jul 30 11:21:30 at ActiveWorkflowRunner.remove (/app/code/node_modules/n8n/dist/src/ActiveWorkflowRunner.js:480:15)
Jul 30 11:21:30 at /app/code/node_modules/n8n/dist/src/Server.js:537:49
Jul 30 11:21:30 at processTicksAndRejections (node:internal/process/task_queues:96:5)
Jul 30 11:21:30 at async /app/code/node_modules/n8n/dist/src/ResponseHelper.js:90:26
Jul 30 11:21:30 ERROR RESPONSE
Jul 30 11:21:30 Error: The "activeWorkflows" instance did not get initialized yet.
Jul 30 11:21:30 at ActiveWorkflowRunner.remove (/app/code/node_modules/n8n/dist/src/ActiveWorkflowRunner.js:480:15)
Jul 30 11:21:30 at /app/code/node_modules/n8n/dist/src/Server.js:537:49
Jul 30 11:21:30 at processTicksAndRejections (node:internal/process/task_queues:96:5)

Share the output returned by the last node

Information on your n8n setup

  • n8n version: n8n 0.188.0
  • Database you’re using (default: SQLite): postgresql
  • Running n8n with the execution process [own(default), main]: own
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]: Docker

Cant activate/deactivate workflows, can’t save them, can’t run them.

N8N is just stuck in a state that is impossible to debug.

but all workflows can be opened, that’s all I can do.

Hey @benb,

Are you using queue mode as well? It looks like it might just all need a restart for some reason.

Hmm I don’t think I’m using that, in the end I had to manually save my workflows, download them to save them, and restore a backup from 6 days ago, no matter what I would try, including restart of the container, N8N would appear to be up and running, workflows activated or at least green, but everything stalled, impossible to disable or enable workflows, save them, run them manually.

That is really odd, I wonder what was going on. Next time you do an upgrade can you drop me a DM to let me know when you are going to do it that way I can try and be around just incase it happens again.

1 Like

Thanks, I will!