We run n8n on pm2 now on u16 running MySQL and our custom ecosystem file. I’m trying to install on a new server using pm2 and MariaDB. I can get n8n to run after installed however when I restart using the same exact ecosystem file from our other server I get:
0|n8n | Editor is now accessible via:
0|n8n | http://localhost:5678/
0|n8n | User survey updated successfully
0|n8n |
0|n8n | Stopping n8n…
0|n8n | Initializing n8n process
0|n8n | Initializing n8n process
0|n8n | Last session crashed
PM2 | App [n8n:0] exited with code [1] via signal [SIGINT]
PM2 | App [n8n:0] starting in -fork mode-
PM2 | App [n8n:0] online
0|n8n | Initializing n8n process
0|n8n | Last session crashed
The only difference is this server is u20, also tried u22 with the same errors. MySQL seems to be fine as i can access it with the credentials in the config file. I tried to mirror it as much as I could from the old server. Node version is 16 same as old server. We are using the latest release of n8n.
module.exports = {
apps : [{
name : “n8n”,
env: {
N8N_HOST:“n8n.domain.com”,
N8N_BASIC_AUTH_ACTIVE:false,
N8N_BASIC_AUTH_USER:“user account”,
N8N_BASIC_AUTH_PASSWORD:“not used”,
DB_TYPE:“mariadb”,
DB_MYSQLDB_DATABASE:“n8n”,
DB_MYSQLDB_HOST:“localhost”,
DB_MYSQLDB_PORT:“3306”,
DB_MYSQLDB_USER:“root”,
DB_MYSQLDB_PASSWORD:“Supersecret”,
N8N_PROTOCOL:“https”,
NODE_ENV:“production”,
WEBHOOK_TUNNEL_URL:“https://n8n.domain.com/”,
EXECUTIONS_DATA_PRUNE:“true”,
EXECUTIONS_DATA_MAX_AGE:“700”,
GENERIC_TIMEZONE:“America/Chicago”,
WORKFLOWS_DEFAULT_NAME:“New Project”,
NODE_FUNCTION_ALLOW_EXTERNAL:“uuid,moment,lodash”,
N8N_EMAIL_MODE:“smtp”,
N8N_SMTP_HOST:“smtp.postmarkapp.com”,
N8N_SMTP_PORT:587,
N8N_SMTP_USER:“username”,
N8N_SMTP_PASS:“super secret”,
N8N_SMTP_SENDER:"[email protected]",
N8N_SMTP_SSL:“false”,
}
}]
}