Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] 根据各种issues修改后仍出现 Websocket reconnecting in 5s #217

Closed
1 of 3 tasks
trainchaseCC opened this issue Feb 28, 2023 · 20 comments
Closed
1 of 3 tasks
Labels
bug Something isn't working question Further information is requested stale

Comments

@trainchaseCC
Copy link

trainchaseCC commented Feb 28, 2023

提交 issue 前,请先确认:

  • 我已看过 FAQ,此问题不在列表中
  • 我已看过其他 issue,他们不能解决我的问题
  • 我认为这不是 Mirai 或者 OpenAI 的 BUG

表现
快速部署,出现问题。后做如下修改:
config.cfg

api_key = "1234567890"
http_url = "http://mirai:8080"
ws_url = "http://mirai:8080"

setting.yml

adapters:
  - http
  - ws
debug: true
enableVerify: true
verifyKey: 1234567890
singleMode: false
cacheSize: 4096
persistenceFactory: 'built-in'
adapterSettings:
  ## HTTP 服务的主机, 端口和跨域设置
  http:
    host: mirai
    port: 8080
    cors: ["*"]

  ## Websocket 服务的主机, 端口和事件同步ID设置
  ws:
    host: mirai
    port: 8080
    reservedSyncId: -1

启动Chatgpt后登陆正常,但仍出现 Websocket reconnecting in 5s
2023-02-28 10:25:31.367 | WARNING | graia.ariadne.connection.ws::76 - Websocket reconnecting in 5s...
2023-02-28 10:25:36.365 | WARNING | graia.ariadne.connection.ws:
:78 - Websocket reconnecting...
2023-02-28 10:25:38.619 | WARNING | graia.amnesia.builtins.aiohttp:connection_manage:229 - ClientConnectorError(ConnectionKey(host='mirai', port=8080, is_ssl=False, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=None), gaierror(11001, 'getaddrinfo failed'))

运行环境:

  • 操作系统:Windows 10
  • Docker:快速部署
  • 项目版本:Windows-quickstart-refs.tags.v1.5.7
@trainchaseCC trainchaseCC added the bug Something isn't working label Feb 28, 2023
@lss233
Copy link
Owner

lss233 commented Feb 28, 2023

看看mirai的日志

@trainchaseCC
Copy link
Author

1
2

@xixixi2000
Copy link

xixixi2000 commented Feb 28, 2023

建议把主机名从mirai改成localhost或者127.0.0.1,另外一边mcl也要改,然后先开mcl.
用netstat -na看看8080端口是否处于Listening状态,否则就是mcl没启动,如果端口被其他占用可以换一个别的端口,但是要两边一起改

@zlican77
Copy link

我感觉是你没有两个命令行一起挂,你的mirai程序关闭了,要chat和mirai两个一起开!!

@Shrouu
Copy link

Shrouu commented Feb 28, 2023

我也出现了同样的问题,经过 #142 的排查后仍存在此问题。

问题如下

chatgpt-qq-chatgpt-1     | 2023-02-28 14:04:47.477 | SUCCESS  | manager.bot:login:137 - 登录成功!
chatgpt-qq-chatgpt-1     | 2023-02-28 14:04:47.477 | DEBUG    | manager.bot:login:138 - 等待 8 秒……
chatgpt-qq-chatgpt-1     | 2023-02-28 14:04:55.483 | SUCCESS  | manager.bot:login:156 - 成功登录 1/1 个账号!
chatgpt-qq-chatgpt-1     | 2023-02-28 14:04:55.484 | ERROR    | config:scan_presets:196 - 检查预设:正常 <==> presets/default.txt [失败:文件不存在]
chatgpt-qq-chatgpt-1     | 2023-02-28 14:04:55.484 | SUCCESS  | config:scan_presets:194 - 检查预设:猫娘 <==> presets/catgirl.txt [成功]
chatgpt-qq-chatgpt-1     | 2023-02-28 14:04:55.484 | SUCCESS  | config:scan_presets:207 - 注册预设:catgirl <==> ./presets/catgirl.txt [成功]
chatgpt-qq-chatgpt-1     | 2023-02-28 14:04:55.484 | SUCCESS  | config:scan_presets:207 - 注册预设:预设模板 <==> ./presets/预设模板.txt [成功]
chatgpt-qq-chatgpt-1     | 2023-02-28 14:04:55.484 | INFO     | __main__:start_background:224 - OpenAI 服务器登录成功
chatgpt-qq-chatgpt-1     | 2023-02-28 14:04:55.484 | INFO     | __main__:start_background:225 - 尝试从 Mirai 服务中读取机器人 QQ 的 session key……
chatgpt-qq-chatgpt-1     | 2023-02-28 14:04:55.485 | SUCCESS  | launart.manager:launch:384 - Layer #3:[elizabeth.service] preparation completed.
chatgpt-qq-chatgpt-1     | 2023-02-28 14:04:55.485 | INFO     | launart.manager:launch:389 - All components prepared, start blocking phase.
chatgpt-qq-chatgpt-1     | 2023-02-28 14:04:55.488 | WARNING  | graia.amnesia.builtins.aiohttp:connection_manage:229 - ClientConnectorError(ConnectionKey(host='localhost', port=12000, is_ssl=False, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=None), ConnectionRefusedError(111, "Connect call failed ('127.0.0.1', 12000)"))
chatgpt-qq-chatgpt-1     | 2023-02-28 14:04:55.488 | WARNING  | graia.ariadne.connection.ws:_:76 - Websocket reconnecting in 5s...
chatgpt-qq-chatgpt-1     | 2023-02-28 14:05:00.489 | WARNING  | graia.ariadne.connection.ws:_:78 - Websocket reconnecting...
chatgpt-qq-chatgpt-1     | 2023-02-28 14:05:00.491 | WARNING  | graia.amnesia.builtins.aiohttp:connection_manage:229 - ClientConnectorError(ConnectionKey(host='localhost', port=12000, is_ssl=False, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=None), ConnectionRefusedError(111, "Connect call failed ('127.0.0.1', 12000)"))
chatgpt-qq-chatgpt-1     | 2023-02-28 14:05:00.491 | WARNING  | graia.ariadne.connection.ws:_:76 - Websocket reconnecting in 5s...

这是插件加载日志部分。
2023-02-28 14:03:53 I/MahKtorAdapter[http,ws]: Responding at http://localhost:12000
2023-02-28 14:03:53 I/http adapter: >>> [http adapter] is listening at http://localhost:12000
2023-02-28 14:03:53 I/ws adapter: >>> [ws adapter] is listening at ws://localhost:12000
2023-02-28 14:03:53 I/Mirai HTTP API: Http api server is running with verifyKey: 1234567890
2023-02-28 14:03:53 I/Mirai HTTP API: adaptors: [http,ws]
ps:我试过将setting.yml中的主机名换为mirai,但启动时日志的这个部分仍显示localhost。这里的端口号我也进行了更改
后续日志显示我已经成功登陆了QQ

