AstrBot icon indicating copy to clipboard operation
AstrBot copied to clipboard

[Bug]端口被自身占用

Open SYxiaomu opened this issue 6 months ago • 8 comments

What happened / 发生了什么

本来运行正常的,在系统配置里面把”启用文件日志“打开后自动重启就一直报错端口被占用,重启、更新astrbot都没用,只能修改端口

Reproduce / 如何复现?

只是启动

AstrBot version, deployment method (e.g., Windows Docker Desktop deployment), provider used, and messaging platform used. / AstrBot 版本、部署方式(如 Windows Docker Desktop 部署)、使用的提供商、使用的消息平台适配器

版本:4.24.2、4.25.0 部署方式:手动部署 消息平台:napcat

OS

Windows

Logs / 报错日志

PS G:\Bot\Astrbot\3.西格莉卡> uv run main.py [01:28:29.436] [Core] [DBUG] [platform.register:60]: Platform adapter registered: aiocqhttp [01:28:29.658] [Core] [DBUG] [platform.register:60]: Platform adapter registered: wecom_ai_bot [01:28:29.677] [Core] [DBUG] [platform.register:60]: Platform adapter registered: webchat [01:28:30.123] [Core] [WARN] [v4.25.0] [3.西格莉卡.main:94]: WebUI version mismatch: v4.24.2, expected v4.25.0. [01:28:30.124] [Core] [INFO] [3.西格莉卡.main:128]: ___ _... . ______ .___________. / \ / | || _ \ | _ \ / __ \ | | / ^ \ | (-------| |----| |) | | |) | | | | | ---| |---- / /\ \ \ \ | | | / | _ < | | | | | | / _____ \ .----) | | | | |\ ----.| |) | | --' | | | /__/ \__\ |_______/ |__| | _| .||/ ____/ ||

