设为首页收藏本站

ZMX - IT技术交流论坛 - 无限Perfect,追求梦想 - itzmx.com

 找回密码
 注册论坛

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

用百度帐号登录

只需两步,快速登录

搜索
查看: 659|回复: 1

请问有大佬熟悉PM2这个进程管理器吗?

[复制链接]

签到天数: 1111 天

[LV.10]以坛为家III

发表于 2023/1/29 10:02 | 显示全部楼层 |阅读模式 |Google Chrome 109.0.0.0|Windows 10
天涯海角搜一下: 百度 谷歌 360 搜狗 有道 雅虎 必应 即刻
本帖最后由 寻宝人2339 于 2023/1/30 23:49 编辑

我用start设置了两个开机自启的程序,现在想取消,但是用unstartup会报错提示:

Init system not found
C:\..\node_modules\pm2\lib\API\Startup.js:93
    if (process.getuid() != 0) {
                ^

TypeError: process.getuid is not a function
    at API.CLI.uninstallStartup (C:\..\node_modules\pm2\lib\API\Startup.js:93:17)
    at Command.<anonymous> (C:\..\node_modules\pm2\lib\binaries\CLI.js:698:9)
    at Command.listener (C:\..\node_modules\pm2\node_modules\commander\index.js:315:8)
    at Command.emit (node:events:526:28)
    at Command.parseArgs (C:\..\node_modules\pm2\node_modules\commander\index.js:651:12)
    at Command.parse (C:\..\node_modules\pm2\node_modules\commander\index.js:474:21)
    at Timeout._onTimeout (C:\..\node_modules\pm2\lib\binaries\CLI.js:206:15)
    at listOnTimeout (node:internal/timers:559:17)
    at processTimers (node:internal/timers:502:7)

我是先装了nodejs然后用npm命令装了pm2 startup。

请问大佬知道是哪里有什么问题吗?在网上找了一些瞎鼓捣后都没效果。。





后续:另辟蹊径直接删了进程记录,但是还是会自动恢复,此时可以尝试(pm2 cleardump(此命令好像是清空pm2 save的东西,因为我本身就是只有两个进程且都要关掉的,所以用了这个。如果进程多的还是试试其它办法吧))。
        寻找过程:又在它的github评论区看了看,找到了一个讨论类似问题的。好像是它本身的缺陷还是别的什么原因,不光win,其它系统也存在,而且不只是这个命令,还牵扯到好些命令。也有人提出了其它一些尝试,似乎在不同情况下各有不同。地址:https://github.com/Unitech/pm2/issues/4556
        懒得再搞一开始提到的unstartup命令了,以后再说吧。。
欢迎光临IT技术交流论坛:http://bbs.itzmx.com/
回复

使用道具 举报

签到天数: 1 天

[LV.1]初来乍到

发表于 2023/1/29 18:43 | 显示全部楼层 |Google Chrome 109.0.0.0|Windows 10
你这个是Windows系统,你可以在服务里找找,或者直接更改目录,
欢迎光临IT技术交流论坛:http://bbs.itzmx.com/
回复 支持 1 反对 0

使用道具 举报

您需要登录后才可以回帖 登录 | 注册论坛 新浪微博账号登陆用百度帐号登录

本版积分规则

手机版|Archiver|Mail me|网站地图|IT技术交流论坛 ( 闽ICP备13013206号-7 )

GMT+8, 2024/4/24 01:41 , Processed in 0.296318 second(s), 22 queries , MemCache On.

Powered by itzmx! X3.4

© 2011- sakura

快速回复 返回顶部 返回列表