Skip to content
This repository has been archived by the owner on Aug 15, 2023. It is now read-only.

更新后在探索可用服务器后报错 #160

Closed
citydirector opened this issue Oct 1, 2021 · 9 comments
Closed

更新后在探索可用服务器后报错 #160

citydirector opened this issue Oct 1, 2021 · 9 comments
Labels
invalid This doesn't seem right

Comments

@citydirector
Copy link

重新安装也出现相同错误:
[2021-09-30T21:16:50.403] [MARK] [aPad:2019160153] - 正在探索可用服务器...
[2021-09-30T21:16:50.487] [DEBUG] [aPad:2019160153] - 清理:删除数据库 aby 中 0 条无用记录。
[2021-09-30T21:16:50.537] [DEBUG] [aPad:2019160153] - 清理:删除数据库 cookies 中 0 条无用记录。
[2021-09-30T21:16:50.541] [DEBUG] [aPad:2019160153] - 清理:删除数据库 info 中 0 条无用记录。
(node:12118) ExperimentalWarning: stream/web is an experimental feature. This feature could change at any time
(Use node --trace-warnings ... to show where the warning was created)
node:events:368
throw er; // Unhandled 'error' event
^

Error: listen EADDRINUSE: address already in use 127.0.0.1:9934
at Server.setupListenHandle [as _listen2] (node:net:1319:16)
at listenInCluster (node:net:1367:12)
at GetAddrInfoReqWrap.doListen [as callback] (node:net:1505:7)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:73:8)
Emitted 'error' event on Server instance at:
at emitErrorNT (node:net:1346:8)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
code: 'EADDRINUSE',
errno: -98,
syscall: 'listen',
address: '127.0.0.1',
port: 9934
}

@mark9804
Copy link
Collaborator

mark9804 commented Oct 1, 2021

Error: listen EADDRINUSE: address already in use 127.0.0.1:9934

说明已经有一个机器人在运行,或者其他进程把9934占用了

尝试一下: lsof -i:9934,查看是否是node进程占用9934端口,如果不是的话大概率不是这个项目的问题

如果是的话,在机器人目录下运行npm run list,查看是否有正在运行的机器人进程

@citydirector
Copy link
Author

确实是node进程在占用,但是在目录下查看进程时发现没有机器人在运行
image

@mark9804
Copy link
Collaborator

mark9804 commented Oct 1, 2021

能够说明一下你的部署和启动流程吗?如果可以的话,最好能够提供从通过git clone复制仓库,再到npm run …运行机器人报错之前的详细内容,方便确定问题

系统环境也可以说明一下,是什么系统,以及node版本号(可以通过node --version查看),内存多大

@citydirector
Copy link
Author

一开始尝试更新时出现了这个问题,然后我直接把Adachi-BOT文件夹删除&重新克隆了一份进行安装

@citydirector
Copy link
Author

尝试了清除nodejs的模块文件夹后重装了一下nodejs也不起作用

@mark9804
Copy link
Collaborator

mark9804 commented Oct 1, 2021

听起来好像没有“在更新前停止正在运行的机器人”这一个步骤,那有可能后台有一个幽灵进程

如果你不知道怎么停止的话,可以尝试重启服务器或者宿主设备,如果还不行的话要等主程序作者 @Arondight 看看了

@citydirector
Copy link
Author

是的,我猜想也是如此。

@citydirector
Copy link
Author

我尝试在一个新的服务器上部署,换了一个错误,看起来似乎是浏览器找不到某个文件
[2021-10-01T14:00:03.083] [MARK] [aPad:2019160153] - 正在探索可用服务器...
[2021-10-01T14:00:03.142] [DEBUG] [aPad:2019160153] - 清理:删除数据库 aby 中 0 条无用记录。
[2021-10-01T14:00:03.163] [DEBUG] [aPad:2019160153] - 清理:删除数据库 cookies 中 0 条无用记录。
[2021-10-01T14:00:03.165] [DEBUG] [aPad:2019160153] - 清理:删除数据库 info 中 0 条无用记录。
(node:24072) ExperimentalWarning: stream/web is an experimental feature. This feature could change at any time
(Use node --trace-warnings ... to show where the warning was created)
/root/Adachi-BOT/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:197
reject(new Error([
^

Error: Failed to launch the browser process!
/root/Adachi-BOT/node_modules/puppeteer/.local-chromium/linux-901912/chrome-linux/chrome: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory

TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md

at onClose (/root/Adachi-BOT/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:197:20)
at Interface.<anonymous> (/root/Adachi-BOT/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:187:68)
at Interface.emit (node:events:402:35)
at Interface.close (node:readline:586:8)
at Socket.onend (node:readline:277:10)
at Socket.emit (node:events:402:35)
at endReadableNT (node:internal/streams/readable:1343:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21)

@Arondight
Copy link
Owner

#66


建议使用包管理器提供的 Chromium ,因为包管理器会为你解决一切依赖问题

@Arondight Arondight added the invalid This doesn't seem right label Oct 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

3 participants