Leask / halbot

Just another `ChatGPT` / `Gemini` / `Mistral (by ollama)` Telegram bob, which is simple design, easy to use, extendable and fun.
https://leaskh.com/post/711636926789271552/halbot
MIT License
101 stars 16 forks source link

发送request到telegram api 超时 #3

Closed LukyBruce closed 1 year ago

LukyBruce commented 1 year ago

发送request到telegram api 超时

reject(new FetchError(request to ${request.url} failed, reason: ${err.message}, 'system', err)); ^ FetchError: request to https://api.telegram.org/bot12345:[REDACTED]/getMe failed, reason: connect ETIMEDOUT 199.59.149.236:443 at ClientRequest. (/Users/rongjinzhou/robots1/halbot/node_modules/node-fetch/lib/index.js:1505:11) at ClientRequest.emit (node:events:512:28) at TLSSocket.socketErrorListener (node:_http_client:496:9) at TLSSocket.emit (node:events:512:28) at emitErrorNT (node:internal/streams/destroy:151:8) at emitErrorCloseNT (node:internal/streams/destroy:116:3) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { type: 'system', errno: 'ETIMEDOUT', code: 'ETIMEDOUT' }

Leask commented 1 year ago

你的網絡 ping 199.59.149.236 把輸出帖一下?謝謝。

LukyBruce commented 1 year ago

我的telegram是可以用的为啥 ping不通? Request timeout for icmp_seq 0 Request timeout for icmp_seq 1 Request timeout for icmp_seq 2

Leask commented 1 year ago

你在國內還是國外?

LukyBruce commented 1 year ago

国内

Leask commented 1 year ago

你的 telegram 是翻牆訪問的麼?

LukyBruce commented 1 year ago

是的, 我shell里面也设置代理了 还是ping不通

LukyBruce commented 1 year ago

我另外一个bot 可以用。

Leask commented 1 year ago

node 代碼應該不會直接讀取到代理,你如何配置的代理?我可以考慮支持一下代理服務器。

LukyBruce commented 1 year ago

有路由器上面 shellclash, 也有local clash 的client

LukyBruce commented 1 year ago

我怀疑node里面没能读取代理。

Leask commented 1 year ago

理論上應該就是不讀取的,我現在在國外,的確沒有考慮這些問題。我考慮一下吧,這個issue先保持開啟狀態。

LukyBruce commented 1 year ago

ok, 多谢。

Leask commented 1 year ago

不客氣😇

LukyBruce commented 1 year ago

应该是 proxy 的问题了 我怀疑node 默认不会读取system proxy, 我用router上面的clash 就好了

Leask commented 1 year ago

代理的問題,這裡就不處理了,🙏感謝!