Unitech / pm2

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

pm2 monit logs bug #5024

Open Art3miX opened 3 years ago

Art3miX commented 3 years ago

What's going wrong?

Heres a video of the issue: https://streamable.com/cgkij4 When you enter pm2 monit, the logs section acts very weird, basically there are 2 issues:

  1. The logs jumps up and down for no reason, it is very annoying when you trying to look into logs.
  2. The biggest issue is that for some reason, if you have 2 rows that is the same, when you reach the 2nd one, it jumps back to the first one,

How could we reproduce this issue?

I have no idea what cause it or how you can reproduce, monit works as expected on my home computer, but not on my laptop. I am using Ubuntu (the issue happened both on Ubuntu 18 and 20.

Supporting information

PM2 report ---------------------------------------------------------------- Date : Thu Mar 18 2021 13:53:04 GMT+0200 (Israel Standard Time)

--- Daemon ------------------------------------------------- pm2d version : 4.5.5 node version : 14.16.0 node path : /usr/local/bin/pm2 argv : /usr/local/bin/node,/usr/local/lib/node_modules/pm2/lib/Daemon.js argv0 : node user : yan uid : 1000 gid : 1000 uptime : 1min

--- CLI ---------------------------------------------------- local pm2 : 4.5.5 node version : 14.16.0 node path : /usr/local/bin/pm2 argv : /usr/local/bin/node,/usr/local/bin/pm2,report argv0 : node user : yan uid : 1000 gid : 1000

--- System info -------------------------------------------- arch : x64 platform : linux type : Linux cpus : Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz cpus nb : 8 freemem : 4016807936 totalmem : 16660971520 home : /home/yan

--- PM2 list ----------------------------------------------- ┌─────┬────────────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐ │ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │ ├─────┼────────────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤ │ 0 │ bla │ default │ 1.0.0 │ fork │ 24580 │ 98s │ 0 │ online │ 0% │ 87.7mb │ yan │ enabled │ └─────┴────────────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘

--- Daemon logs -------------------------------------------- /home/yan/.pm2/pm2.log last 20 lines: PM2 | 2021-03-18T13:51:26: PM2 log: PM2 successfully stopped PM2 | 2021-03-18T13:51:26: PM2 log: =============================================================================== PM2 | 2021-03-18T13:51:26: PM2 log: --- New PM2 Daemon started ---------------------------------------------------- PM2 | 2021-03-18T13:51:26: PM2 log: Time : Thu Mar 18 2021 13:51:26 GMT+0200 (Israel Standard Time) PM2 | 2021-03-18T13:51:26: PM2 log: PM2 version : 4.5.5 PM2 | 2021-03-18T13:51:26: PM2 log: Node.js version : 14.16.0 PM2 | 2021-03-18T13:51:26: PM2 log: Current arch : x64 PM2 | 2021-03-18T13:51:26: PM2 log: PM2 home : /home/yan/.pm2 PM2 | 2021-03-18T13:51:26: PM2 log: PM2 PID file : /home/yan/.pm2/pm2.pid PM2 | 2021-03-18T13:51:26: PM2 log: RPC socket file : /home/yan/.pm2/rpc.sock PM2 | 2021-03-18T13:51:26: PM2 log: BUS socket file : /home/yan/.pm2/pub.sock PM2 | 2021-03-18T13:51:26: PM2 log: Application log path : /home/yan/.pm2/logs PM2 | 2021-03-18T13:51:26: PM2 log: Worker Interval : 30000 PM2 | 2021-03-18T13:51:26: PM2 log: Process dump file : /home/yan/.pm2/dump.pm2 PM2 | 2021-03-18T13:51:26: PM2 log: Concurrent actions : 2 PM2 | 2021-03-18T13:51:26: PM2 log: SIGTERM timeout : 1600 PM2 | 2021-03-18T13:51:26: PM2 log: =============================================================================== PM2 | 2021-03-18T13:51:26: PM2 log: [Watch] Start watching bla PM2 | 2021-03-18T13:51:26: PM2 log: App [bla:0] starting in -fork mode- PM2 | 2021-03-18T13:51:26: PM2 log: App [bla:0] online

stoplion commented 2 years ago

No logs for me either

PROPHESSOR commented 2 years ago

Related: #4257

kutovoy commented 1 year ago

I have same issue on pm2 5.3.0 running some nodejs apps. logs keeps jumping up/down a line making its very hard to read them

Facuiguacel commented 3 months ago

I've noticed it happens in lines that are equal to others. So for example, if you have two or more lines printing "TEST", when scrolling to any of those, it jumps to the first ever line that printed "TEST". It becomes very annoying when loggin objects because the last line prints the closing curly bracket "}", meaning its everywhere, making it impossible to navigate through live logs.