chatgpt-qq-mirai-1       | 2023-02-28 14:04:40 W/MCL Addon: iTXTech Soyuz 未安装,Soyuz MCL Handler 特性已禁用
chatgpt-qq-mirai-1       | 2023-02-28 14:04:40 I/main: 3 plugin(s) enabled.
chatgpt-qq-mirai-1       | 2023-02-28 14:04:40 I/main: Auto-login 3014633***, protocol: IPAD, heartbeatStrategy: STAT_HB
chatgpt-qq-mirai-1       | 2023-02-28 14:04:40 I/Bot.3014633640: Loaded account secrets from local cache.
chatgpt-qq-mirai-1       | 2023-02-28 14:04:40 I/Bot.3014633640: Saved account secrets to local cache for fast login.
chatgpt-qq-mirai-1       | 2023-02-28 14:04:41 I/Bot.3014633640: Login successful.
chatgpt-qq-mirai-1       | 2023-02-28 14:04:41 V/Bot.3014633640: Event: BotOnlineEvent(bot=Bot(3014633640))
chatgpt-qq-mirai-1       | 2023-02-28 14:04:41 I/Bot.3014633640: Bot login successful.
chatgpt-qq-mirai-1       | 2023-02-28 14:04:41 I/main: mirai-console started successfully.
chatgpt-qq-mirai-1       | > 2023-02-28 14:04:41 W/console: Closing input service...

这里是config.cfg

# 这里是 ChatGPT for QQ 的所有配置文件
# 请注意:以 "#" 开头的文本均为注释
# 不会被程序读取
# 如果你想要使用某个设置,请确保前面没有 "#" 号

[mirai]
qq = 3014633***

# manager_qq = 请修改为机器人管理员的QQ号

# 以下设置如果不了解,可以不用理会
api_key = "1234567890"
http_url = "http://localhost:12000"
ws_url = "http://localhost:12000"

[openai]
# OpenAI 相关设置

# 第 1 个账号信息
[[openai.accounts]]
# 模式选择, browser - 浏览器登录, browserless = 无浏览器登录
# 如果你使用浏览器登录卡在 Found session token,就使用无浏览器登录  
mode = 'browserless'
# 你的 OpenAI 邮箱
email = "XXX" 
# 你的 OpenAI 密码
password = "XX"
......

这里是setting.yml

adapters:
  - http
  - ws

enableVerify: true
verifyKey: 1234567890 # 这里是密钥

debug: false

singleMode: false

cacheSize: 4096

adapterSettings:
  http:
    host: localhost # 这里是地址
    port: 12000        # 这里是端口
    cors: ["*"]
    unreadQueueMaxSize: 100
  ws:
    host: localhost # 这里是地址
    port: 12000        # 这里是端口
    reservedSyncId: -1

我尝试过两头主机名都改为mirai,也没有效果。
请问我是否能在哪里找到关于错误类型的信息,如
ConnectionRefusedError(111, "Connect call failed ('127.0.0.1', 12000)"))
此处的111与后续的connect call failed 是否有固定的解决方式?

@xixixi2000
Copy link

用netstat -na查看一下127.0.0.1端口的状态,看是不是LISTENING

@Shrouu
Copy link

Shrouu commented Feb 28, 2023

感谢回复,我已经解决了。我查询了端口状态,确实没有打开我设置的端口。
我在日志里找到了以下报错

chatgpt-qq-chatgpt-1     | 2023-02-28 14:59:32,212 Warning: cannot enable SSH socket upgrades
chatgpt-qq-chatgpt-1     | 2023-02-28 14:59:32,212  No module named 'paramiko'
chatgpt-qq-chatgpt-1     | 2023-02-28 14:59:32,212 created tcp socket '0.0.0.0:14500'
chatgpt-qq-chatgpt-1     | 2023-02-28 14:59:32,235 no uinput module (not usually needed)

我查询后,发现由于我是用的是docker-compose的自行部署方法,而我的部署环境是Centos7,其默认python为2.7,且没有安装以上功能包。
之后我尝试了使用一键部署命令,结果成功了。

@trainchaseCC
Copy link
Author

首先我考虑mirai的问题,因此我更换了内嵌运行环境的1.5.8-alpha版本,但是仍然出现 Websocket reconnecting in 5s...问题。
之后参考xixixi2000的建议,我查看了8080端口的状态,发现除了QQ以外还有WebSever占用,关闭后ClientConnectorError错误消失,但是仍未成功,日志如下:
Snipaste_2023-03-01_10-59-52
此后我查看127.0.0.1的状态,发现 127.0.0.1:8080处于TIME_WAIT状态,原因在这里么?

@xixixi2000
Copy link

可能是mcl有问题,建议查一下那边的log,qq是否登录成功了,有没有其他错误,两边的qq号是否一致,两边的key是否一致

@lss233
Copy link
Owner

lss233 commented Mar 2, 2023

解决此问题通常需要同时提供 Mirai 和 本程序的日志,否则只能算命

@lss233 lss233 added the question Further information is requested label Mar 2, 2023
@trainchaseCC
Copy link
Author

Mirai

 12:19:36 [INFO] iTX Technologies Mirai Console Loader version 2.1.2-61c8bd8
  12:19:36 [INFO] Runtime: OpenJDK 64-Bit Server VM 17.0.6 (arch: 64)
  12:19:36 [INFO] https://github.com/iTXTech/mirai-console-loader
  12:19:36 [INFO] This program is licensed under GNU AGPL v3
  12:19:38 [INFO] Mirai Console Loader Announcement:
Mirai Console Loader 公告栏

如果在图片上传的时候遇到问题请与我们联系 (需要提供图片文件源本)
`- 如 Unsupported image type for ExternalResource *
`  considering use gif/png/bmp/jpg format.
`- Tracker: https://github.com/mamoe/mirai/issues/new/choose

常用资源整合
`- https://mirai.mamoe.net/topic/653

MCL 已推出 2.1.0,更好的支持 Mirai 2.11 的插件系统,建议更新。

  12:19:38 [INFO] Verifying "net.mamoe:mirai-console" v2.14.0
  12:19:38 [INFO] Verifying "net.mamoe:mirai-console-terminal" v2.14.0
  12:19:39 [INFO] Verifying "net.mamoe:mirai-core-all" v2.14.0
  12:19:39 [INFO] Verifying "org.itxtech:mcl-addon" v2.1.1
  12:19:40 [INFO] Verifying "net.mamoe:mirai-api-http" v2.8.0
  12:19:40 [INFO] Verifying "xyz.cssxsh.mirai:mirai-device-generator" v1.1.3
2023-03-02 12:19:41 I/main: Starting mirai-console...
2023-03-02 12:19:41 I/main:

==================================[ Mirai consosle 2.14.0 ]===================================
 __       __ __                   __  ______                                      __
