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
40.96k stars 9.34k forks source link

[Bug] HTTP ERROR 502 #2714

Closed Matinal111 closed 3 months ago

Matinal111 commented 3 months ago

📦 部署环境

📌 软件版本

v0.162.9

💻 系统环境

🌐 浏览器

🐛 问题描述

我有两台服务器一台香港的一台深圳的都通过 docker 部署了 lobe-chat,香港的打开后经常 502 异常,深圳的没有问题,请问有遇到类似问题的老哥吗,该如何解决呢(香港的这台服务器还跑有其他 web 服务是没有问题的,唯独lobe-chat出现这个情况)

企业微信截图_20240529172139 企业微信截图_20240529172054

📷 复现步骤

No response

🚦 期望结果

No response

📝 补充信息

No response

lobehubbot commented 3 months ago

👀 @cfwl1111

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。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

arvinxx commented 3 months ago

502 是服务端错误,你得看下是不是哪些环境配错了之类的吧。

lobehubbot commented 3 months ago

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


502 is a server error. You have to check whether the environment is misconfigured or something.

Matinal111 commented 3 months ago

502 是服务端错误,你得看下是不是哪些环境配错了之类的吧。

两个服务端的环境变量和版本是一致的,我配置两台一样的就是为了排除差异问题。按照目前的情况来看香港这个像是网络问题,但其它的服务又是正常,需要我提供什么来排查吗

lobehubbot commented 3 months ago

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


502 is a server-side error. You have to check whether the environment is misconfigured or something.

The environment variables and versions of the two servers are consistent. I configured the same two servers to eliminate differences. According to the current situation, this seems to be a network problem in Hong Kong, but other services are normal. Is there anything I need to provide to troubleshoot?

arvinxx commented 3 months ago

@cfwl1111 看下 docker 日志?

lobehubbot commented 3 months ago

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


@cfwl1111 Take a look at the docker log?

Matinal111 commented 3 months ago

@cfwl1111 看下 docker 日志?

麻烦你看下,日志和环境变量应该都没问题的。如果可以,我提供域名和访问密码发你测试下

Screenshot_2024-05-30-01-01-08-61_3aea4af51f236e4932235fdada7d1643.jpg

Screenshot_2024-05-30-01-03-32-77_3aea4af51f236e4932235fdada7d1643.jpg

lobehubbot commented 3 months ago

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


@cfwl1111 Take a look at the docker log?

Please take a look, the logs and environment variables should be fine. If possible, I will provide you with the domain name and access password for testing.

![Screenshot_2024-05-30-01-01-08-61_3aea4af51f236e4932235fdada7d1643.jpg](https://github.com/lobehub/lobe-chat/assets/45492444/bc0caed5-da30-4623-89c4-a9bb3c13 478b)

![Screenshot_2024-05-30-01-03-32-77_3aea4af51f236e4932235fdada7d1643.jpg](https://github.com/lobehub/lobe-chat/assets/45492444/d0c81083-46c4-4acc-a1a0-59f20 800a283)

arvinxx commented 3 months ago

@cfwl1111 试下直接使用 IP访问,看看能否正常打开? 正常需要排查一下是 nginx 的问题还是docker的问题

lobehubbot commented 3 months ago

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


@cfwl1111 Try using IP access directly to see if it can be opened normally? Normally, you need to check whether it is a problem with nginx or docker.

Matinal111 commented 3 months ago

@cfwl1111试下直接使用IP访问,看看是否正常? 正常需要排查一下是nginx的问题还是docker的问题

一星期前出现这问题的时候我发现请求太多首页很难加载完成,然后后面开始出现 502 错误我也以为是 WEB 反代服务器的问题,通过 IP 访问测试过,问题依旧,这个问题的症状在于客户端浏览器请求出现 502 错误或者 lobe-chat 自带的响应错误页面时反复刷新下时而正常时而不正常。(网页缓存清理过)

lobehubbot commented 3 months ago

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


@cfwl1111 Try to access directly using IP to see if it is normal? Normally you need to check whether it is a problem with nginx or docker.

When this problem occurred a week ago, I found that there were too many requests and it was difficult to load the homepage. Then 502 errors began to appear later. I also thought it was a problem with the WEB reverse generation server. I tested it through IP access and the problem remained the same. The symptoms of this problem are When the client browser requests a 502 error or lobe-chat's built-in response error page, it is refreshed repeatedly, sometimes normally and sometimes abnormally. (Web page cache cleared)

AppleRiven commented 3 months ago

我最近也是这个问题,美国的服务器,系统ubuntu22.04,部署在docker里。 裸连:浏览器能正常访问Lobe的端口; 开代理:浏览器访问Lobe端口提示502,但可以正常访问其他端口上的服务;此外,在cmd中可以正常curl remote ip:3210.

lobehubbot commented 3 months ago

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


I have the same problem recently. The server in the United States, system ubuntu22.04, is deployed in docker. Naked connection: The browser can access Lobe's port normally; Turn on the proxy: The browser prompts 502 when accessing the Lobe port, but you can access services on other ports normally; in addition, you can curl remote ip:3210 normally in cmd.

lobehubbot commented 3 months ago

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


I have the same problem recently. The server in the United States, system ubuntu22.04, is deployed in docker. Naked connection: The browser can access Lobe's port normally; Turn on the proxy: The browser prompts 502 when accessing the Lobe port, but you can access services on other ports normally; in addition, you can curl remote ip:3210 normally in cmd.

Matinal111 commented 3 months ago

按照楼上说的,要么是 lobe-chat 的网络请求过多导致客户端浏览器异常中断返回错误响应,要么是 lobe-chat 的部分资源无法通过服务端的网络请求。这要说是服务端网络问题吧但其它服务又正常,搞不懂搞不懂🥴

lobehubbot commented 3 months ago

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


According to what was said upstairs, either there are too many network requests for lobe-chat, causing the client browser to interrupt abnormally and return an error response, or some resources of lobe-chat cannot be requested through the server's network. I think this is a network problem on the server side, but other services are normal. I can’t figure it out🥴

Matinal111 commented 3 months ago

@arvinxx 不知道是不是 lobe-chat 这边修改了啥,截止目前已恢复正常响应,缀更新今天推送的最新版后也是正常响应,后续再看看会不会复现吧

lobehubbot commented 3 months ago

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


@arvinxx I don’t know if lobe-chat has modified anything here. So far, it has returned to normal response. After updating the latest version pushed today, it still responds normally. We will see if it will happen again in the future.

arvinxx commented 3 months ago

@cfwl1111 没有改啥哎

lobehubbot commented 3 months ago

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


@cfwl1111 Nothing has changed

Matinal111 commented 3 months ago

@cfwl1111 没有改啥哎

那先不关闭这个问题吧,看下后续还有没有其他人会有这个情况

lobehubbot commented 3 months ago

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


@cfwl1111 Nothing has changed

So don't close this question yet, and see if anyone else has this problem in the future.

lobehubbot commented 3 months ago

✅ @cfwl1111

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

lobehubbot commented 3 months ago

✅ @cfwl1111

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