Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[Bug] macOS 环境下配置 DeepSeek API 测试连接报错:connect: bad file descriptor

已关闭
#1,640 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
go
领域
networking

调研方向

Start by reproducing the DeepSeek model test on macOS ARM with the reported endpoint, then trace the TscanPlus AI module's Go request path through net.Dial and compare it with the successful curl request. Done means the in-app model test returns a normal AI response instead of "connect: bad file descriptor".

由索引模型根据 Issue 内容生成。

描述

系统环境
操作系统:macOS (版本号26.5.2 (25F84))

TscanPlus 版本:( v3.3.9)

芯片架构:(ARM)

🐞 问题描述
在 TscanPlus 的 AI 模块配置中接入 DeepSeek 大模型时,无论使用 deepseek-chat 还是 deepseek-v4-flash 模型,点击“测试模型”始终返回错误:

text
[ERROR] DeepSeek 模型测试异常: ERROR: 发送请求失败: Post "https://api.deepseek.com/v1/chat/completions": dial tcp 182.247.248.128:443: connect: bad file descriptor
关键矛盾点:使用系统终端 curl 命令调用完全相同的 API 地址和密钥,可以成功返回 HTTP 200 及正常响应。这说明 系统网络、DNS 解析、防火墙以及 DeepSeek 服务端均无任何问题。

🔄 复现步骤
打开 TscanPlus,进入 AI 模型配置界面。

提供商选择 DeepSeek。

API 地址填写:https://api.deepseek.com/v1/chat/completions。

填写有效的 API 密钥,模型选择 deepseek-v4-flash。

点击“确定”保存,随后执行“测试模型”或直接使用 AI 功能。

📋 实际结果
程序报错 bad file descriptor,连接失败。
(附上截图:配置界面和错误弹窗)

✅ 预期结果
应正常返回 AI 响应内容(如 Hello! How can I help you?)。

🧪 额外排查信息(证明环境正常)
我已确认以下外部因素无异常:

本地网络权限:已在 系统设置 -> 隐私与安全性 -> 本地网络 中开启 TscanPlus 权限。

代理/VPN:已确认系统代理关闭,无 VPN 运行。

DNS 解析:正常解析到 DeepSeek CDN IP(如 182.247.248.128)。

Curl 验证(成功):

bash
curl -v https://api.deepseek.com/v1/chat/completions
-H "Content-Type: application/json"
-H "Authorization: Bearer API-KEY"
-d '{"model":"deepseek-v4-flash","messages":[{"role":"user","content":"hi"}]}'
(返回 HTTP/2 200,完整响应体略)

💡 可能的分析建议
该报错在 Go 语言的 net.Dial 中常由连接池复用异常或未关闭的残留 socket 引起,可能与 macOS 的网络扩展(如 utun 虚拟网卡残留)或特定的 TCP 端口复用机制有关。

[ERROR] DeepSeek 模型测试异常: ERROR: 发送请求失败: Post "https://api.deepseek.com/v1/chat/completions": dial tcp 171.105.220.186:443: connect: bad file descriptor
[INFO] 开始测试模型: DeepSeek - deepseek-v4-flash
[INFO] AI模块初始化完成
[SUCCESS] 模型配置加载成功

主要语言
没有语言数据
星标
4.5k
派生
253
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

TideSec/TscanPlus 的其他 Issue

查看 TideSec/TscanPlus 的全部 Issue

相似的 Issue

更多 Networking Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。