[01:28:30.124] [Core] [DBUG] [core.core_lifecycle:81]: HTTP proxy cleared [01:28:30.125] [Core] [INFO] [core.core_lifecycle:148]: AstrBot v4.25.0 [01:28:30.365] [Core] [INFO] [core.persona_mgr:38]: Loaded 3 personas. [01:28:30.390] [Core] [INFO] [star.star_manager:926]: Loading plugin astrbot_plugin_airi_voice ... [01:28:30.419] [Core] [INFO] [star.star_manager:1014]: Plugin astrbot_plugin_airi_voice (v2.3) by Lidure: 识别关键词后bot回复语音。可以存储QQ的语音消息并可通过命令发送。同时提供插件内的airi的语音,额外语音可以通过配置项或命令自己添加。支持可选 LLM 触发模式,由大模型自动选择并发送语音。 [01:28:30.424] [Core] [INFO] [astrbot_plugin_airi_voice.main:168]: [AiriVoice] 数据目录:G:\Bot\Astrbot\3.西格莉卡\data\plugin_data\astrbot_plugin_airi_voice [01:28:30.426] [Core] [INFO] [astrbot_plugin_airi_voice.main:315]: [AiriVoice] 从本地加载 5 个语音 [01:28:30.427] [Core] [DBUG] [astrbot_plugin_airi_voice.main:336]: [AiriVoice] 网页相对路径池:['files/extra_voice_pool/鹿一发.wav', 'files/extra_voice_pool/冒泡.wav', 'files/extra_voice_pool/生日快乐.wav', 'files/extra_voice_pool/西西不哭.wav', 'files/extra_voice_pool/西西跳舞.mp3'] [01:28:30.432] [Core] [DBUG] [astrbot_plugin_airi_voice.main:358]: [AiriVoice] 网页加载:'鹿一发' → G:\Bot\Astrbot\3.西格莉卡\data\plugin_data\astrbot_plugin_airi_voice\files\extra_voice_pool\鹿一发.wav [01:28:30.434] [Core] [DBUG] [astrbot_plugin_airi_voice.main:358]: [AiriVoice] 网页加载:'冒泡' → G:\Bot\Astrbot\3.西格莉卡\data\plugin_data\astrbot_plugin_airi_voice\files\extra_voice_pool\冒泡.wav [01:28:30.436] [Core] [DBUG] [astrbot_plugin_airi_voice.main:358]: [AiriVoice] 网页加载:'生日快乐' → G:\Bot\Astrbot\3.西格莉卡\data\plugin_data\astrbot_plugin_airi_voice\files\extra_voice_pool\生日快乐.wav [01:28:30.438] [Core] [DBUG] [astrbot_plugin_airi_voice.main:358]: [AiriVoice] 网页加载:'西西不哭' → G:\Bot\Astrbot\3.西格莉卡\data\plugin_data\astrbot_plugin_airi_voice\files\extra_voice_pool\西西不哭.wav [01:28:30.439] [Core] [DBUG] [astrbot_plugin_airi_voice.main:358]: [AiriVoice] 网页加载:'西西跳舞' → G:\Bot\Astrbot\3.西格莉卡\data\plugin_data\astrbot_plugin_airi_voice\files\extra_voice_pool\西西跳舞.mp3 [01:28:30.440] [Core] [INFO] [astrbot_plugin_airi_voice.main:362]: [AiriVoice] 从网页配置加载 5 个额外语音 [01:28:30.441] [Core] [INFO] [astrbot_plugin_airi_voice.main:224]: [AiriVoice] 已启用 bot 回复自动追加语音功能 [01:28:30.441] [Core] [INFO] [astrbot_plugin_airi_voice.main:226]: [AiriVoice] 初始化完成,共 10 个语音,权限模式:whitelist [01:28:30.442] [Core] [INFO] [star.star_manager:926]: Loading plugin astrbot_plugin_at_check ... [01:28:30.452] [Core] [INFO] [star.star_manager:1014]: Plugin astrbot_plugin_at_check (v1.1.0) by Foolllll: 记录群聊中最近 @ 你的消息,支持单独 @ 的上下文获取。 [01:28:30.456] [Core] [INFO] [astrbot_plugin_at_check.main:69]: [AtCheck] 插件已加载,白名单群=[],记录保留秒数=86400,单次查询上限=99,单独@上下文条数=5,后续监控时间=60s [01:28:30.457] [Core] [INFO] [star.star_manager:926]: Loading plugin astrbot_plugin_bilivideo ... [01:28:31.195] [Core] [INFO] [star.star_manager:1014]: Plugin astrbot_plugin_biliVideo (v1.0.5a) by storyAura: 提供b站视频链接自动生成一份结构化的视频总结,带有订阅up主功能并定时推送最新视频 [01:28:31.199] [Core] [INFO] [services.bilibili_login:37]: 已加载保存的 B站 Cookie [01:28:31.203] [Core] [INFO] [star.context:506]: plugin(module_path data.plugins.astrbot_plugin_bilivideo.main) added LLM tool: bilibili_search_list [01:28:31.204] [Core] [INFO] [star.context:506]: plugin(module_path data.plugins.astrbot_plugin_bilivideo.main) added LLM tool: bilibili_search_download [01:28:31.205] [Core] [INFO] [astrbot_plugin_bilivideo.main:591]: BiliVideo 插件已加载(B站已登录) [01:28:31.206] [Core] [INFO] [star.star_manager:926]: Loading plugin astrbot_plugin_dajiao ... [01:28:31.214] [Core] [INFO] [star.star_manager:1014]: Plugin 打胶 (v1.0) by 灵煞: 这是 AstrBot 的插件,让你在群里打胶。 [01:28:31.215] [Core] [INFO] [star.star_manager:1048]: Plugin 打胶 is disabled. [01:28:31.216] [Core] [INFO] [star.star_manager:926]: Loading plugin astrbot_plugin_echoscore ... [01:28:31.241] [Core] [INFO] [provider.func_tool_manager:314]: Added llm tool: score_wuthering_waves_echo [01:28:31.245] [Core] [INFO] [star.star_manager:1014]: Plugin astrbot_plugin_echoscore (3.1.5) by Loping151 & timetetng: 通过小维 API 提供快速的鸣潮声骸评分,支持图文、引用、LLM 工具调用。 [01:28:31.411] [Core] [INFO] [astrbot_plugin_echoscore.main:71]: 鸣潮声骸评分插件加载成功 [01:28:31.412] [Core] [INFO] [astrbot_plugin_echoscore.main:72]: 上下文图片缓存: 已开启, 缓存数量: 2 [01:28:31.414] [Core] [INFO] [astrbot_plugin_echoscore.main:75]: 角色别名映射: 已关闭 [01:28:31.415] [Core] [INFO] [star.star_manager:926]: Loading plugin astrbot_plugin_emoji_like ... [01:28:31.428] [Core] [INFO] [star.star_manager:1014]: Plugin astrbot_plugin_emoji_like (v2.0.0) by Zhalslar: 调用LLM判断消息的情感, 智能地给消息贴上QQ表情 [01:28:31.434] [Core] [INFO] [star.star_manager:926]: Loading plugin astrbot_plugin_endfield ... [01:28:31.863] [Core] [INFO] [star.star_manager:1014]: Plugin astrbot_plugin_endfield (2.8.0) by bvzrays & 熵增项目组: 基于森空岛 API 的终末地插件,支持便签、理智、干员面板等查询。移植自 endfield-plugin。 [01:28:33.585] [Core] [INFO] [star.star_manager:926]: Loading plugin astrbot_plugin_gscore_adapter ... [01:28:34.009] [Core] [INFO] [star.star_manager:1014]: Plugin astrbot_plugin_gscore_adapter (v0.4.7) by KimigaiiWuyi: 用于链接SayuCore(早柚核心)的适配器!适用于多种游戏功能, 原神、星铁、鸣朝、雀魂等游戏的最佳工具箱! [01:28:34.010] [Core] [INFO] [star.star_manager:926]: Loading plugin astrbot_plugin_hello_bye ... [01:28:34.018] [Core] [INFO] [star.star_manager:1014]: Plugin hello-bye (v1.11) by tinker: 进群(不同群可自定义)或退群消息提示,支持黑名单 [01:28:34.020] [Core] [INFO] [star.star_manager:926]: Loading plugin astrbot_plugin_image_replay ... [01:28:34.463] [Core] [INFO] [star.star_manager:1014]: Plugin Image Replay (1.1.0) by cuman: 支持按自定义关键词触发自定义表情,图片,随机,批量发送。 [01:28:34.469] [Core] [INFO] [star.star_manager:926]: Loading plugin astrbot_plugin_link_resolver ... [01:28:35.388] [Core] [INFO] [star.star_manager:1014]: Plugin astrbot_plugin_link_resolver (v1.0.9) by Acacia: 小红书无水印原图解析; B站视频解析; 抖音视频/图文解析 [01:28:35.388] [Core] [INFO] [astrbot_plugin_link_resolver.main:305]: ♻️ 插件重载,未发现可中断的旧解析任务 [01:28:35.392] [Core] [WARN] [v4.25.0] [xiaohongshu.render:50]: ⚠️ 小红书渲染器未找到中文字体,预览图可能出现乱码 [01:28:35.396] [Core] [INFO] [astrbot_plugin_link_resolver.main:122]: 🍪 B站 Cookie 已从配置写入文件 [01:28:35.398] [Core] [INFO] [astrbot_plugin_link_resolver.main:202]: 📹 LinkResolver 配置: 平台=抖音/小红书, B站(画质=_1080P_60,合并=关,时长<=3600s), 抖音(合并=关), 小红书(原图=开,大图转文件=30MB), 重试=3 [01:28:35.399] [Core] [INFO] [star.star_manager:926]: Loading plugin astrbot_plugin_maskoff ... [01:28:35.407] [Core] [INFO] [star.star_manager:1014]: Plugin astrbot_plugin_maskoff (v0.0.1) by Moncak: 防止你的小llm因为别人把名字改成你的就认错人 [01:28:35.407] [Core] [INFO] [astrbot_plugin_maskoff.main:25]: 识人术,黑暗心理学,社交的手腕... [01:28:35.408] [Core] [INFO] [astrbot_plugin_maskoff.main:26]: 当前加载的ID映射条目数: 0 [01:28:35.409] [Core] [INFO] [star.star_manager:926]: Loading plugin astrbot_plugin_meme_manager ... 插件目录: G:\Bot\Astrbot\3.西格莉卡\data\plugins\astrbot_plugin_meme_manager 插件数据目录: G:\Bot\Astrbot\3.西格莉卡\data\plugin_data\meme_manager 表情包目录: G:\Bot\Astrbot\3.西格莉卡\data\plugin_data\meme_manager\memes [01:28:36.165] [Core] [INFO] [star.star_manager:1014]: Plugin meme_manager (v3.20) by anka: anka - 表情包管理器 Astrbot表情包管理器3.0版本已发布! 提供便捷的 WebUI 管理界面(/表情管理 开启管理后台) , 所有 prompt 会根据修改的表情包文件夹目录自动维护,无需手动添加!可以控制每次发送的表情数量和频率(进入设置配置一次发送最大数量与发送概率) 更多信息与功能预览请前往仓库页面查看:https://github.com/anka-afk/astrbot_plugin_meme_manager [01:28:36.169] [Core] [INFO] [star.star_manager:926]: Loading plugin astrbot_plugin_pokepro ... [01:28:36.205] [Core] [INFO] [provider.func_tool_manager:314]: Added llm tool: llm_poke_user [01:28:36.212] [Core] [INFO] [star.star_manager:1014]: Plugin astrbot_plugin_pokepro (v2.1.0) by Zhalslar: 【专业的戳一戳插件】支持触发(反戳:LLM:face:图库:语音:禁言:命令),戳@某人,跟戳 [01:28:36.231] [Core] [WARN] [v4.25.0] [core.config:267]: 表情包图库路径不存在,已跳过:G:\Bot\Astrbot\3.西格莉卡\data\plugin_data\astrbot_plugin_gallery\galleries\戳一戳 [01:28:36.294] [Core] [INFO] [star.star_manager:926]: Loading plugin astrbot_plugin_qq_group_daily_analysis ... [01:28:51.466] [Core] [INFO] [star.star_manager:1014]: Plugin astrbot_plugin_qq_group_daily_analysis (v4.10.5) by SXP-Simon: [多平台接入开发中] 群日常分析总结插件 - 支持 QQ (aiocqhttp)、Telegram、Discord 以及 Feishu (Lark);生成精美的群聊分析报告,支持话题分析、用户形象、群聊圣经等功能 [01:28:55.895] [Core] [INFO] [utils.logger:25]: [6e9bc4eb] [群分析插件] GlobalRateLimiter 重新配置并发上限:None -> 2 [01:28:55.897] [Core] [INFO] [star.star_manager:926]: Loading plugin astrbot_plugin_reread ... [01:28:55.911] [Core] [INFO] [star.star_manager:1014]: Plugin astrbot_plugin_reread (v2.0.0) by Zhalslar: 非常轻量好用的复读姬,可单独设置复读阈值(文本、图片、表情)、复读概率、打断概率、屏蔽单人 [01:28:55.911] [Core] [INFO] [star.star_manager:1048]: Plugin astrbot_plugin_reread is disabled. [01:28:55.912] [Core] [INFO] [star.star_manager:926]: Loading plugin astrbot_plugin_rocom ... [01:28:56.397] [Core] [INFO] [star.star_manager:1014]: Plugin astrbot_plugin_rocom (3.1.1) by bvzrays & 熵增项目组: 基于 WeGame API 的洛克王国数据查询插件,支持扫码登录和凭证导入,涵盖档案、战绩、背包、家园、查蛋配种等查询渲染。 [01:28:56.495] [Core] [INFO] [searcheggs.eggs:106]: [Eggs] 加载 1015 只精灵 [01:28:56.496] [Core] [INFO] [astrbot_plugin_rocom.main:82]: [Rocom] 插件初始化完成,自动刷新启用状态:False, 刷新时间:['00:00', '12:00'], 通知群: [01:28:56.497] [Core] [INFO] [astrbot_plugin_rocom.main:87]: [Rocom] 自动刷新功能未启用 [01:28:56.499] [Core] [INFO] [star.star_manager:926]: Loading plugin astrbot_plugin_wbank ... [01:28:56.510] [Core] [INFO] [star.star_manager:1014]: Plugin astrbot_plugin_wbank (v1.1.0) by Zhalslar: 动态词库,自定义回复词 [01:28:56.514] [Core] [INFO] [star.star_manager:926]: Loading plugin astrbot_plugin_weakblacklist ... [01:28:56.523] [Core] [INFO] [star.star_manager:1014]: Plugin astrbot_plugin_weakblacklist (v1.2) by 和泉智宏: 弱黑名单插件,对黑名单的人/群进行概率回复,即使@机器人也进行概率回复 [01:28:56.525] [Core] [INFO] [astrbot_plugin_weakblacklist.main:29]: 弱黑名单插件已加载,用户黑名单: 6 个,群聊黑名单: 0 个 [01:28:56.526] [Core] [INFO] [star.star_manager:926]: Loading plugin astrbot_plugin_what_to_eat ... [01:28:56.540] [Core] [INFO] [star.star_manager:1014]: Plugin astrbot_plugin_what_to_eat (1.3.0_beta1) by C₂₂H₂₅NO₆: 一款为 AstrBot 开发的简单有趣的插件,帮助大学生解决每天最头疼的问题——今天吃什么? [01:28:56.541] [Core] [INFO] [star.star_manager:1048]: Plugin astrbot_plugin_what_to_eat is disabled. [01:28:56.542] [Core] [INFO] [star.star_manager:926]: Loading plugin vocutts_astrbot ... [01:28:56.556] [Core] [INFO] [star.star_manager:1014]: Plugin astrbot_plugin_vocu_tts (v0.1.0) by Salieri: 通过 Vocu API 将机器人发送的文本消息自动转为语音,支持 TRPG 括号内容过滤与情绪映射。 [01:28:56.557] [Core] [INFO] [star.star_manager:1048]: Plugin astrbot_plugin_vocu_tts is disabled. [01:28:56.559] [Core] [INFO] [star.star_manager:926]: Loading plugin astrbot ... [01:28:56.569] [Core] [INFO] [star.star_manager:1014]: Plugin astrbot (4.1.0) by AstrBot Team: AstrBot's internal plugin, providing some basic capabilities. [01:28:56.570] [Core] [INFO] [star.star_manager:926]: Loading plugin builtin_commands ... [01:28:56.598] [Core] [INFO] [star.star_manager:1014]: Plugin builtin_commands (0.0.1) by Soulter: AstrBot's internal plugin, providing all built-in commands such as /reset. [01:28:56.603] [Core] [INFO] [astrbot_plugin_endfield.main:3378]: [公告推送] 任务已启动 [01:28:56.613] [Core] [INFO] [astrbot_plugin_endfield.main:3450]: [理智推送] 任务已启动 [01:28:56.614] [Core] [INFO] [astrbot_plugin_endfield.main:4899]: [调度券推送] 任务已启动 [01:28:56.616] [Core] [INFO] [astrbot_plugin_endfield.main:3576]: [Endfield Auto Sign-In] Next auto sign-in scheduled at 2026-05-18 00:05:00 (in 81363.4 seconds) [01:28:56.617] [Core] [INFO] [astrbot_plugin_rocom.main:807]: [Rocom] 远行商人订阅循环任务已启动 [01:28:56.617] [Core] [INFO] [astrbot_plugin_rocom.main:815]: [Rocom] 下次远行商人订阅检查时间:2026-05-17 08:00:31 CST(基准 08:01:00,随机偏移 -28.5s) [01:28:56.618] [Core] [INFO] [astrbot_plugin_rocom.main:637]: [Rocom] 家园订阅循环任务已启动 [01:28:56.634] [Core] [INFO] [provider.manager:580]: Loading model openai_chat_completion(deepseek/deepseek-chat) ... [01:28:56.761] [Core] [DBUG] [provider.register:50]: Model provider registered: openai_chat_completion [01:28:57.723] [Core] [INFO] [provider.manager:580]: Loading model openai_chat_completion(deepseek/deepseek-reasoner) ... [01:28:57.726] [Core] [INFO] [provider.manager:575]: Provider deepseek_1/deepseek/deepseek-v3.2-251201 is disabled, skipping [01:28:57.727] [Core] [INFO] [provider.manager:575]: Provider deepseek_1/qwen3-vl-30b-a3b-thinking is disabled, skipping [01:28:57.727] [Core] [INFO] [provider.manager:580]: Loading model openai_chat_completion(openai/LongCat-Flash-Thinking-2601) ... [01:28:57.729] [Core] [INFO] [provider.manager:575]: Provider deepseek_2/deepseek/deepseek-v3.2-251201 is disabled, skipping [01:28:57.730] [Core] [INFO] [provider.manager:575]: Provider deepseek_2/qwen3-vl-30b-a3b-thinking is disabled, skipping [01:28:57.731] [Core] [INFO] [provider.manager:580]: Loading model openai_embedding(openai_embedding) ... [01:28:57.733] [Core] [DBUG] [provider.register:50]: Model provider registered: openai_embedding [01:28:57.734] [Core] [INFO] [sources.openai_embedding_source:36]: [OpenAI Embedding] openai_embedding Using API Base: https://ai.gitee.com/v1 [01:28:57.819] [Core] [INFO] [provider.manager:580]: Loading model openai_chat_completion(星见雅/gpt-5.5) ... [01:28:57.822] [Core] [INFO] [provider.manager:580]: Loading model openai_chat_completion(星见雅/qwen/qwen3.5-122b-a10b) ... [01:28:57.824] [Core] [INFO] [provider.manager:580]: Loading model openai_chat_completion(星见雅/qwen/qwen3.5-397b-a17b) ... [01:28:57.826] [Core] [INFO] [provider.manager:580]: Loading model openai_chat_completion(星见雅/openai/gpt-oss-20b) ... [01:28:57.828] [Core] [INFO] [provider.manager:686]: Selected openai_chat_completion(星见雅/openai/gpt-oss-20b) as default chat model provider [01:28:57.884] [Core] [INFO] [knowledge_base.kb_mgr:62]: KnowledgeBase database initialized: G:\Bot\Astrbot\3.西格莉卡\data\knowledge_base\kb.db [01:28:57.974] [Core] [DBUG] [astrbot_plugin_endfield.main:3393]: [公告推送] 轮询完成,最新公告 TS: 1778731228 [01:28:58.445] [Core] [INFO] [platform.manager:125]: Loading IM platform adapter aiocqhttp(粑粑柑) ... [01:28:58.452] [Core] [INFO] [platform.manager:225]: hook(on_platform_loaded) -> astrbot_plugin_qq_group_daily_analysis - on_platform_loaded [2026-05-17 01:28:58 +0800] [5584] [INFO] Running on http://127.0.0.1:12203 (CTRL + C to quit) [01:28:58.685] [Core] [INFO] [t2i.network_strategy:131]: Successfully got 2 official T2I endpoints. [01:29:01.640] [Core] [INFO] [astrbot_plugin_qq_group_daily_analysis.main:210]: [Trace] TraceID 日志追踪已启用 [01:29:01.640] [Core] [INFO] [utils.logger:25]: [9839dec0] [群分析插件] 正在执行插件初始化 (来源: Plugin Reload/Init)... [01:29:01.642] [Core] [INFO] [utils.logger:25]: [f90fde85] [群分析插件] auto_discover_bot_instances: 在管理器中发现 1 个平台。 [01:29:01.643] [Core] [INFO] [utils.logger:25]: [21904666] [群分析插件] [群分析插件 BotManager]: Log metadata for debugging custom IDs ,Platform: 粑粑柑, Metadata Type: N/A, Metadata Name: aiocqhttp [01:29:01.645] [Core] [DBUG] [utils.logger:34]: [5638a787] [群分析插件] 发现平台: 粑粑柑 (aiocqhttp), 客户端就绪: True [01:29:01.646] [Core] [INFO] [utils.logger:25]: [1d54b74e] [群分析插件] [BotManager] 为平台 粑粑柑 (aiocqhttp) 注册 bot 实例 [01:29:01.647] [Core] [DBUG] [utils.logger:34]: [c36ece3d] [群分析插件] 已为 粑粑柑 (aiocqhttp) 创建 PlatformAdapter [01:29:01.648] [Core] [INFO] [utils.logger:25]: [b4600e9b] [群分析插件] 已创建 1 个 PlatformAdapter: ['粑粑柑'] [01:29:01.649] [Core] [INFO] [utils.logger:25]: [5ee32bba] [群分析插件] 定时分析名单为空且为白名单模式,不注册定时任务。 [01:29:01.650] [Core] [INFO] [utils.logger:25]: [5b7f3c5a] [群分析插件] 插件任务注册完成 (来源: Plugin Reload/Init) [01:29:06.610] [Core] [INFO] [astrbot_plugin_bilivideo.main:2152]: 开始定时检查,共 2 个会话的订阅 [01:29:06.653] [Core] [INFO] [utils.logger:25]: [9f953c63] [群分析插件] 正在执行插件初始化 (来源: Platform Loaded)... [01:29:06.654] [Core] [INFO] [utils.logger:25]: [79ecece5] [群分析插件] auto_discover_bot_instances: 在管理器中发现 1 个平台。 [01:29:06.655] [Core] [INFO] [utils.logger:25]: [468a2004] [群分析插件] [群分析插件 BotManager]: Log metadata for debugging custom IDs ,Platform: 粑粑柑, Metadata Type: N/A, Metadata Name: aiocqhttp [01:29:06.656] [Core] [DBUG] [utils.logger:34]: [6b0ce36c] [群分析插件] 发现平台: 粑粑柑 (aiocqhttp), 客户端就绪: True [01:29:06.657] [Core] [INFO] [utils.logger:25]: [c9e3ab32] [群分析插件] [BotManager] 为平台 粑粑柑 (aiocqhttp) 注册 bot 实例 [01:29:06.658] [Core] [DBUG] [utils.logger:34]: [7ae7650c] [群分析插件] 已为 粑粑柑 (aiocqhttp) 创建 PlatformAdapter [01:29:06.659] [Core] [INFO] [utils.logger:25]: [256357c3] [群分析插件] 已创建 1 个 PlatformAdapter: ['粑粑柑'] [01:29:06.659] [Core] [INFO] [utils.logger:25]: [0cc53e71] [群分析插件] 定时分析名单为空且为白名单模式,不注册定时任务。 [01:29:06.660] [Core] [INFO] [utils.logger:25]: [5d6a7525] [群分析插件] 插件任务注册完成 (来源: Platform Loaded) [01:29:06.807] [Core] [INFO] [dashboard.server:489]: Starting WebUI at http://0.0.0.0:12203 [01:29:06.808] [Core] [INFO] [dashboard.server:491]: WebUI listens on all interfaces. Check security. Set dashboard.host in data/cmd_config.json to change it. **[01:29:06.869] [Core] [ERRO] [v4.25.0] [dashboard.server:505]: 错误:端口 12203 已被占用 占用信息: 进程名: python.exe PID: 5584 执行路径: C:\Users\佩佩祖\AppData\Roaming\uv\python\cpython-3.12.13-windows-x86_64-none\python.exe 工作目录: G:\Bot\Astrbot\3.西格莉卡 启动命令: C:\Users\佩佩祖\AppData\Roaming\uv\python\cpython-3.12-windows-x86_64-none\python.exe main.py 请确保:

  1. 没有其他 AstrBot 实例正在运行
  2. 端口 12203 没有被其他程序占用
  3. 如需使用其他端口,请修改配置文件** [01:29:06.875] [Core] [INFO] [astrbot_plugin_endfield.main:3587]: [Endfield Auto Sign-In] Task cancelled. Traceback (most recent call last): File "G:\Bot\Astrbot\3.西格莉卡\main.py", line 152, in asyncio.run(main_async(args.webui_dir)) File "C:\Users\佩佩祖\AppData\Roaming\uv\python\cpython-3.12-windows-x86_64-none\Lib\asyncio\runners.py", line 195, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "C:\Users\佩佩祖\AppData\Roaming\uv\python\cpython-3.12-windows-x86_64-none\Lib\asyncio\runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\佩佩祖\AppData\Roaming\uv\python\cpython-3.12-windows-x86_64-none\Lib\asyncio\base_events.py", line 691, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "G:\Bot\Astrbot\3.西格莉卡\main.py", line 132, in main_async await core_lifecycle.start() File "G:\Bot\Astrbot\3.西格莉卡\astrbot\core\initial_loader.py", line 47, in start coro = self.dashboard_server.run() ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "G:\Bot\Astrbot\3.西格莉卡\astrbot\dashboard\server.py", line 514, in run raise Exception(f"端口 {port} 已被占用") Exception: 端口 12203 已被占用

