pm2
pm2 copied to clipboard
PM2 inaccurately reporting git release version
What's going wrong?
PM2 reports (from both the PM2 plus dashboard and from pm2 describe index an out-of-date git commit. After pm2 reload it still shows the out-of-date release. However, the actual version that is being served is the latest release. It's just the reported commit message that is the issue.
The only way to actually get it to report that it's using the latest git release is with pm2 kill followed by pm2 resurrect.
How could we reproduce this issue?
- Make a new commit (in my case on bitbucket)
- On the server,
git pull --all - Wait while PM2 auto-detects the resulting file changes. (I am running with the
--watchoption.) pm2 describe indexto see the commit message. It is out of date.- View the app in a browser and see that actually it is using the updated version from git. It's just reporting it wrong.
Supporting information
--- PM2 report ----------------------------------------------------------------
Date : Tue Apr 14 2020 14:10:20 GMT+0000 (Coordinated Universal Time)
===============================================================================
--- Daemon -------------------------------------------------
pm2d version : 4.2.3
node version : 10.15.1
node path : /home/me/.nvm/versions/node/v10.15.1/bin/pm2
argv : /home/me/.nvm/versions/node/v10.15.1/bin/node,/home/me/.nvm/versions/node/v10.15.1/lib/node_modules/pm2/lib/Daemon.js
argv0 : node
user : me
uid : 1002
gid : 1002
uptime : 1055min
===============================================================================
--- CLI ----------------------------------------------------
local pm2 : 4.2.3
node version : 10.15.1
node path : /home/me/.nvm/versions/node/v10.15.1/bin/pm2
argv : /home/me/.nvm/versions/node/v10.15.1/bin/node,/home/me/.nvm/versions/node/v10.15.1/bin/pm2,report
argv0 : node
user : me
uid : 1002
gid : 1002
===============================================================================
--- System info --------------------------------------------
arch : x64
platform : linux
type : Linux
cpus : Intel(R) Xeon(R) CPU E5-2650L v3 @ 1.80GHz
cpus nb : 1
freemem : 75108352
totalmem : 1033396224
home : /home/me
===============================================================================
--- PM2 list -----------------------------------------------
┌─────┬──────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
├─────┼──────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0 │ index │ default │ 1.0.0 │ fork │ 14178 │ 17h │ 1 │ online │ 0% │ 64.1mb │ me │ enabled │
└─────┴──────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
===============================================================================
--- Daemon logs --------------------------------------------
/home/me/.pm2/pm2.log last 20 lines:
PM2 | 2020-04-13T20:35:05: PM2 log: Current arch : x64
PM2 | 2020-04-13T20:35:05: PM2 log: PM2 home : /home/me/.pm2
PM2 | 2020-04-13T20:35:05: PM2 log: PM2 PID file : /home/me/.pm2/pm2.pid
PM2 | 2020-04-13T20:35:05: PM2 log: RPC socket file : /home/me/.pm2/rpc.sock
PM2 | 2020-04-13T20:35:05: PM2 log: BUS socket file : /home/me/.pm2/pub.sock
PM2 | 2020-04-13T20:35:05: PM2 log: Application log path : /home/me/.pm2/logs
PM2 | 2020-04-13T20:35:05: PM2 log: Worker Interval : 30000
PM2 | 2020-04-13T20:35:05: PM2 log: Process dump file : /home/me/.pm2/dump.pm2
PM2 | 2020-04-13T20:35:05: PM2 log: Concurrent actions : 2
PM2 | 2020-04-13T20:35:05: PM2 log: SIGTERM timeout : 1600
PM2 | 2020-04-13T20:35:05: PM2 log: ===============================================================================
PM2 | 2020-04-13T20:35:06: PM2 log: [Watch] Start watching index
PM2 | 2020-04-13T20:35:06: PM2 log: App [index:0] starting in -fork mode-
PM2 | 2020-04-13T20:35:06: PM2 log: App [index:0] online
PM2 | 2020-04-13T20:35:07: PM2 log: Change detected on path .git/index for app index - restarting
PM2 | 2020-04-13T20:35:07: PM2 log: Stopping app:index id:0
PM2 | 2020-04-13T20:35:08: PM2 log: App [index:0] exited with code [0] via signal [SIGINT]
PM2 | 2020-04-13T20:35:08: PM2 log: pid=14160 msg=process killed
PM2 | 2020-04-13T20:35:08: PM2 log: App [index:0] starting in -fork mode-
PM2 | 2020-04-13T20:35:08: PM2 log: App [index:0] online
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.