|  \     /  \  \                 |  \/      \                                    |  \
| ▓▓\   /  ▓▓\▓▓ ______   ______  \▓▓  ▓▓▓▓▓▓\ ______  _______   _______  ______ | ▓▓ ______
| ▓▓▓\ /  ▓▓▓  \/      \ |      \|  \ ▓▓   \▓▓/      \|       \ /       \/      \| ▓▓/      \
| ▓▓▓▓\  ▓▓▓▓ ▓▓  ▓▓▓▓▓▓\ \▓▓▓▓▓▓\ ▓▓ ▓▓     |  ▓▓▓▓▓▓\ ▓▓▓▓▓▓▓\  ▓▓▓▓▓▓▓  ▓▓▓▓▓▓\ ▓▓  ▓▓▓▓▓▓\
| ▓▓\▓▓ ▓▓ ▓▓ ▓▓ ▓▓   \▓▓/      ▓▓ ▓▓ ▓▓   __| ▓▓  | ▓▓ ▓▓  | ▓▓\▓▓    \| ▓▓  | ▓▓ ▓▓ ▓▓    ▓▓
| ▓▓ \▓▓▓| ▓▓ ▓▓ ▓▓     |  ▓▓▓▓▓▓▓ ▓▓ ▓▓__/  \ ▓▓__/ ▓▓ ▓▓  | ▓▓_\▓▓▓▓▓▓\ ▓▓__/ ▓▓ ▓▓ ▓▓▓▓▓▓▓▓
| ▓▓  \▓ | ▓▓ ▓▓ ▓▓      \▓▓    ▓▓ ▓▓\▓▓    ▓▓\▓▓    ▓▓ ▓▓  | ▓▓       ▓▓\▓▓    ▓▓ ▓▓\▓▓     \
 \▓▓      \▓▓\▓▓\▓▓       \▓▓▓▓▓▓▓\▓▓ \▓▓▓▓▓▓  \▓▓▓▓▓▓ \▓▓   \▓▓\▓▓▓▓▓▓▓  \▓▓▓▓▓▓ \▓▓ \▓▓▓▓▓▓▓


2023-03-02 12:19:41 I/main: Backend: version 2.14.0, built on 2023-02-06 14:25:21.
2023-03-02 12:19:41 I/main: Frontend Terminal: version 2.14.0, provided by Mamoe Technologies
2023-03-02 12:19:41 I/main: Welcome to visit https://mirai.mamoe.net/
2023-03-02 12:19:44 I/plugin: Successfully loaded plugin mirai-api-http v2.8.0
2023-03-02 12:19:44 I/plugin: Successfully loaded plugin mirai-device-generator v1.1.3
2023-03-02 12:19:44 I/plugin: Successfully loaded plugin MCL Addon v2.1.1
2023-03-02 12:19:45 I/main: Prepared built-in commands: autoLogin, help, login, logout, permission, status, stop
2023-03-02 12:19:46 I/Mirai HTTP API: ********************************************************
2023-03-02 12:19:46 I/MahKtorAdapter[http,ws]: Autoreload is disabled because the development mode is off.
2023-03-02 12:19:46 I/MahKtorAdapter[http,ws]: Application started in 0.42 seconds.
2023-03-02 12:19:46 E/MahKtorAdapter[http,ws]: java.net.BindException: Address already in use: bind
java.net.BindException: Address already in use: bind
        at java.base/sun.nio.ch.Net.bind0(Native Method)
        at java.base/sun.nio.ch.Net.bind(Unknown Source)
        at java.base/sun.nio.ch.ServerSocketChannelImpl.netBind(Unknown Source)
        at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
        at mirai-api-http-2.8.0.mirai2.jar[shared]//io.ktor.network.sockets.ConnectUtilsJvmKt.bind(ConnectUtilsJvm.kt:35)
        at mirai-api-http-2.8.0.mirai2.jar[shared]//io.ktor.network.sockets.TcpSocketBuilder.bind(TcpSocketBuilder.kt:45)
        at mirai-api-http-2.8.0.mirai2.jar[shared]//io.ktor.network.sockets.TcpSocketBuilder.bind(TcpSocketBuilder.kt:29)
        at mirai-api-http-2.8.0.mirai2.jar[shared]//io.ktor.network.sockets.TcpSocketBuilder.bind$default(TcpSocketBuilder.kt:25)
        at mirai-api-http-2.8.0.mirai2.jar[shared]//io.ktor.server.cio.backend.HttpServerKt$httpServer$acceptJob$1.invokeSuspend(HttpServer.kt:48)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
        at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
        at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

2023-03-02 12:19:46 E/mirai-api-http: kotlinx.coroutines.JobCancellationException: LazyStandaloneCoroutine is cancelling; job=LazyStandaloneCoroutine{Cancelling}@781dbe44
kotlinx.coroutines.JobCancellationException: LazyStandaloneCoroutine is cancelling; job=LazyStandaloneCoroutine{Cancelling}@781dbe44
Caused by: java.net.BindException: Address already in use: bind
        at java.base/sun.nio.ch.Net.bind0(Native Method)
        at java.base/sun.nio.ch.Net.bind(Unknown Source)
        at java.base/sun.nio.ch.ServerSocketChannelImpl.netBind(Unknown Source)
        at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
        at mirai-api-http-2.8.0.mirai2.jar[shared]//io.ktor.network.sockets.ConnectUtilsJvmKt.bind(ConnectUtilsJvm.kt:35)
        at mirai-api-http-2.8.0.mirai2.jar[shared]//io.ktor.network.sockets.TcpSocketBuilder.bind(TcpSocketBuilder.kt:45)
        at mirai-api-http-2.8.0.mirai2.jar[shared]//io.ktor.network.sockets.TcpSocketBuilder.bind(TcpSocketBuilder.kt:29)
        at mirai-api-http-2.8.0.mirai2.jar[shared]//io.ktor.network.sockets.TcpSocketBuilder.bind$default(TcpSocketBuilder.kt:25)
        at mirai-api-http-2.8.0.mirai2.jar[shared]//io.ktor.server.cio.backend.HttpServerKt$httpServer$acceptJob$1.invokeSuspend(HttpServer.kt:48)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
        at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
        at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

2023-03-02 12:19:47 I/MCL Addon: iTXTech MCL Version: 2.1.2-61c8bd8
2023-03-02 12:19:47 W/MCL Addon: iTXTech Soyuz 未安装,Soyuz MCL Handler 特性已禁用
2023-03-02 12:19:47 I/main: 2 plugin(s) enabled.
2023-03-02 12:19:47 I/main: mirai-console started successfully.

ChatGpt

