Running on PLESK using host mariadb, suddenly N8N won't start

Running a N8N inside docker.
It accesses the MariaDB database on host using the gateway 172.17.0.1.
Running it on a PLESK server.
Went down after flawlessly performing months with an error that ‘looks’ like maybe it restarted and doesn’t like one of the flows? Been working on this with my limited detective skills for 12 hours.

Describe the problem/error/question

Docker container won’t restart. Tried updating to the most recent 226 Debian version.
Deleted all the non-active workflows from the mariaDB

What is the error message (if any)?

Please share your workflow

Initializing n8n process
n8n ready on 0.0.0.0, port 5678
Version: 0.226.0
SyntaxError: Unexpected token i in JSON at position 3
    at JSON.parse (<anonymous>)
    at MysqlDriver.prepareHydratedValue (/usr/local/lib/node_modules/n8n/src/driver/mysql/MysqlDriver.ts:672:54)
    at /usr/local/lib/node_modules/n8n/src/query-builder/transformer/RawSqlResultsToEntityTransformer.ts:248:29
    at Array.forEach (<anonymous>)
    at RawSqlResultsToEntityTransformer.transformColumns (/usr/local/lib/node_modules/n8n/src/query-builder/transformer/RawSqlResultsToEntityTransformer.ts:213:26)
    at RawSqlResultsToEntityTransformer.transformRawResultsGroup (/usr/local/lib/node_modules/n8n/src/query-builder/transformer/RawSqlResultsToEntityTransformer.ts:161:33)
    at /usr/local/lib/node_modules/n8n/src/query-builder/transformer/RawSqlResultsToEntityTransformer.ts:50:33
    at Map.forEach (<anonymous>)
    at RawSqlResultsToEntityTransformer.transform (/usr/local/lib/node_modules/n8n/src/query-builder/transformer/RawSqlResultsToEntityTransformer.ts:49:15)
    at /usr/local/lib/node_modules/n8n/src/query-builder/transformer/RawSqlResultsToEntityTransformer.ts:304:36
    at Array.forEach (<anonymous>)
    at RawSqlResultsToEntityTransformer.transformJoins (/usr/local/lib/node_modules/n8n/src/query-builder/transformer/RawSqlResultsToEntityTransformer.ts:272:43)
    at RawSqlResultsToEntityTransformer.transformRawResultsGroup (/usr/local/lib/node_modules/n8n/src/query-builder/transformer/RawSqlResultsToEntityTransformer.ts:167:35)
    at /usr/local/lib/node_modules/n8n/src/query-builder/transformer/RawSqlResultsToEntityTransformer.ts:50:33
    at Map.forEach (<anonymous>)
    at RawSqlResultsToEntityTransformer.transform (/usr/local/lib/node_modules/n8n/src/query-builder/transformer/RawSqlResultsToEntityTransformer.ts:49:15)
    at /usr/local/lib/node_modules/n8n/src/query-builder/transformer/RawSqlResultsToEntityTransformer.ts:304:36
    at Array.forEach (<anonymous>)
    at RawSqlResultsToEntityTransformer.transformJoins (/usr/local/lib/node_modules/n8n/src/query-builder/transformer/RawSqlResultsToEntityTransformer.ts:272:43)
    at RawSqlResultsToEntityTransformer.transformRawResultsGroup (/usr/local/lib/node_modules/n8n/src/query-builder/transformer/RawSqlResultsToEntityTransformer.ts:167:35)
    at /usr/local/lib/node_modules/n8n/src/query-builder/transformer/RawSqlResultsToEntityTransformer.ts:50:33
    at Map.forEach (<anonymous>)
    at RawSqlResultsToEntityTransformer.transform (/usr/local/lib/node_modules/n8n/src/query-builder/transformer/RawSqlResultsToEntityTransformer.ts:49:15)
    at SelectQueryBuilder.executeEntitiesAndRawResults (/usr/local/lib/node_modules/n8n/src/query-builder/SelectQueryBuilder.ts:3558:36)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at SelectQueryBuilder.getRawAndEntities (/usr/local/lib/node_modules/n8n/src/query-builder/SelectQueryBuilder.ts:1669:29)
    at SelectQueryBuilder.getMany (/usr/local/lib/node_modules/n8n/src/query-builder/SelectQueryBuilder.ts:1759:25)
    at ActiveWorkflowRunner.init (/usr/local/lib/node_modules/n8n/src/ActiveWorkflowRunner.ts:98:41)
    at Start.run (/usr/local/lib/node_modules/n8n/src/commands/start.ts:357:3)
    at Start._run (/usr/local/lib/node_modules/n8n/node_modules/@oclif/command/lib/command.js:43:20)
    at Config.runCommand (/usr/local/lib/node_modules/n8n/node_modules/@oclif/config/lib/config.js:173:24)
    at Main.run (/usr/local/lib/node_modules/n8n/node_modules/@oclif/command/lib/main.js:28:9)
    at Main._run (/usr/local/lib/node_modules/n8n/node_modules/@oclif/command/lib/command.js:43:20)

Share the output returned by the last node

Information on your n8n setup

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

Hey @James_Randall,

Did you get it up and running in the end? It does look look like it is failing to load a workflow but I am not sure why.

Do you know what version of n8n you were previously on?

Not running. Version before 226 was 224? Only upgraded as a hopeful remediation? Crazy issue was I got an alert at 6pm that it crashed, when activity was supposed to be 0.

Committed the cardinal sin of trying for an excessive amount of time until thinking becomes impossible to fix it. So I took a nap and restarted with a docker-compose.yaml with a built in mySQL container.

Save a backup of those workflows folks! Some of those javascript codes were very difficult for a self taught guy like me to get through.

Anyone have a secret to exporting the workflow_entity to a json? Might save me most of my weekend redoing from scratch.

Meantime, I’ll delete one by one the workflows in sql and see if it restarts and report.

If you backup the dodgy database it will be a good start, you might be able to set them all to inactive them see if that starts it back up.

1 Like

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