-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Restarted process in cluster mode can't bind to a port #3987
Comments
I'm facing exactly the same issue. Downgrading to 3.0.3 makes the restarts/reloads work again |
Looks like the same as this: #3943 |
Unfortunately, upgrading to 3.2.2 didn't work for me. And the latest version that worked is 3.0.4 - not 3.1. So maybe it's a different issue. |
Same for me. I only saw this issue when we upgraded from node 8.x to 10.13.0. Now the reload doesn't work. I have to |
i fix by running
i speculated that my problem was my deployment folder being symlinked to ./current |
Same here, running latest pm2 3.2.2 This is serious issue, currently cluster functionallity is not usable. Issue is confirmed by multiple people. I'm supprised that there is no response from the team for so long. |
Agree with @pankleks, it's serious issue, why there is no response for so long. Here is a temporary soluation: running
instead of
|
@suyu0925 thanks, but your solution does not work for me - same result. |
@suyu0925 same here, doesn't work for me. I'm still facing this problem with latest version. I'm using 3.0.3 on production which is the one without this issue. |
I'm using 3.2.2 which is latest at this time. |
@appximus as reported initially, the issue is affecting version >= 3.1 |
Has anyone tried changing exec_mode to "cluster_mode"? One of the closed issues references cluster being deprecated (or removed in this case) |
@kermitology I just tried and seems like it fixes the issue with pm2 3.2.2 using |
@ajimix thanks works for me too. Although it's hard to not comment on legitimacy of this change. I have multiple enviroments running old and new version of pm2. At least some backward compablility should be implemented. Anyway - thank you for help! |
Can confirm, it works for 3.2.2. Although I think, if the "cluster" option is deprecated, pm2 should prompt a deprecation warning or something when it is used. |
Closing the issue. @kermitology pointed to the right solution. |
inspecting |
Ok managed to reproduce, I'm working on it now |
pm2 published with the fix $ npm install pm2@latest -g
$ pm2 update Please let me know if you see anything wrong |
Thank you @Unitech, It seems to be working, but you have to first delete all apps first.. Just doing pm2 update did not help.
|
so what we need to use in |
What's going wrong?
In version >= 3.1 if a script is ran in cluster mode (in my case 2 processes) on restart one of the processes fails to bind to a port:
In earlier versions (e.g. 3.0.0)
restart
works alright.How could we reproduce this issue?
pm2 start script.json
pm2 restart script.json
Supporting information
The text was updated successfully, but these errors were encountered: