Skip to content

No logs with PM2 2.6.1 #3045

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
meyerbro opened this issue Jul 25, 2017 · 6 comments
Closed

No logs with PM2 2.6.1 #3045

meyerbro opened this issue Jul 25, 2017 · 6 comments

Comments

@meyerbro
Copy link

meyerbro commented Jul 25, 2017

What's going wrong?

We aren't getting any logs while running pm2 logs.
The only change we made was to upgrade PM2 from 2.5.0 to 2.6.1.

How could we reproduce this issue?

Going into the docker container and running pm2 logs.
Rolling back to PM2 2.5.0 fixes the issue.

Supporting information

===============================================================================
--- PM2 REPORT (Tue Jul 25 2017 11:28:30 GMT+0000 (UTC)) ----------------------
===============================================================================
--- Daemon -------------------------------------------------
pm2d version         : 2.6.1
node version         : 8.1.4
node path            : undefined
argv                 : /usr/local/bin/node,/home/app/src/node_modules/.bin/pm2,start,--no-daemon,pm2.json
argv0                : node
user                 : undefined
uid                  : 999
gid                  : 999
uptime               : 4min
===============================================================================
--- CLI ----------------------------------------------------
local pm2            : 2.6.1
node version         : 8.1.4
node path            : /usr/local/bin/pm2
argv                 : /usr/local/bin/node,/usr/local/bin/pm2,report
argv0                : node
user                 : undefined
uid                  : 0
gid                  : 0
===============================================================================
--- System info --------------------------------------------
arch                 : x64
platform             : linux
type                 : Linux
cpus                 : Intel(R) Xeon(R) CPU E5-2666 v3 @ 2.90GHz
cpus nb              : 4
freemem              : 6355111936
totalmem             : 7844544512
home                 : /home/app
===============================================================================
--- PM2 list -----------------------------------------------
┌─────────────────┬────┬─────────┬─────┬────────┬─────────┬────────┬─────┬────────────┬──────┬──────────┐
│ App name        │ id │ mode    │ pid │ status │ restart │ uptime │ cpu │ mem        │ user │ watching │
├─────────────────┼────┼─────────┼─────┼────────┼─────────┼────────┼─────┼────────────┼──────┼──────────┤
│ interface       │ 0  │ cluster │ 25  │ online │ 0       │ 4m     │ 0%  │ 164.6 MB   │ root │ disabled │
│ interface       │ 1  │ cluster │ 35  │ online │ 0       │ 4m     │ 0%  │ 162.1 MB   │ root │ disabled │
│ interface       │ 2  │ cluster │ 45  │ online │ 0       │ 4m     │ 0%  │ 166.0 MB   │ root │ disabled │
│ interface       │ 3  │ cluster │ 55  │ online │ 0       │ 4m     │ 0%  │ 167.3 MB   │ root │ disabled │
└─────────────────┴────┴─────────┴─────┴────────┴─────────┴────────┴─────┴────────────┴──────┴──────────┘
===============================================================================
--- Daemon logs --------------------------------------------
@vmarchaud
Copy link
Contributor

Could you share the configuration of your application ?

@Unitech
Copy link
Owner

Unitech commented Jul 26, 2017

I guess out_log is set to /dev/null or NULL

#3037

@meyerbro
Copy link
Author

meyerbro commented Aug 1, 2017

Yes, it is, because we want the logs to go via logdriver (splunk).
How can we do that with PM2 2.6.1?

@meyerbro
Copy link
Author

meyerbro commented Aug 1, 2017

Ok, I just saw you're going to put that in the next version.

@Unitech
Copy link
Owner

Unitech commented Sep 15, 2017

Fixed on recently published pm2 (2.7.0):

$ npm install pm2@latest -g
$ pm2 update

Let me know if there is any issue

@cdm6a
Copy link
Contributor

cdm6a commented Sep 15, 2017

@Unitech, in the event you set out_file or error_file to /dev/null, it ignores log_file. I'm not sure if this is intentional but in my case where I had:

{
  ...
  error_file : 'error.log',
  out_file   : '/dev/null',
  log_file   : 'merged.log',
  merge_logs : true
}

The behavior changed between 2.5 and 2.6.

I've created #3156 to fix this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants