pm2 icon indicating copy to clipboard operation
pm2 copied to clipboard

error: unknown option `--stop-exit-codes'

Open KevinWang15 opened this issue 4 years ago • 29 comments

I wanted to use the Skip Auto Restart For Specific Exit Codes feature, described in https://pm2.keymetrics.io/docs/usage/restart-strategies/

But it is not working

ash-4.4# pm2 --version
5.1.2

ash-4.4# pm2 start ./restore.sh --stop-exit-codes 0
  error: unknown option `--stop-exit-codes'

Please help take a look, thanks.

KevinWang15 avatar Oct 23 '21 02:10 KevinWang15

Same problem, any news ?

zakariamehbi avatar Feb 08 '22 11:02 zakariamehbi

Any feedback would be much appreciated ☺️

stefanpl avatar Feb 27 '22 22:02 stefanpl

I am facing the same issue.

rmeghwar avatar Mar 04 '22 08:03 rmeghwar

I have the same issue too

bitBeater avatar Mar 17 '22 09:03 bitBeater

Same issue!

agniiyer avatar Apr 06 '22 04:04 agniiyer

Me too. Any news?

toropigaskunk avatar Jun 09 '22 15:06 toropigaskunk

It looks like it has never been a actual feature (#5330)

that1estonian avatar Aug 20 '22 09:08 that1estonian

Same issue!

windowye avatar Aug 24 '22 08:08 windowye

Same Issue!

FaizNL avatar Sep 07 '22 21:09 FaizNL

Same issue here with pm2 5.2.0

pm2 start "ls" --stop-exit-codes 9009
error: unknown option `--stop-exit-codes'

johhnry avatar Sep 29 '22 07:09 johhnry

issue still exists. can we get a bump on #5330 ?

TotalLag avatar Oct 30 '22 02:10 TotalLag

me too

taojunnan avatar Mar 07 '23 13:03 taojunnan

me too, version is 5.2.2

zx013 avatar Mar 09 '23 14:03 zx013

same issue

m-cisse-easy-live avatar Mar 27 '23 10:03 m-cisse-easy-live

same issue on 5.3.0

adamgrant-infinitusai avatar Apr 05 '23 19:04 adamgrant-infinitusai

Same, please update docs if you don't want to implement this feature!!!!

fiftin avatar Apr 15 '23 19:04 fiftin

same issue. Or it's a paid tier feature only?

pmode avatar Apr 17 '23 02:04 pmode

Once upon a time, in a land not so far away, there was a programmer named Paras who was responsible for maintaining a critical service using PM2. Paras was a meticulous coder, but his program had a bug that caused it to crash with a specific exit code. He searched the PM2 documentation and found that the --stop-exit-codes code flag could prevent the program from restarting automatically. "Perfect," he thought, "this will buy me time to fix the issue."

Paras added the flag to his PM2 configuration and ran some tests. To his surprise, the program still restarted after crashing with the designated exit code. He tried different configurations, but nothing seemed to work. He went back to the PM2 documentation and realized that the --stop-exit-codes code flag was only mentioned in the documentation, and not an actual feature of PM2!

Frustrated, he searched online and found a GitHub issue where many others had experienced the same problem. He added his voice to the chorus, hoping for a quick fix. But as time passed, and the issue remained unresolved, he started to lose hope. Over 18 months went by, with many people chiming in, agreeing with him, but nothing changed.

In the end, Paras learned that sometimes even the most well-documented features can be misleading, and sometimes software bugs are harder to fix than they appear. He continued to code, hoping that someday, someone would fix the elusive PM2 bug.

pstefa1707 avatar May 06 '23 02:05 pstefa1707

It seems that the feature has been merged (#5330). However, a new version of PM2 may not be released in a short term according to the version history and the fact that the current version was released just 2 months ago.

zhiyuanzhai avatar May 18 '23 04:05 zhiyuanzhai

this feature is currently in development: to install it just use npm install -g github:Unitech/pm2#development

gamersindo1223 avatar Sep 23 '23 09:09 gamersindo1223

Does anyone have any insight on the pure negligence that must have occurred to have feature docs available and published for something that simply doesn't exist in the master branch?

This issue is over two years old. There are multiple PRs for fixing the issue or fixing the docs. Neither have been released. Unitech has not responded.

Is PM2 production ready or is this really bad product process smell?

MooseV2 avatar Nov 06 '23 16:11 MooseV2

Still a issue on 5.3.0. =[

brunosoaresoliveira avatar Nov 06 '23 21:11 brunosoaresoliveira

Bump? Still a problem @Unitech why is this feature contained in the documentation if it is not even a real feature?

futuresymphony avatar Jan 18 '24 17:01 futuresymphony

Who here wants to make pm3 with me? :P

smashah avatar Jan 19 '24 13:01 smashah