简体   繁体   English

"无法在 PM2 中重新启动或启动已停止的进程"

[英]Cannot Restart or Start Stopped Process in PM2

I have PM2 running on server, handling some Node.Js<\/code> processes.我在服务器上运行 PM2,处理一些Node.Js<\/code>进程。 It runs well for most of the time.它在大多数情况下运行良好。 Sometimes I need to stop a service temporarily for various reasons.有时由于各种原因我需要暂时停止服务。

Strangely, I cannot start a process from stopped<\/code> status.奇怪的是,我无法从stopped<\/code>状态启动进程。 In other words, I cannot perform pm2 stop myproject && pm2 start myproject<\/code> or pm2 restart myproject<\/code> .换句话说,我无法执行pm2 stop myproject && pm2 start myproject<\/code>或pm2 restart myproject<\/code> 。 Whenever I do that, PM2 displays following message:每当我这样做时,PM2 都会显示以下消息:

[PM2] Applying action restartProcessId on app [myproject](ids: [ xx ])
[PM2][ERROR] Process xx not found

It's probably because the system variables have been overwritten or deleted to map the pm2 functions.这可能是因为系统变量已被覆盖或删除以映射 pm2 函数。 I faced a similar issue when I installed pdftk<\/strong> on my system and overwrote the system variable by mistake.当我在我的系统上安装pdftk<\/strong>并错误地覆盖了系统变量时,我遇到了类似的问题。

Add this as your path variable将此添加为您的路径变量

%SystemRoot%/System32/Wbem

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM