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.98k stars 9.35k forks source link

[Bug] 使用 Docker Compose 部署 LobeChat 服务端数据库版本时候遇到Logto 404的错误 #3673

Closed vannchic closed 3 weeks ago

vannchic commented 3 weeks ago

📦 Environment

Docker

📌 Version

v1.14.9

💻 Operating System

Other Linux

🌐 Browser

Chrome

🐛 Bug Description

访问: http://lobe-auth-ui.example.com/ 时候 302到 http://lobe-auth-api.example.com/unknown-session 然后又报错404了 如图: image

docker compose使用的是:

curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/production/docker-compose.yml > docker-compose.yml
curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/production/.env.zh-CN.example > .env

相关域名默认用的是demo的域名,仅仅做了如下调整:

应该不是反向代理的问题,因为minio的 ui界面就可以正常访问 http://lobe-s3-ui.example.com/login

docker ps情况如下:

image

📷 Recurrence Steps

🚦 Expected Behavior

可以正常打开Logto

📝 Additional Information

No response

lobehubbot commented 3 weeks ago

👀 @vannchic

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

SpeedupMaster commented 3 weeks ago

域名解析在Cloudflare上?

lobehubbot commented 3 weeks ago

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


Domain name resolution on Cloudflare?

vannchic commented 3 weeks ago

域名解析在Cloudflare上?

不是的, 本机配置的域名. window下使用vm安装的centos系统,docker跑在centos上的. ip是192.168.1.129 192.168.1.129 lobe.example.com lobe-chat.test lobe-auth-api.example.com lobe-auth-ui.example.com lobe-s3-api.example.com lobe-s3-ui.example.com

lobehubbot commented 3 weeks ago

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


Domain name resolution on Cloudflare?

No, the domain name is configured locally. The centos system is installed using vm under window, and docker runs on centos. The IP is 192.168.1.129 192.168.1.129 lobe.example.com lobe-chat.test lobe-auth-api.example.com lobe-auth-ui.example.com lobe-s3-api.example.com lobe-s3-ui.example.com

SpeedupMaster commented 3 weeks ago

windows上不是可以直接本地部署吗?没必要在虚拟机上部署吧。

lobehubbot commented 3 weeks ago

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


Isn’t it possible to deploy directly locally on Windows? There is no need to deploy it on a virtual machine.

vannchic commented 3 weeks ago

windows上不是可以直接本地部署吗?没必要在虚拟机上部署吧。

写后端比较多一些.之前一直在centos下开发.

不过这个环境理论上应该也是能支持的吧[实际我们到时候内网部署时候,也是类似的情况,内网的centos,内网的域名]?

不是很理解为啥会404

docker logs 里能看到Logto 是输出成功的,没有报错

lobehubbot commented 3 weeks ago

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


Isn’t it possible to deploy directly locally on Windows? There is no need to deploy it on a virtual machine.

I write more backends. I have been developing under centos before.

But in theory, this environment should be able to support it, right [actually when we deploy the intranet, it will be a similar situation, centos on the intranet, domain name on the intranet]?

I don’t quite understand why it’s 404

You can see in docker logs that Logto output is successful and no error is reported.

SpeedupMaster commented 3 weeks ago

你这个问题我也遇到过,我是域名解析在CF上,开启了小黄云代理。在CF上把代理关了就没问题了。 CF上设置重写规则也可以解决,你可以参考下 image

lobehubbot commented 3 weeks ago

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


I have also encountered your problem. I resolved the domain name on CF and enabled the Xiaohuangyun proxy. If you turn off the proxy on CF, there will be no problem. Setting rewrite rules on CF can also solve the problem. You can refer to the following image

JonFanne commented 3 weeks ago

这个我也遇到了,3001和3002全部反代理就解决了

lobehubbot commented 3 weeks ago

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


I also encountered this problem. It was solved by anti-proxying all 3001 and 3002.

vannchic commented 3 weeks ago

这个我也遇到了,3001和3002全部反代理就解决了

我上午都配置了的反向代理,依然还是 404. lobe-auth-ui.example.com 的 image

lobe-auth-api.example.com 的 image

JonFanne commented 3 weeks ago

建个用户试一下

在 2024年8月30日星期五,vannchic @.***> 写道:

这个我也遇到了,3001和3002全部反代理就解决了

我上午都配置了的反向代理,依然还是 404. lobe-auth-ui.example.com 的 image.png (view on web) https://github.com/user-attachments/assets/588d9f96-857a-460a-841c-b4c8baa28c7c

lobe-auth-api.example.com 的 image.png (view on web) https://github.com/user-attachments/assets/7fb82d23-ab93-4eab-bed0-a765d00a3d49

— Reply to this email directly, view it on GitHub https://github.com/lobehub/lobe-chat/issues/3673#issuecomment-2320344699, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADYYUAWBSE4KNFQ6YH6UZGTZUAN33AVCNFSM6AAAAABNLS3D62VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRQGM2DINRZHE . You are receiving this because you commented.Message ID: @.***>

vannchic commented 3 weeks ago

建个用户试一下 在 2024年8月30日星期五,vannchic @.> 写道: 这个我也遇到了,3001和3002全部反代理就解决了 我上午都配置了的反向代理,依然还是 404. lobe-auth-ui.example.com 的 image.png (view on web) https://github.com/user-attachments/assets/588d9f96-857a-460a-841c-b4c8baa28c7c lobe-auth-api.example.com 的 image.png (view on web) https://github.com/user-attachments/assets/7fb82d23-ab93-4eab-bed0-a765d00a3d49 — Reply to this email directly, view it on GitHub <#3673 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADYYUAWBSE4KNFQ6YH6UZGTZUAN33AVCNFSM6AAAAABNLS3D62VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRQGM2DINRZHE . You are receiving this because you commented.Message ID: @.>

没理解你说的建用户. 访问 https://lobe-auth-ui.example.com 时候直接404了, 没法下一步了 image