Are you willing to submit a PR? / 你愿意提交 PR 吗?

  • [x] Yes!

Code of Conduct

SYxiaomu avatar May 16 '26 17:05 SYxiaomu

Image

SYxiaomu avatar May 16 '26 17:05 SYxiaomu

Hi @SYxiaomu! I'm Dosu and I’m helping the AstrBot team.

从日志可以看出问题的原因:你的 aiocqhttp 平台适配器(粑粑柑)和 WebUI 面板都配置在了同一个端口 12203 上。

日志关键行:

  • [INFO] Running on http://127.0.0.1:12203 — 这是 aiocqhttp 适配器先占用了端口
  • [INFO] Starting WebUI at http://0.0.0.0:12203 — 随后 WebUI 尝试启动同一端口,失败

解决方法: 将 aiocqhttp 的 ws_reverse_port 和 WebUI 的 dashboard.port 设为不同的端口。例如:

  • aiocqhttp 反向 WS 端口保持 12203(或改为其他值如 6199)
  • WebUI 面板端口改为 6185 或其他未占用的端口

你可以在 WebUI 的消息平台配置中修改 aiocqhttp 的端口,或者直接编辑 data/cmd_config.json 中的 dashboard.port 字段 [1]。修改后记得同步更新 NapCat 那边的连接地址。

