Pm2: PM2 monit not displaying global logs

Created on 22 Apr 2019  路  4Comments  路  Source: Unitech/pm2

What's going wrong?

I am using pm2 3.5 on centos 7.

My node server application requires port 443 to run and because of that I have to run my application by using command

sudo -E pm2 start server.js -i max

When I start pm2 with sudo command the logs or default pm2 folders are created under
/root/.pm2/logs/

and because of that sudo pm2 does not shows any logs even when I select individual applications.

How could we reproduce this issue?

Run pm2 with below command

sudo -E pm2 start server.js -i max

then do

sudo pm2 monit

then try to view global logs by selecting app name.

Supporting information

$ pm2 report

Most helpful comment

Same issue with 4.4.0 on Mac.
pm2 start ecosystem.json -i 4

All 4 comments

Hello, Since 3.5.0, only the logs of the selected app is shown. You have to select the right process in the top left box

Hello, Since 3.5.0, only the logs of the selected app is shown. You have to select the right process in the top left box

I have clearly mentioned it in the OP that I have done that still it is not displaying. When I run pm2 without sudo then it displays the logs not when I run it with sudo -E pm2

Kindly read my whole issue first !

Same issue here with 3.5.1 on macos. No logs are displayed in monit regardless of the process selection in the left pane.

Edit: This was fixed in #4303 but not released. As a workaround I copied the fixed files from that commit and replaced them locally to solve it for now.

Same issue with 4.4.0 on Mac.
pm2 start ecosystem.json -i 4

Was this page helpful?
0 / 5 - 0 ratings

Related issues

liujb picture liujb  路  3Comments

webchaz picture webchaz  路  3Comments

alexpts picture alexpts  路  3Comments

morfies picture morfies  路  3Comments

phra picture phra  路  3Comments