[Bug] macOS 环境下配置 DeepSeek API 测试连接报错:connect: bad file descriptor
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- go
- Ambito
- networking
Direzione di ricerca
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".
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
系统环境
操作系统: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] 模型配置加载成功
- Lingua principale
- Nessun dato sulla lingua
- Stelle
- 4.5k
- Fork
- 253
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di TideSec/TscanPlus
-
OSS存储扫描未接入全局配置代理Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
-
对单独的一个公司进行全资产信息收集的时候会卡Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 44/100
-
功能导航显示有点问题Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 31/100
-
水洞检查,漏洞很多的时候不好翻页Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 55/100
-
增强
Difficoltà 5/5 Più di una settimana Idoneità per principianti 18/100
Tutte le issue di TideSec/TscanPlus
Issue simili
-
Under the v32.1 pin: -maxconnections is neither capped at 2000 nor parsed saturating, as v32.1 doesApertaalignment
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
btclib-org/btclib-node#2127 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement server-everything v2
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
modelcontextprotocol/servers#5371 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug p2 triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
getpaseo/paseo#8149 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
facebookexperimental/moxygen#274 ·
I maintainer di solito rispondono entro 1 giorno