这不是"启用文件日志"导致的 bug,而是之前你的 aiocqhttp 和 WebUI 恰好配置了相同的端口,重启后产生了启动顺序的竞争。

To reply, just mention @dosu.


Share context across your team and agents. Try Dosu.

Leave Feedback Learn about AstrBot with Dosu Add Dosu to your team

dosubot[bot] avatar May 16 '26 17:05 dosubot[bot]

意思是适配器的端口不能跟webui的端口一致吗,我其他三个机器人都没有出现这个问题

SYxiaomu avatar May 16 '26 18:05 SYxiaomu

是的,aiocqhttp 适配器的端口和 WebUI 的端口不能设置为相同的值,它们是两个完全独立的 HTTP 服务器,必须使用不同的端口 [1] [2]。

默认端口分别是:

  • WebUI Dashboard: 6185
  • aiocqhttp 适配器: 6199

你的其他三个机器人没出问题,可能是因为它们的 aiocqhttp 端口和 WebUI 端口恰好配置的是不同的值。你可以对比一下出问题的这个机器人的 data/cmd_config.json,看看 dashboard.port 和 aiocqhttp 的 ws_reverse_port 是不是被设成了同一个值(12203)。把其中一个改成不同的端口即可解决。

To reply, just mention @dosu.


Share context across your team and agents. Try Dosu.