2023-03-02 12:27:00.443 | INFO     | launart.manager:launch_blocking:479 - Starting launart main task...
2023-03-02 12:27:00.443 | INFO     | launart.manager:launch:331 - Launching 5 components as async task...
2023-03-02 12:27:00.513 | INFO     | graia.ariadne.service:base_telemetry:108 -
    _         _           _
   / \   _ __(_) __ _  __| |_ __   ___
  / _ \ | '__| |/ _` |/ _` | '_ \ / _ \
 / ___ \| |  | | (_| | (_| | | | |  __/
/_/   \_\_|  |_|\__,_|\__,_|_| |_|\___|

graia-amnesia: 0.7.1
graia-ariadne: 0.11.0
graia-broadcast: 0.19.1
launart: 0.6.3
statv: 0.3.2
2023-03-02 12:27:00.523 | SUCCESS  | launart.manager:launch:384 - Layer #1:[http.client/aiohttp, cache.client/memcache] preparation completed.
2023-03-02 12:27:00.523 | INFO     | __main__:start_background:162 - OpenAI 服务器登录中……
2023-03-02 12:27:00.523 | INFO     | manager:login:116 - 正在登录第 1 个 OpenAI 账号
2023-03-02 12:27:00.523 | INFO     | manager:__login_V1:175 - 模式:无浏览器登录
2023-03-02 12:27:00.523 | INFO     | manager:__login_V1:198 - 尝试使用 access_token 登录中...
2023-03-02 12:27:01.910 | SUCCESS  | manager:login:127 - 登录成功!
2023-03-02 12:27:01.910 | DEBUG    | manager:login:128 - 等待 8 秒……
2023-03-02 12:27:09.922 | SUCCESS  | manager:login:146 - 成功登录 1/1 个账号!
2023-03-02 12:27:09.922 | ERROR    | config:scan_presets:182 - 检查预设:正常 <==> presets/default.txt [失败:文件不存在]
2023-03-02 12:27:09.922 | SUCCESS  | config:scan_presets:180 - 检查预设:猫娘 <==> presets/catgirl.txt [成功]
2023-03-02 12:27:09.922 | SUCCESS  | config:scan_presets:193 - 注册预设:bing <==> ./presets/assistant\bing.txt [成功]
2023-03-02 12:27:09.922 | SUCCESS  | config:scan_presets:193 - 注册预设:debater <==> ./presets/assistant\debater.txt [ 成功]
2023-03-02 12:27:09.922 | SUCCESS  | config:scan_presets:193 - 注册预设:default <==> ./presets/assistant\default.txt [ 成功]
2023-03-02 12:27:09.932 | SUCCESS  | config:scan_presets:193 - 注册预设:lawyer <==> ./presets/assistant\lawyer.txt [成 功]
2023-03-02 12:27:09.932 | SUCCESS  | config:scan_presets:193 - 注册预设:Lss233 <==> ./presets/assistant\Lss233.txt [成 功]
2023-03-02 12:27:09.932 | SUCCESS  | config:scan_presets:193 - 注册预设:novelist <==> ./presets/assistant\novelist.txt [成功]
2023-03-02 12:27:09.942 | SUCCESS  | config:scan_presets:193 - 注册预设:poet <==> ./presets/assistant\poet.txt [成功]
2023-03-02 12:27:09.942 | SUCCESS  | config:scan_presets:193 - 注册预设:shineisheji <==> ./presets/assistant\shineisheji.txt [成功]
2023-03-02 12:27:09.942 | SUCCESS  | config:scan_presets:193 - 注册预设:catgirl <==> ./presets/role-play\catgirl.txt [ 成功]
2023-03-02 12:27:09.942 | SUCCESS  | config:scan_presets:193 - 注册预设:crazy <==> ./presets/role-play\crazy.txt [成功]
2023-03-02 12:27:09.952 | SUCCESS  | config:scan_presets:193 - 注册预设:debatestick <==> ./presets/role-play\debatestick.txt [成功]
2023-03-02 12:27:09.952 | SUCCESS  | config:scan_presets:193 - 注册预设:dingzhen <==> ./presets/role-play\dingzhen.txt [成功]
2023-03-02 12:27:09.952 | SUCCESS  | config:scan_presets:193 - 注册预设:DJ <==> ./presets/role-play\DJ.txt [成功]
2023-03-02 12:27:09.952 | SUCCESS  | config:scan_presets:193 - 注册预设:gaoqiqiang <==> ./presets/role-play\gaoqiqiang.txt [成功]
2023-03-02 12:27:09.962 | SUCCESS  | config:scan_presets:193 - 注册预设:hanli <==> ./presets/role-play\hanli.txt [成功]
2023-03-02 12:27:09.962 | SUCCESS  | config:scan_presets:193 - 注册预设:huxijin <==> ./presets/role-play\huxijin.txt [ 成功]
2023-03-02 12:27:09.972 | SUCCESS  | config:scan_presets:193 - 注册预设:ikun <==> ./presets/role-play\ikun.txt [成功]
2023-03-02 12:27:09.972 | SUCCESS  | config:scan_presets:193 - 注册预设:MOSS <==> ./presets/role-play\MOSS.txt [成功]
2023-03-02 12:27:09.972 | SUCCESS  | config:scan_presets:193 - 注册预设:welldone <==> ./presets/role-play\welldone.txt [成功]
2023-03-02 12:27:09.972 | SUCCESS  | config:scan_presets:193 - 注册预设:zhangweiwei <==> ./presets/role-play\zhangweiwei.txt [成功]
2023-03-02 12:27:09.972 | ERROR    | config:scan_presets:190 - 注册预设:catgirl <==> ./presets/catgirl.txt [失败:关键 词已存在]
2023-03-02 12:27:09.982 | SUCCESS  | config:scan_presets:193 - 注册预设:预设模板 <==> ./presets/预设模板.txt [成功]
2023-03-02 12:27:09.982 | INFO     | __main__:start_background:167 - OpenAI 服务器登录成功
2023-03-02 12:27:09.982 | INFO     | __main__:start_background:168 - 尝试从 Mirai 服务中读取机器人 QQ 的 session key……
2023-03-02 12:27:09.992 | SUCCESS  | launart.manager:launch:384 - Layer #3:[elizabeth.service] preparation completed.
2023-03-02 12:27:09.992 | INFO     | launart.manager:launch:389 - All components prepared, start blocking phase.
2023-03-02 12:27:12.041 | ERROR    | graia.amnesia.builtins.aiohttp:connection_manage:231 - 404, message='Invalid response status', url=URL('http://localhost:8080/all?qq=1299257736&verifyKey=1234567890')
Traceback (most recent call last):

  File "F:\Chatgpt_QQ\Windows-quickstart-refs.tags.v1.5.8-alpha\chatgpt\bot.py", line 171, in <module>
    app.launch_blocking()
    │   └ <classmethod object at 0x000001748A262910>
    └ <graia.ariadne.app.Ariadne object at 0x00000174870AE0D0>

  File "F:\Chatgpt_QQ\Windows-quickstart-refs.tags.v1.5.8-alpha\chatgpt\python3.9\lib\site-packages\graia\ariadne\app.py", line 312, in launch_blocking
    cls.launch_manager.launch_blocking(loop=cls.service.loop, stop_signal=stop_signals)
    │   │              │                    │   │       │                 └ (<Signals.SIGINT: 2>,)
    │   │              │                    │   │       └ <property object at 0x000001748A26E770>
    │   │              │                    │   └ <graia.ariadne.service.ElizabethService object at 0x00000174B04D68B0>
    │   │              │                    └ <class 'graia.ariadne.app.Ariadne'>
    │   │              └ <function Launart.launch_blocking at 0x0000017489652670>
    │   └ <launart.manager.Launart object at 0x00000174B0775FA0>
    └ <class 'graia.ariadne.app.Ariadne'>

  File "F:\Chatgpt_QQ\Windows-quickstart-refs.tags.v1.5.8-alpha\chatgpt\python3.9\lib\site-packages\launart\manager.py", line 494, in launch_blocking
    loop.run_until_complete(launch_task)
    │    │                  └ <Task pending name='amnesia-launch' coro=<Launart.launch() running at F:\Chatgpt_QQ\Windows-quickstart-refs.tags.v1.5.8-alpha...
    │    └ <function BaseEventLoop.run_until_complete at 0x000001748902E9D0>
    └ <ProactorEventLoop running=True closed=False debug=False>

  File "asyncio\base_events.py", line 634, in run_until_complete
    ', '.join(str(exc) for exc in exceptions)))
                                  └ <module 'asyncio.exceptions' from 'F:\\Chatgpt_QQ\\Windows-quickstart-refs.tags.v1.5.8-alpha\\chatgpt\\python3.9\\python39.zi...

  File "asyncio\windows_events.py", line 321, in run_forever

  File "asyncio\base_events.py", line 601, in run_forever
    exc.errno, 'error while '

  File "asyncio\base_events.py", line 1905, in _run_once

  File "asyncio\events.py", line 80, in _run
    self._loop = loop
    │    └ <member '_loop' of 'Handle' objects>
    └ <Handle <TaskWakeupMethWrapper object at 0x00000174B07EB3A0>(<Future finished result=None>)>

