Unitech / Unitech/pm2

Deploy not executing any process

Open
#5,215 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
43.3k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

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: ===============================================================================

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the deployment guide and the sample repository's ecosystem.config.js, then reproduce pm2 deploy production setup and pm2 deploy production update on the stated Ubuntu VM. Compare the deployment result with pm2 monit, pm2 list, and pm2 report; done means the deployed application appears as a managed process.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
cli, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.