Leave Feedback Learn about AstrBot with Dosu Add Dosu to your team

dosubot[bot] avatar May 16 '26 18:05 dosubot[bot]

我其他三个机器人aiocqHTTP适配器的端口和 WebUI 的端口都是一致的,我刚刚在配置文件中把aiocqHTTP 的端口删掉后再启动改回12203后正常了,后续我再把aiocqHTTP端口改成其他的吧

SYxiaomu avatar May 16 '26 18:05 SYxiaomu

你是在windows平台上。修改系统配置(“启用文件日志”属于这个)会触发重启。AstrBot的重启机制使用os.exec*,在win上不会替换当前进程,而是创建新进程。旧进程没有立即退出,会导致端口被占用。 试试开任务管理器搜索python.exe并结束掉之前的进程再启动。

Rain-0x01-39 avatar Jun 21 '26 11:06 Rain-0x01-39

你是在windows平台上。修改系统配置(“启用文件日志”属于这个)会触发重启。AstrBot的重启机制使用os.exec*,在win上不会替换当前进程,而是创建新进程。旧进程没有立即退出,会导致端口被占用。 试试开任务管理器搜索python.exe并结束掉之前的进程再启动。

我检查过了是没有进程的,按照上面机器人的方法改了连接napcat端口后正常了,感觉像是先启动了跟napcat的连接导致astrbot自身的起不来了

SYxiaomu avatar Jun 21 '26 13:06 SYxiaomu

好的,那应该是我搞错了。

Rain-0x01-39 avatar Jun 25 '26 04:06 Rain-0x01-39