> File "F:\Chatgpt_QQ\Windows-quickstart-refs.tags.v1.5.8-alpha\chatgpt\python3.9\lib\site-packages\graia\amnesia\builtins\aiohttp.py", line 217, in connection_manage
    await self._start_conn()
          │    └ <function AiohttpClientConnectionRider._start_conn at 0x000001748A11E940>
          └ <graia.amnesia.builtins.aiohttp.AiohttpClientConnectionRider object at 0x00000174B07A4580>

  File "F:\Chatgpt_QQ\Windows-quickstart-refs.tags.v1.5.8-alpha\chatgpt\python3.9\lib\site-packages\graia\amnesia\builtins\aiohttp.py", line 180, in _start_conn
    self.response = await self.conn_func(**self.call_param)
    │    │                │    │           │    └ {'url': 'http://localhost:8080/all?qq=1299257736&verifyKey=1234567890', 'heartbeat': 30.0}
    │    │                │    │           └ <graia.amnesia.builtins.aiohttp.AiohttpClientConnectionRider object at 0x00000174B07A4580>
    │    │                │    └ <bound method ClientSession.ws_connect of <aiohttp.client.ClientSession object at 0x00000174B07997C0>>
    │    │                └ <graia.amnesia.builtins.aiohttp.AiohttpClientConnectionRider object at 0x00000174B07A4580>
    │    └ None
    └ <graia.amnesia.builtins.aiohttp.AiohttpClientConnectionRider object at 0x00000174B07A4580>

  File "F:\Chatgpt_QQ\Windows-quickstart-refs.tags.v1.5.8-alpha\chatgpt\python3.9\lib\site-packages\aiohttp\client.py", line 795, in _ws_connect
    raise WSServerHandshakeError(
          └ <class 'aiohttp.client_exceptions.WSServerHandshakeError'>

aiohttp.client_exceptions.WSServerHandshakeError: 404, message='Invalid response status', url=URL('http://localhost:8080/all?qq=1299257736&verifyKey=1234567890')
2023-03-02 12:27:12.131 | WARNING  | graia.ariadne.connection.ws:_:76 - Websocket reconnecting in 5s...
2023-03-02 12:27:17.140 | WARNING  | graia.ariadne.connection.ws:_:78 - Websocket reconnecting...
2023-03-02 12:27:17.140 | ERROR    | graia.amnesia.builtins.aiohttp:connection_manage:231 - 404, message='Invalid response status', url=URL('http://localhost:8080/all?qq=1299257736&verifyKey=1234567890')

@lss233
Copy link
Owner

lss233 commented Mar 2, 2023

Address already in use: bind
mirai api http 启动失败了,参考 #142 (comment)

@trainchaseCC
Copy link
Author

解决掉占用8080端口的问题后,再次尝试,不会出现Address already in use: bind的错误,但是仍然Websocket reconnecting in 5s的问题,尝试多个版本仍然如此。感谢各位开发者对此问题的建议,我一一尝试。

2023-03-02 19:14:28 I/main: Backend: version 2.14.0, built on 2023-02-06 14:25:21.
2023-03-02 19:14:28 I/main: Frontend Terminal: version 2.14.0, provided by Mamoe Technologies
2023-03-02 19:14:28 I/main: Welcome to visit https://mirai.mamoe.net/
2023-03-02 19:14:29 I/plugin: Successfully loaded plugin mirai-api-http v2.8.0
2023-03-02 19:14:29 I/plugin: Successfully loaded plugin mirai-device-generator v1.1.3
2023-03-02 19:14:29 I/plugin: Successfully loaded plugin MCL Addon v2.1.1
2023-03-02 19:14:29 I/main: Prepared built-in commands: autoLogin, help, login, logout, permission, status, stop
2023-03-02 19:14:29 I/Mirai HTTP API: ********************************************************
2023-03-02 19:14:29 I/MahKtorAdapter[http,ws]: Autoreload is disabled because the development mode is off.
2023-03-02 19:14:30 I/MahKtorAdapter[http,ws]: Application started in 0.207 seconds.
2023-03-02 19:14:30 I/MahKtorAdapter[http,ws]: Responding at http://localhost:8080
2023-03-02 19:14:30 I/http adapter: >>> [http adapter] is listening at http://localhost:8080
2023-03-02 19:14:30 I/ws adapter: >>> [ws adapter] is listening at ws://localhost:8080
2023-03-02 19:14:30 I/Mirai HTTP API: Http api server is running out of verify mode
2023-03-02 19:14:30 I/Mirai HTTP API: adaptors: [http,ws]
2023-03-02 19:14:30 I/Mirai HTTP API: ********************************************************
2023-03-02 19:14:30 I/MCL Addon: iTXTech MCL Version: 2.1.2-61c8bd8
2023-03-02 19:14:30 W/MCL Addon: iTXTech Soyuz 未安装,Soyuz MCL Handler 特性已禁用
2023-03-02 19:14:30 I/main: 3 plugin(s) enabled.
2023-03-02 19:14:30 I/main: mirai-console started successfully.

@lss233
Copy link
Owner

lss233 commented Mar 3, 2023

解决掉占用8080端口的问题后,再次尝试,不会出现Address already in use: bind的错误,但是仍然Websocket reconnecting in 5s的问题,尝试多个版本仍然如此。感谢各位开发者对此问题的建议,我一一尝试。

2023-03-02 19:14:28 I/main: Backend: version 2.14.0, built on 2023-02-06 14:25:21.
2023-03-02 19:14:28 I/main: Frontend Terminal: version 2.14.0, provided by Mamoe Technologies
2023-03-02 19:14:28 I/main: Welcome to visit https://mirai.mamoe.net/
2023-03-02 19:14:29 I/plugin: Successfully loaded plugin mirai-api-http v2.8.0
2023-03-02 19:14:29 I/plugin: Successfully loaded plugin mirai-device-generator v1.1.3
2023-03-02 19:14:29 I/plugin: Successfully loaded plugin MCL Addon v2.1.1
2023-03-02 19:14:29 I/main: Prepared built-in commands: autoLogin, help, login, logout, permission, status, stop
2023-03-02 19:14:29 I/Mirai HTTP API: ********************************************************
2023-03-02 19:14:29 I/MahKtorAdapter[http,ws]: Autoreload is disabled because the development mode is off.
2023-03-02 19:14:30 I/MahKtorAdapter[http,ws]: Application started in 0.207 seconds.
2023-03-02 19:14:30 I/MahKtorAdapter[http,ws]: Responding at http://localhost:8080
2023-03-02 19:14:30 I/http adapter: >>> [http adapter] is listening at http://localhost:8080
2023-03-02 19:14:30 I/ws adapter: >>> [ws adapter] is listening at ws://localhost:8080
2023-03-02 19:14:30 I/Mirai HTTP API: Http api server is running out of verify mode
2023-03-02 19:14:30 I/Mirai HTTP API: adaptors: [http,ws]
2023-03-02 19:14:30 I/Mirai HTTP API: ********************************************************
2023-03-02 19:14:30 I/MCL Addon: iTXTech MCL Version: 2.1.2-61c8bd8
2023-03-02 19:14:30 W/MCL Addon: iTXTech Soyuz 未安装,Soyuz MCL Handler 特性已禁用
2023-03-02 19:14:30 I/main: 3 plugin(s) enabled.
2023-03-02 19:14:30 I/main: mirai-console started successfully.

你这没登录啊……

@Pretend-to
Copy link

同问,更新完就这样了(之前自己用docker-compose部署也遇到过,后来改成一键部署就解决了)
QQ截图20230304085039
QQ截图20230304085129
QQ截图20230304085311
QQ截图20230304085455

@lss233
Copy link
Owner

lss233 commented Mar 4, 2023

同问,更新完就这样了(之前自己用docker-compose部署也遇到过,后来改成一键部署就解决了) QQ截图20230304085039 QQ截图20230304085129 QQ截图20230304085311 QQ截图20230304085455

你这是 api key 不对啊,一个有 0 一个没有 0。

@Pretend-to
Copy link

同问,更新完就这样了(之前自己用docker-compose部署也遇到过,后来改成一键部署就解决了) QQ截图20230304085039 QQ截图20230304085129 QQ截图20230304085311 QQ截图20230304085455

你这是 api key 不对啊,一个有 0 一个没有 0。

不好意思,没有看出来,请问哪里不对
QQ截图20230304160512
QQ截图20230304160538

@CWM145548
Copy link

CWM145548 commented Mar 12, 2023

image
卡在这一步,All components prepared, start blocking phase. 没有下文,bot登录成功,但是不回复消息
一.前置操作:更换了登录协议。
https://github.com/cssxsh/fix-protocol-version/releases/tag/v1.2.0
使用新的fix-protocal版本加MACOS协议,成功登陆qq。
下载了文件fix-protocol-version-1.2.0.mirai2.jar,把它复制到miria目录下中的plugins,然后重启mirai用macos协议登陆。

二.mirai运行日志:
13:15:07 [INFO] iTX Technologies Mirai Console Loader version 2.1.2-61c8bd8
13:15:07 [INFO] Runtime: OpenJDK 64-Bit Server VM 17.0.6 (arch: 64)
13:15:07 [INFO] https://github.com/iTXTech/mirai-console-loader
13:15:07 [INFO] This program is licensed under GNU AGPL v3
13:15:07 [ERROR] Failed to fetch announcement for "xyz.cssxsh.mirai:fix-protocol-version"
13:15:07 [INFO] Mirai Console Loader Announcement:
Mirai Console Loader 公告栏

如果在图片上传的时候遇到问题请与我们联系 (需要提供图片文件源本)
- 如 Unsupported image type for ExternalResource * considering use gif/png/bmp/jpg format.
`- Tracker: https://github.com/mamoe/mirai/issues/new/choose

常用资源整合
`- https://mirai.mamoe.net/topic/653

MCL 已推出 2.1.0,更好的支持 Mirai 2.11 的插件系统,建议更新。

13:15:07 [INFO] Verifying "net.mamoe:mirai-console" v2.14.0
13:15:08 [INFO] Verifying "net.mamoe:mirai-console-terminal" v2.14.0
13:15:08 [INFO] Verifying "net.mamoe:mirai-core-all" v2.14.0
13:15:09 [INFO] Verifying "org.itxtech:mcl-addon" v2.1.1
13:15:09 [INFO] Verifying "net.mamoe:mirai-api-http" v2.9.1
13:15:09 [INFO] Verifying "xyz.cssxsh.mirai:mirai-device-generator" v1.1.3
13:15:09 [INFO] Verifying "xyz.cssxsh.mirai:fix-protocol-version"
13:15:09 [ERROR] Failed to verify package "xyz.cssxsh.mirai:fix-protocol-version"
13:15:09 [ERROR] com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:395)
at com.google.gson.Gson.fromJson(Gson.java:1214)
at com.google.gson.Gson.fromJson(Gson.java:1124)
at com.google.gson.Gson.fromJson(Gson.java:1034)
at com.google.gson.Gson.fromJson(Gson.java:1001)
at org.itxtech.mcl.component.Repository.fetchPackage(Repository.java:84)
at org.itxtech.mcl.module.builtin.RepoCache$RepoWithCache.fetchPackage(RepoCache.java:88)
at org.itxtech.mcl.module.builtin.Updater.check(Updater.java:101)
at org.itxtech.mcl.module.builtin.Updater.load(Updater.java:60)
at org.itxtech.mcl.module.ModuleManager.phaseLoad(ModuleManager.java:117)
at org.itxtech.mcl.Loader.lambda$start$3(Loader.java:190)
at org.itxtech.mcl.Loader.tryCatching(Loader.java:151)
at org.itxtech.mcl.Loader.start(Loader.java:190)
at org.itxtech.mcl.Loader.main(Loader.java:84)
Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:393)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:384)
... 13 more

