SilveryStar/Adachi-BOT

运行报错 `ERR_SERVER_ALREADY_LISTEN`

Closed this issue · 9 comments

系统版本

Windows 10 Pro (19043.1348)

Node.js 版本

12.22.7

应用版本

2.2.1-bugfix1

启动方式

No response

复述操作

报错前未发送任何指令,且该问题似乎随机出现。

配置文件

未修改。

错误报告

Error [ERR_SERVER_ALREADY_LISTEN]: Listen method has been called more than once without closing.
    at Server.listen (net.js:1402:11)
    at Function.serverListen [as listen] (D:\Adachi-BOT\node_modules\express-ws\lib\index.js:42:40)
    at Server.<anonymous> (D:\Adachi-BOT\src\web-console\backend\index.ts:64:13)
    at Server.emit (events.js:314:20)
    at Server.EventEmitter.emit (domain.js:483:12)
    at TCP.onconnection (net.js:1558:8)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! adachi-bot@2.2.1-bugfix1 start: `ts-node -r tsconfig-paths/register app.ts --files`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the adachi-bot@2.2.1-bugfix1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

出错钱有访问过 web console 吗,还是突然暴毙的

没有,就是突然就暴毙了
我昨天一整天没看 webconsole,然后今天早晨一看 bot 挂了

其实这个问题应该不难解决,但是不知道成因是什么……
先放在这吧,如果下次还发生了这种情况麻烦说一声,之前也没见过这种情况

更新过一次之后就没发现这种情况了,要不先关了下次再有再说

不用,v2.2.2 的更新没改过这边,该有的问题还是有

后来再也没有遇到这种情况了,有点离谱
还要继续观察吗

那先关了吧,我感觉可能还是服务器网络相关的问题

今天又报错了,错误提示和上面一样,出错前的最后消息是这些

[01:26:31.816] [iPad:*****] [INFO] [Recv] [Group] 有人玩崩三吗
[01:26:34.621] [iPad:*****] [INFO] [Recv] [Group] [CQ:image,file=73e238aa8929040fc329155115e9624e877431-200-200.gif,url=https://gchat.qpic.cn/gchatpic_new/*********/644404503-2949239622-73E238AA8929040FC329155115E9624E/0?term=3]
[01:28:13.950] [iPad:*****] [INFO] [Recv] [Group] [CQ:image,file=856505f08eab4bda3a47d451046fa7b51688162-316-390.gif,url=https://gchat.qpic.cn/gchatpic_new/*********/644404503-2381023187-856505F08EAB4BDA3A47D451046FA7B5/0?term=3]
[02:00:00.302] [iPad:*****] [INFO] [Event] 用户 ********* 的实时便笺数据查询成功
[02:00:00.379] [iPad:*****] [INFO] [Event] 用户 ********* 的实时便笺数据查询成功
[02:00:00.383] [iPad:*****] [INFO] [Event] 用户 ********* 的实时便笺数据查询成功
[03:00:00.321] [iPad:*****] [INFO] [Event] 用户 ********* 的实时便笺数据查询成功
[03:00:00.322] [iPad:*****] [INFO] [Event] 用户 ********* 的实时便笺数据查询成功
[03:00:00.345] [iPad:*****] [INFO] [Event] 用户 ********* 的实时便笺数据查询成功
[04:00:00.313] [iPad:*****] [INFO] [Event] 用户 ********* 的实时便笺数据查询成功
[04:00:00.323] [iPad:*****] [INFO] [Event] 用户 ********* 的实时便笺数据查询成功
[04:00:00.346] [iPad:*****] [INFO] [Event] 用户 ********* 的实时便笺数据查询成功
[05:00:00.322] [iPad:*****] [INFO] [Event] 用户 ********* 的实时便笺数据查询成功
[05:00:00.332] [iPad:*****] [INFO] [Event] 用户 ********* 的实时便笺数据查询成功
[05:00:00.393] [iPad:*****] [INFO] [Event] 用户 ********* 的实时便笺数据查询成功
[06:00:00.318] [iPad:*****] [INFO] [Event] 用户 ********* 的实时便笺数据查询成功
[06:00:00.338] [iPad:*****] [INFO] [Event] 用户 ********* 的实时便笺数据查询成功
[06:00:00.365] [iPad:*****] [INFO] [Event] 用户 ********* 的实时便笺数据查询成功
[06:28:04.454] [iPad:*****] [INFO] [Recv] [Group] 早
[06:28:12.535] [iPad:*****] [INFO] [Recv] [Group] [CQ:json,data={"app":"com.tencent.qq.checkin"&#44;"config":{"ctime":1639952893&#44;"forward":0&#44;"showSender":1&#44;"token":"*********"}&#44;"desc":"群签到"&#44;"extra":{"app_type":1&#44;"appid":101912871&#44;"uin":591116964}&#44;"meta":{"checkInData":{"address":""&#44;"cover":{"height":0&#44;"url":"https://pub.idqqimg.com/pc/misc/files/20200219/ab85499163341f0de6fbac5d4713fef1.png"&#44;"width":0}&#44;"desc":"还有谁比我早"&#44;"hostuin":591116964&#44;"id":"union_16399528920591116964644404503"&#44;"media_type":0&#44;"qunid":"644404503"&#44;"rank":1&#44;"skip_to":1&#44;"time":0&#44;"url":"mqqapi://microapp/open?appid=1108164955&amp;path=pages%2Fchecklist%2Fchecklist&amp;extraData=644404503%7Cunion_16399528920591116964644404503"&#44;"vid":""}}&#44;"prompt":"群签到"&#44;"ver":"1.0.0.25"&#44;"view":"checkIn"}]
[06:28:46.354] [iPad:*****] [INFO] [Recv] [Group] 看剧情已经看一个人的剧场了
[06:34:44.571] [iPad:*****] [INFO] [Recv] [Group] 没时间肝,剧情动画估计都看了四十小时了

Error [ERR_SERVER_ALREADY_LISTEN]: Listen method has been called more than once without closing.

sign,主要还是不知道这个错误的成因是什么,我感觉可能和你那边有点关系,貌似没有别遇到过
我只能尝试一下用特判的方式来解决一下这个问题