Unitech / pm2

Node.js Production Process Manager with a built-in Load Balancer.
https://pm2.keymetrics.io/docs/usage/quick-start/
Other
41.59k stars 2.62k forks source link

Deploy not executing any process #5215

Open Tobjoern opened 3 years ago

Tobjoern commented 3 years ago

What's going wrong?

I'm trying to deploy a sample application, using the guide at https://pm2.keymetrics.io/docs/usage/deployment/, I have followed the steps, and my app was deployed successfully, however the app isn't starting.

How could we reproduce this issue?

git clone git@github.com:Tobjoern/pm2-deploy-example.git

Adjust ecosystem.config.js with a custom VM (I used digital ocean, Ubuntu 20.04 (LTS) x64) The VM setup looks like this:

sudo apt install -y git
curl -sL https://deb.nodesource.com/setup_14.x -o nodesource_setup.sh
sudo bash nodesource_setup.sh
sudo apt install nodejs
npm i pm2 -g

Now on the local machine again:

pm2 deploy production setup
pm2 deploy production update

I get the output:

audited 60 packages in 0.789s
found 0 vulnerabilities
  ○ successfully deployed origin/main
--> Success

But when I type 'pm2 monit' no process is shown. I probably missed some command, so your help is appreciated!

Supporting information

$ pm2 report
--- PM2 report ----------------------------------------------------------------
Date                 : Sun Oct 31 2021 08:22:21 GMT+0000 (Coordinated Universal Time)
===============================================================================
--- Daemon -------------------------------------------------
pm2d version         : 5.1.2
node version         : 14.18.1
node path            : /usr/bin/pm2
argv                 : /usr/bin/node,/usr/lib/node_modules/pm2/lib/Daemon.js
argv0                : node
user                 : root
uid                  : 0
gid                  : 0
uptime               : 2min
===============================================================================
--- CLI ----------------------------------------------------
local pm2            : 5.1.2
node version         : 14.18.1
node path            : /usr/bin/pm2
argv                 : /usr/bin/node,/usr/bin/pm2,report
argv0                : node
user                 : root
uid                  : 0
gid                  : 0
===============================================================================
--- System info --------------------------------------------
arch                 : x64
platform             : linux
type                 : Linux
cpus                 : DO-Regular
cpus nb              : 1
freemem              : 108249088
totalmem             : 1028956160
home                 : /root
===============================================================================
--- PM2 list -----------------------------------------------
┌────┬────────────────────┬──────────┬──────┬───────────┬──────────┬──────────┐
│ id │ name               │ mode     │ ↺    │ status    │ cpu      │ memory   │
└────┴────────────────────┴──────────┴──────┴───────────┴──────────┴──────────┘
===============================================================================
--- Daemon logs --------------------------------------------
/root/.pm2/pm2.log last 20 lines:
PM2        | 2021-10-31T08:19:59: PM2 log: ===============================================================================
PM2        | 2021-10-31T08:19:59: PM2 log: --- New PM2 Daemon started ----------------------------------------------------
PM2        | 2021-10-31T08:19:59: PM2 log: Time                 : Sun Oct 31 2021 08:19:59 GMT+0000 (Coordinated Universal Time)
PM2        | 2021-10-31T08:19:59: PM2 log: PM2 version          : 5.1.2
PM2        | 2021-10-31T08:19:59: PM2 log: Node.js version      : 14.18.1
PM2        | 2021-10-31T08:19:59: PM2 log: Current arch         : x64
PM2        | 2021-10-31T08:19:59: PM2 log: PM2 home             : /root/.pm2
PM2        | 2021-10-31T08:19:59: PM2 log: PM2 PID file         : /root/.pm2/pm2.pid
PM2        | 2021-10-31T08:19:59: PM2 log: RPC socket file      : /root/.pm2/rpc.sock
PM2        | 2021-10-31T08:19:59: PM2 log: BUS socket file      : /root/.pm2/pub.sock
PM2        | 2021-10-31T08:19:59: PM2 log: Application log path : /root/.pm2/logs
PM2        | 2021-10-31T08:19:59: PM2 log: Worker Interval      : 30000
PM2        | 2021-10-31T08:19:59: PM2 log: Process dump file    : /root/.pm2/dump.pm2
PM2        | 2021-10-31T08:19:59: PM2 log: Concurrent actions   : 2
PM2        | 2021-10-31T08:19:59: PM2 log: SIGTERM timeout      : 1600
PM2        | 2021-10-31T08:19:59: PM2 log: ===============================================================================
Tobjoern commented 3 years ago

Hello, I think pm2 is a really great tool, and I would like to use it in production, unfortunately, I can't do that until I can actually get it working. Your help is appreciated!