Skip to content
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

pm2 set pm2:autodump true not working #4763

Closed
plashenkov opened this issue Jun 29, 2020 · 2 comments
Closed

pm2 set pm2:autodump true not working #4763

plashenkov opened this issue Jun 29, 2020 · 2 comments

Comments

@plashenkov
Copy link

plashenkov commented Jun 29, 2020

What's going wrong?

Using pm2 under www-data user. Setting PM2_HOME=/var/www/.pm2 before every pm2 call. /var/www/.pm2 has all correct permissions.

Calling:

PM2_HOME=/var/www/.pm2 pm2 startOrRestart ecosystem.config.js

Gives me the message:

[PM2][WARN] Current process list running is not in sync with saved list. Type 'pm2 save' to synchronize or enable autosync via 'pm2 set pm2:autodump true'

I have to say that I already ran this command: pm2 set pm2:autodump true.

As a result, this file — /var/www/.pm2/module_conf.json — contains:

{
    "pm2": {
        "autodump": "true"
    }
}

But if it asks to run, okay, let's run one more time:

PM2_HOME=/var/www/.pm2 pm2 set pm2:autodump true

Let's try again:

PM2_HOME=/var/www/.pm2 pm2 startOrRestart ecosystem.config.js

Still the same warning message:

[PM2][WARN] Current process list running is not in sync with saved list. Type 'pm2 save' to synchronize or enable autosync via 'pm2 set pm2:autodump true'

/var/www/.pm2/dump.pm2 is empty. Restarting the server doesn't resurrect the process (pm2 startup was turned on).

So, it appears that pm2 set pm2:autodump true simply doesn't work, at all.


Supporting information

--- PM2 report ----------------------------------------------------------------
Date                 : Sun Jun 28 2020 23:56:04 GMT+0000 (Coordinated Universal Time)
===============================================================================
--- Daemon -------------------------------------------------
pm2d version         : 4.4.0
node version         : 14.4.0
node path            : not found
argv                 : /usr/bin/node,/usr/lib/node_modules/pm2/lib/Daemon.js
argv0                : node
user                 : www-data
uid                  : 33
gid                  : 33
uptime               : 18min
===============================================================================
--- CLI ----------------------------------------------------
local pm2            : 4.4.0
node version         : 14.4.0
node path            : /usr/bin/pm2
argv                 : /usr/bin/node,/usr/bin/pm2,report
argv0                : node
user                 : www-data
uid                  : 33
gid                  : 33
===============================================================================
--- System info --------------------------------------------
arch                 : x64
platform             : linux
type                 : Linux
cpus                 : Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz
cpus nb              : 1
freemem              : 10379264
totalmem             : 504430592
home                 : /root
===============================================================================
--- PM2 list -----------------------------------------------
┌─────┬───────────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id  │ name              │ namespace   │ version │ mode    │ pid      │ uptime │ ↺    │ status    │ cpu      │ mem      │ user     │ watching │
├─────┼───────────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0   │ example.com       │ default     │ N/A     │ cluster │ 1783     │ 13m    │ 2    │ online    │ 0.3%     │ 41.3mb   │ www-data │ disabled │
└─────┴───────────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
[PM2][WARN] Current process list running is not in sync with saved list. Type 'pm2 save' to synchronize or enable autosync via 'pm2 set pm2:autodump true'
===============================================================================
--- Daemon logs --------------------------------------------
/var/www/.pm2/pm2.log last 20 lines:
PM2        | 2020-06-28T23:42:59: PM2 log: pid=1693 msg=failed to kill - retrying in 100ms
PM2        | 2020-06-28T23:43:00: PM2 log: pid=1693 msg=failed to kill - retrying in 100ms
PM2        | 2020-06-28T23:43:00: PM2 log: pid=1693 msg=failed to kill - retrying in 100ms
PM2        | 2020-06-28T23:43:00: PM2 log: pid=1693 msg=failed to kill - retrying in 100ms
PM2        | 2020-06-28T23:43:00: PM2 log: pid=1693 msg=failed to kill - retrying in 100ms
PM2        | 2020-06-28T23:43:00: PM2 log: pid=1693 msg=failed to kill - retrying in 100ms
PM2        | 2020-06-28T23:43:00: PM2 log: pid=1693 msg=failed to kill - retrying in 100ms
PM2        | 2020-06-28T23:43:00: PM2 log: pid=1693 msg=failed to kill - retrying in 100ms
PM2        | 2020-06-28T23:43:00: PM2 log: pid=1693 msg=failed to kill - retrying in 100ms
PM2        | 2020-06-28T23:43:00: PM2 log: pid=1693 msg=failed to kill - retrying in 100ms
PM2        | 2020-06-28T23:43:00: PM2 log: pid=1693 msg=failed to kill - retrying in 100ms
PM2        | 2020-06-28T23:43:01: PM2 log: Process with pid 1693 still alive after 1600ms, sending it SIGKILL now...
PM2        | 2020-06-28T23:43:01: PM2 log: App name:example.com id:0 disconnected
PM2        | 2020-06-28T23:43:01: PM2 log: App [example.com:0] exited with code [0] via signal [SIGKILL]
PM2        | 2020-06-28T23:43:01: PM2 log: pid=1693 msg=process killed
PM2        | 2020-06-28T23:43:01: PM2 log: App [example.com:0] starting in -cluster mode-
PM2        | 2020-06-28T23:43:01: PM2 log: App [example.com:0] online
PM2        | info  - Loaded env from /var/www/example.com/releases/20200628231629/.env.local
PM2        | info  - Loaded env from /var/www/example.com/releases/20200628231629/.env
PM2        | ready - started server on http://localhost:3000
@Unitech
Copy link
Owner

Unitech commented Jun 29, 2020

in progress:e790d82

Unitech added a commit that referenced this issue Jun 29, 2020
@Unitech Unitech closed this as completed Aug 20, 2020
@plashenkov
Copy link
Author

Thank you!

mendrix pushed a commit to mendrix/pm2 that referenced this issue Dec 29, 2020
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

2 participants