2023-03-12 13:15:11 I/main: Starting mirai-console...
2023-03-12 13:15:11 I/main:

==================================[ Mirai consosle 2.14.0 ]===================================


| \ / \ \ | / \ |
| ▓▓\ / ▓▓\▓▓ ______ ______ \▓▓ ▓▓▓▓▓▓\ ______ _______ _______ ______ | ▓▓ ______
| ▓▓▓\ / ▓▓▓ / \ | | \ ▓▓ \▓▓/ | \ / / | ▓▓/
| ▓▓▓▓\ ▓▓▓▓ ▓▓ ▓▓▓▓▓▓\ \▓▓▓▓▓▓\ ▓▓ ▓▓ | ▓▓▓▓▓▓\ ▓▓▓▓▓▓▓\ ▓▓▓▓▓▓▓ ▓▓▓▓▓▓\ ▓▓ ▓▓▓▓▓▓
| ▓▓\▓▓ ▓▓ ▓▓ ▓▓ ▓▓ \▓▓/ ▓▓ ▓▓ ▓▓ | ▓▓ | ▓▓ ▓▓ | ▓▓\▓▓ | ▓▓ | ▓▓ ▓▓ ▓▓ ▓▓
| ▓▓ \▓▓▓| ▓▓ ▓▓ ▓▓ | ▓▓▓▓▓▓▓ ▓▓ ▓▓
/ \ ▓▓__/ ▓▓ ▓▓ | ▓▓_\▓▓▓▓▓▓\ ▓▓__/ ▓▓ ▓▓ ▓▓▓▓▓▓▓▓
| ▓▓ \▓ | ▓▓ ▓▓ ▓▓ \▓▓ ▓▓ ▓▓\▓▓ ▓▓\▓▓ ▓▓ ▓▓ | ▓▓ ▓▓\▓▓ ▓▓ ▓▓\▓▓
\▓▓ \▓▓\▓▓\▓▓ \▓▓▓▓▓▓▓\▓▓ \▓▓▓▓▓▓ \▓▓▓▓▓▓ \▓▓ \▓▓\▓▓▓▓▓▓▓ \▓▓▓▓▓▓ \▓▓ \▓▓▓▓▓▓▓

