Issue with n8n not working after server restart and failed upgrade

Hello everyone,

I am facing an issue with my n8n setup after a server restart. I have been using n8n with Docker and MySQL, and recently I had to restart my server. After the restart, n8n is no longer functioning properly.

I attempted to upgrade to the latest version of n8n, but it didn’t resolve the issue. I’m still unable to get n8n to work. In an effort to troubleshoot, I exported the tables from MySQL to CSV and imported them into SQLite. Then I tried running n8n, but I encountered a JSON error.

Here is the error message I receive when running n8n with MySQL:


2023-06-24T01:31:43.961Z | error    | Error: There was an error initializing DB "{ file: 'ErrorReporterProxy.js', function: 'report' }"


2023-06-24T01:31:43.962Z | error    | Error: connect ETIMEDOUT "{ file: 'ErrorReporterProxy.js', function: 'report' }"


2023-06-24T01:31:48.698Z | warn     | License manager not initialized "{ file: 'License.js', function: 'isFeatureEnabled' }"


2023-06-24T01:31:48.702Z | error    | Last session crashed "{ file: 'CrashJournal.js', function: 'init' }"


2023-06-24T01:31:58.839Z | debug    | Lazy Loading credentials and nodes from n8n-nodes-base "{\n  credentials: 316,\n  nodes: 418,\n  file: 'DirectoryLoader.js',\n  function: 'loadAll'\n}"

I would appreciate any guidance or assistance in resolving this issue. Is there a way to restore n8n to its previous working state? Alternatively, is there a method to export the workflows so that I can import them into a fresh n8n installation?

Thank you in advance for your help!

Hi @macosupdate, I am very sorry to hear you are having trouble.

Unfortunately it’s not clear to me what exactly isn’t working for you. Can you confirm from which version to which version you have upgraded?

As for first steps to rectify this, are you possibly able to roll back to a previous version (when using docker you can simply specify an older version as your tag, for example docker run -it --rm --name n8n -v ~/.n8n:/home/node/.n8n -p 5678:5678 n8nio/n8n:0.228.1?

Can you access your workflows through the CLI?

I have managed to resolve the issue caused by iptables blocking the connection to MySQL. However, it seems that there might be a bug in n8n.

When I use the CLI to export all workflows and credentials from MySQL and import them into a new n8n instance using SQLite, the console displays successful import messages. However, I cannot see any workflows or credentials appearing, even after multiple attempts.

Interestingly, if I directly import the exported file from the admin page, it displays normally.

Has anyone else encountered a similar problem or can provide any insights into this issue? I would greatly appreciate any assistance or suggestions.

Thank you in advance for your help.