Error: EACCES: permission denied, open '/home/node/.n8n/crash.journal'

Describe the problem/error/question

Im running n8n in kubernetes and the pod keeps crashing. I have the following volume mount config

      - name: n8n-storage
        mountPath: /home/node/.n8n
      runAsUser: 1000
      runAsGroup: 1000
  - name: n8n-storage
      claimName: n8n-pvc

What is the error message (if any)?

Error: EACCES: permission denied, open '/home/node/.n8n/crash.journal'
2023-05-14T01:39:57.306Z | error    | Error: Exiting due to an error. "{ file: 'ErrorReporterProxy.js', function: 'report' }"
2023-05-14T01:39:57.308Z | error    | Error: EACCES: permission denied, open '/home/node/.n8n/crash.journal' "{ file: 'ErrorReporterProxy.js', function: 'report' }"

Information on your n8n setup

  • n8n version: 1.0.0-rc
  • Database (default: SQLite): MySql
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Kubernetes
  • Operating system: Ubuntu

Hey @Dreamystify,

Welcome to the community :tada:

Using v1 at the moment is very brave and we expect there to be some issues, MySQL / MariaDB is also not supported in v1.0 so it would be worth using Postgres which is supported.

The error itself is a permission issue and could be related to the securityContext, can you try removing those and see if that helps?

Quick list of things…

  1. Don’t use 1.0 outside of testing at the moment
  2. Change from MySQL
  3. Remove the securityContext

I originally was using 0.226.2 and got the same results. I can’t use postgres as I’m trying to use it with vitess mysql. I removed and added the security context and doesn’t seem to change anything.

With the 0.226.2 version and no security context and using the mysql env, it still crashes but I get the following

2023-05-14T10:47:03.830Z | error    | Last session crashed "{ file: 'CrashJournal.js', function: 'init' }"
2023-05-14T10:47:14.009Z | debug    | Lazy Loading credentials and nodes from n8n-nodes-base "{\n  credentials: 312,\n  nodes: 405,\n  file: 'DirectoryLoader.js',\n  function: 'loadAll'\n}"

Hey @Dreamystify,

So the good news there is the error is different, Can you remove all of the MySQL options and see if using SQLite works that will then show if the error is related to the database connection or not.

Yeah using SQLite works normally. I can connect to mysql from a container with the client and the same credentials. I also printed the environment vars from n8n in the short window before it crashed and it had the same details.

Perfect so I suspect the host, username or password is wrong. I am not sure why we don’t log the error anymore as it was very helpful when it said what the issue actually was. It could also be that it can’t connect to the database or the user doesn’t have the correct permissions.

Now you have n8n running with sqlite it might be worth trying the MySQL node with the same database credentials to see if that can connect. It may all be for nothing now though as we will be dropping mysql so you would need to migrate to postgres. You could also just keep using sqlite depending on what you are planning to use n8n for.

Oh ok, why the decision to drop mysql?

It is mostly down to time and resources when comparing it to the amount of users actually running n8n with it. By removing support for it we can then spend that time working on new features, improving testing and stability and maybe look at utilising features Postgres offers more closely without having to think of workarounds for other database platforms.

Make sense, thanks for your time Jon.

1 Like

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