2023-03-12 13:15:11 I/main: Backend: version 2.14.0, built on 2023-02-06 14:25:21.
2023-03-12 13:15:11 I/main: Frontend Terminal: version 2.14.0, provided by Mamoe Technologies
2023-03-12 13:15:11 I/main: Welcome to visit https://mirai.mamoe.net/
2023-03-12 13:15:11 W/fix-protocol-version: Mirai版本低于预期,将升级协议版本
2023-03-12 13:15:11 I/plugin: Successfully loaded plugin fix-protocol-version v1.2.0
2023-03-12 13:15:11 I/plugin: Successfully loaded plugin mirai-api-http v2.9.1
2023-03-12 13:15:11 I/plugin: Successfully loaded plugin mirai-device-generator v1.1.3
2023-03-12 13:15:11 I/plugin: Successfully loaded plugin MCL Addon v2.1.1
2023-03-12 13:15:11 I/main: Prepared built-in commands: autoLogin, help, login, logout, permission, status, stop
2023-03-12 13:15:11 I/fix-protocol-version: 当前各协议版本日期:
ANDROID_PHONE 8.9.33.10335 2023-01-13T16:51:38+08:00
ANDROID_PAD 8.9.33.10335 2023-01-13T16:51:38+08:00
ANDROID_WATCH 2.0.5 2019-06-03T20:25:31+08:00
IPAD 5.8.9 2020-07-27T15:50:08+08:00
MACOS 5.8.9 2020-07-27T15:50:08+08:00

2023-03-12 13:15:11 I/Mirai HTTP API: ********************************************************
2023-03-12 13:15:11 I/MahKtorAdapter[http,ws]: Autoreload is disabled because the development mode is off.
2023-03-12 13:15:12 I/MahKtorAdapter[http,ws]: Application started in 0.106 seconds.
2023-03-12 13:15:12 I/MahKtorAdapter[http,ws]: Responding at http://localhost:8080
2023-03-12 13:15:12 I/http adapter: >>> [http adapter] is listening at http://localhost:8080
2023-03-12 13:15:12 I/ws adapter: >>> [ws adapter] is listening at ws://localhost:8080
2023-03-12 13:15:12 I/Mirai HTTP API: Http api server is running out of verify mode
2023-03-12 13:15:12 I/Mirai HTTP API: adaptors: [http,ws]
2023-03-12 13:15:12 I/Mirai HTTP API: ********************************************************
2023-03-12 13:15:12 I/MCL Addon: iTXTech MCL Version: 2.1.2-61c8bd8
2023-03-12 13:15:12 W/MCL Addon: iTXTech Soyuz 未安装,Soyuz MCL Handler 特性已禁用
2023-03-12 13:15:12 I/main: 4 plugin(s) enabled.
2023-03-12 13:15:12 I/main: mirai-console started successfully.

login 239******* z******** MACOS
2023-03-12 13:18:08 I/Bot.2390947336: Loaded account secrets from local cache.
2023-03-12 13:18:09 I/Bot.2390947336: Saved account secrets to local cache for fast login.
2023-03-12 13:18:09 I/Bot.2390947336: Login successful.
2023-03-12 13:18:09 V/Bot.2390947336: Event: BotOnlineEvent(bot=Bot(2390947336))
2023-03-12 13:18:09 I/Bot.2390947336: Bot login successful.
Abd (2390947336) Login successful

