lobehub / lobe-chat

🤯 Lobe Chat - an open-source, modern-design AI chat framework. Supports Multi AI Providers( OpenAI / Claude 3 / Gemini / Ollama / Azure / DeepSeek), Knowledge Base (file upload / knowledge management / RAG ), Multi-Modals (Vision/TTS) and plugin system. One-click FREE deployment of your private ChatGPT/ Claude application.
https://chat-preview.lobehub.com
Other
44.95k stars 10.12k forks source link

[Bug] 本地服务器模式部署使用minio上传份文件提示分块失败 #4718

Closed claudehotline closed 1 week ago

claudehotline commented 1 week ago

📦 Environment

Docker

📌 Version

v1.31.8

💻 Operating System

Other

🌐 Browser

Chrome

🐛 Bug Description

系统:群晖DSM7.2 在群晖中用docker部署镜像lobehub-lobe-chat-database和minio-minio上传文件提示文件分块失败

image

lobechat日志如下:

/11/17 17:28:47 | stdout | }
2024/11/17 17:28:47 | stdout | meta: undefined
2024/11/17 17:28:47 | stdout | data: undefined,
2024/11/17 17:28:47 | stdout | shape: undefined,
2024/11/17 17:28:47 | stdout | },
2024/11/17 17:28:47 | stdout | }
2024/11/17 17:28:47 | stdout | hostname: 'lobechat.claudextxo.top'
2024/11/17 17:28:47 | stdout | syscall: 'getaddrinfo',
2024/11/17 17:28:47 | stdout | code: 'ENOTFOUND',
2024/11/17 17:28:47 | stdout | errno: -3007,
2024/11/17 17:28:47 | stdout |     at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
2024/11/17 17:28:47 | stdout |     at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:120:26)
2024/11/17 17:28:47 | stdout | [cause]: Error: getaddrinfo ENOTFOUND lobechat.claudextxo.top
2024/11/17 17:28:47 | stdout | at async Object.fetch (/app/.next/server/chunks/37022.js:33:140338) {
2024/11/17 17:28:47 | stdout | at async j (/app/.next/server/chunks/37022.js:33:139939)
2024/11/17 17:28:47 | stdout |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2024/11/17 17:28:47 | stdout |     at node:internal/deps/undici/undici:13185:13
2024/11/17 17:28:47 | stdout | cause: TypeError: fetch failed
2024/11/17 17:28:47 | stdout |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
2024/11/17 17:28:47 | stdout | at /app/.next/server/chunks/37022.js:33:140987
2024/11/17 17:28:47 | stdout | at p.from (/app/.next/server/chunks/37022.js:33:135028)
2024/11/17 17:28:47 | stdout | [ParseFileToChunks] error: p [TRPCClientError]: fetch failed
2024/11/17 17:28:31 | stdout | ✓ Ready in 92ms
2024/11/17 17:28:31 | stdout | ✓ Starting...
2024/11/17 17:28:31 | stdout |  
2024/11/17 17:28:31 | stdout | - Network:      http://0.0.0.0:3210
2024/11/17 17:28:31 | stdout | - Local:        http://localhost:3210
2024/11/17 17:28:31 | stdout | ▲ Next.js 14.2.8
2024/11/17 17:28:31 | stdout | -------------------------------------
2024/11/17 17:28:31 | stdout | ✅ database migration pass.
2024/11/17 17:28:31 | stdout | [Database] Start to migration...
2024/11/17 17:28:30 | stdout | -------------------------------------
2024/11/17 17:28:30 | stdout | 🌐 DNS Server: [ '192.168.50.2' ]

📷 Recurrence Steps

No response

🚦 Expected Behavior

No response

📝 Additional Information

No response

lobehubbot commented 1 week ago

👀 @claudehotline

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. Please make sure you have given us as much context as possible.\ 非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

dosubot[bot] commented 1 week ago

Hey, @claudehotline! I'm Dosu, and I'm here to help you with any bugs, questions, or contributions you have. Let's tackle this issue together!

The issue you're experiencing with file upload failures in Lobe Chat when using MinIO seems to be related to DNS resolution errors, specifically the ENOTFOUND error for the hostname lobechat.claudextxo.top. This error indicates that the DNS server is unable to resolve the specified hostname.

Here are some steps and considerations that might help resolve this issue:

  1. Check DNS Configuration: Ensure that your DNS settings are correctly configured. The DNS server specified (192.168.50.2) should be able to resolve the hostname lobechat.claudextxo.top. You might want to verify that this DNS server is operational and correctly configured.

  2. Verify Hostname: Double-check the hostname lobechat.claudextxo.top to ensure it is correct and accessible. You can try pinging this hostname from your server to see if it resolves correctly.

  3. Network Configuration: Ensure that your network settings allow for proper DNS resolution. This includes checking firewall settings, network routes, and any proxy configurations that might interfere with DNS queries.

  4. MinIO and Lobe Chat Configuration: Make sure that the configurations for MinIO and Lobe Chat are correctly set up, especially the environment variables related to S3 and MinIO. This includes S3_ENDPOINT, S3_BUCKET, and any authentication keys.

  5. Internal Authentication: If you have internal authentication mechanisms enabled, such as Clerk or NextAuth, ensure that they are not interfering with the server's ability to make RPC calls. Proper authentication headers or tokens might be required for these calls to succeed [1].

If these steps do not resolve the issue, you might want to look into similar issues that have been reported and resolved. For instance, there were issues related to file chunking errors that were resolved by configuring the APP_URL to ensure the server could access it directly, even with authentication layers in place [2][3].

To continue talking to Dosu, mention @dosu.

claudehotline commented 1 week ago

找到问题了,路由器把IPv6请求拦截了

lobehubbot commented 1 week ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Found the problem, the router intercepted the IPv6 request

lobehubbot commented 1 week ago

✅ @claudehotline

This issue is closed, If you have any questions, you can comment and reply.\ 此问题已经关闭。如果您有任何问题,可以留言并回复。