三.chatgpt运行日志
2023-03-12 13:13:32.553 | ERROR | config:scan_presets:264 - 检查预设:正常 <==> presets/default.txt [失败:文件不存在]
2023-03-12 13:13:32.554 | SUCCESS | config:scan_presets:262 - 检查预设:猫娘 <==> presets/catgirl.txt [成功]
2023-03-12 13:13:32.555 | SUCCESS | config:scan_presets:275 - 注册预设:bing <==> ./presets/assistant\bing.txt [成功]
2023-03-12 13:13:32.556 | SUCCESS | config:scan_presets:275 - 注册预设:debater <==> ./presets/assistant\debater.txt [ 成功]
2023-03-12 13:13:32.557 | SUCCESS | config:scan_presets:275 - 注册预设:default <==> ./presets/assistant\default.txt [ 成功]
2023-03-12 13:13:32.558 | SUCCESS | config:scan_presets:275 - 注册预设:lawyer <==> ./presets/assistant\lawyer.txt [成 功]
2023-03-12 13:13:32.558 | SUCCESS | config:scan_presets:275 - 注册预设:Lss233 <==> ./presets/assistant\Lss233.txt [成 功]
2023-03-12 13:13:32.559 | SUCCESS | config:scan_presets:275 - 注册预设:novelist <==> ./presets/assistant\novelist.txt [成功]
2023-03-12 13:13:32.560 | SUCCESS | config:scan_presets:275 - 注册预设:poet <==> ./presets/assistant\poet.txt [成功]
2023-03-12 13:13:32.560 | SUCCESS | config:scan_presets:275 - 注册预设:shineisheji <==> ./presets/assistant\shineisheji.txt [成功]
2023-03-12 13:13:32.561 | SUCCESS | config:scan_presets:275 - 注册预设:catgirl <==> ./presets/role-play\catgirl.txt [ 成功]
2023-03-12 13:13:32.562 | SUCCESS | config:scan_presets:275 - 注册预设:crazy <==> ./presets/role-play\crazy.txt [成功]
2023-03-12 13:13:32.562 | SUCCESS | config:scan_presets:275 - 注册预设:debatestick <==> ./presets/role-play\debatestick.txt [成功]
2023-03-12 13:13:32.563 | SUCCESS | config:scan_presets:275 - 注册预设:dingzhen <==> ./presets/role-play\dingzhen.txt [成功]
2023-03-12 13:13:32.564 | SUCCESS | config:scan_presets:275 - 注册预设:DJ <==> ./presets/role-play\DJ.txt [成功]
2023-03-12 13:13:32.564 | SUCCESS | config:scan_presets:275 - 注册预设:gaoqiqiang <==> ./presets/role-play\gaoqiqiang.txt [成功]
2023-03-12 13:13:32.565 | SUCCESS | config:scan_presets:275 - 注册预设:hanli <==> ./presets/role-play\hanli.txt [成功]
2023-03-12 13:13:32.566 | SUCCESS | config:scan_presets:275 - 注册预设:huxijin <==> ./presets/role-play\huxijin.txt [ 成功]
2023-03-12 13:13:32.566 | SUCCESS | config:scan_presets:275 - 注册预设:ikun <==> ./presets/role-play\ikun.txt [成功]
2023-03-12 13:13:32.567 | SUCCESS | config:scan_presets:275 - 注册预设:MOSS <==> ./presets/role-play\MOSS.txt [成功]
2023-03-12 13:13:32.568 | SUCCESS | config:scan_presets:275 - 注册预设:welldone <==> ./presets/role-play\welldone.txt [成功]
2023-03-12 13:13:32.569 | SUCCESS | config:scan_presets:275 - 注册预设:zhangweiwei <==> ./presets/role-play\zhangweiwei.txt [成功]
2023-03-12 13:13:32.570 | ERROR | config:scan_presets:272 - 注册预设:catgirl <==> ./presets/catgirl.txt [失败:关键 词已存在]
2023-03-12 13:13:32.576 | SUCCESS | config:scan_presets:275 - 注册预设:预设模板 <==> ./presets/预设模板.txt [成功]
2023-03-12 13:13:32.577 | INFO | main::16 - 检测到 mirai 配置,将以 mirai 模式启动……
2023-03-12 13:13:32.781 | INFO | launart.manager:launch_blocking:479 - Starting launart main task...
2023-03-12 13:13:32.782 | INFO | launart.manager:launch:331 - Launching 5 components as async task...
2023-03-12 13:13:32.833 | INFO | graia.ariadne.service:base_telemetry:108 -
_ _ _
/ \ _ _(_) __ _ | | __ ___
/ _ \ | '
| |/ |/ _ | ' \ / _
/ ___ | | | | (| | (| | | | | /
// __| ||_,|_,|| ||_
|

graia-amnesia: 0.7.1
graia-ariadne: 0.11.1
graia-broadcast: 0.19.1
launart: 0.6.3
statv: 0.3.2
2023-03-12 13:13:32.837 | INFO | launart.manager:_launchable_task_done_callback:68 - [elizabeth.connection.2390947336.websocket_server_connection] completed.
2023-03-12 13:13:32.838 | INFO | graia.amnesia.builtins.aiohttp:launch:513 - starting server on localhost:8554
2023-03-12 13:13:32.839 | SUCCESS | launart.manager:launch:384 - Layer #1:[http.server/aiohttp, cache.client/memcache, http.client/aiohttp] preparation completed.
2023-03-12 13:13:32.841 | INFO | ariadne_bot:start_background:129 - OpenAI 服务器登录中……
2023-03-12 13:13:32.841 | INFO | manager.bot:__check_proxy:169 - 正在检查代理配置:http://26.26.26.1:8080
2023-03-12 13:13:32.844 | INFO | manager.bot:login_openai:107 - 正在登录第 1 个 OpenAI 账号
2023-03-12 13:13:32.845 | INFO | manager.bot:__login_openai_apikey:247 - 尝试使用 api_key 登录中...
2023-03-12 13:13:34.785 | SUCCESS | manager.bot:login_openai:122 - 登录成功!
2023-03-12 13:13:34.787 | SUCCESS | manager.bot:login_openai:139 - 成功登录 1/1 个 OpenAI 账号!
2023-03-12 13:13:34.788 | INFO | manager.bot:login:78 - AI 类型:chatgpt-web - 可用账号: 0 个
2023-03-12 13:13:34.789 | INFO | manager.bot:login:78 - AI 类型:openai-api - 可用账号: 1 个
2023-03-12 13:13:34.789 | INFO | manager.bot:login:78 - AI 类型:bing-cookie - 可用账号: 0 个
2023-03-12 13:13:34.790 | INFO | ariadne_bot:start_background:134 - OpenAI 服务器登录成功
2023-03-12 13:13:34.792 | INFO | ariadne_bot:start_background:135 - 尝试从 Mirai 服务中读取机器人 QQ 的 session key ……
2023-03-12 13:13:34.793 | SUCCESS | launart.manager:launch:384 - Layer #3:[elizabeth.service] preparation completed.
2023-03-12 13:13:34.794 | INFO | launart.manager:launch:389 - All components prepared, start blocking phase.

四.config文件,我使用的是api登录,只在截图中有修改,未截图的部分未做修改
image

@deadpool3x3
Copy link

解决了吗?求解决方法

@lss233 lss233 added the stale label May 17, 2023
@lss233
Copy link
Owner

lss233 commented May 17, 2023

此issue过于遥远,已close。
现在的最新版本已经默认配置好了 mirai连接的相关设置,不需要手动配置即可使用。
如果还有问题,可以尝试恢复到默认配置,并确保正确启动了程序。

@lss233 lss233 closed this as not planned Won't fix, can't repro, duplicate, stale May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested stale
Projects
None yet
Development

No branches or pull requests

8 participants